/* Parivahan Automation Dashboard Styles */

/* Reset and base styles */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

html, body { 
    height: 100%; 
    overflow: hidden; 
}

/* Main layout */
.container { 
    display: flex; 
    height: 100vh; 
    font-family: Arial, sans-serif; 
}

.browser-view { 
    flex: 3; 
    border: 1px solid #ccc; 
    height: 100vh; 
    overflow: hidden; 
    min-width: 0; 
}

.control-panel { 
    flex: 1; 
    padding: 20px; 
    background: #f8f9fa; 
    overflow-y: auto; 
    height: 100vh; 
    min-width: 300px; 
}

/* Sidebar header */
.header { 
    text-align: center; 
    margin-bottom: 16px; 
}
.header h1 { 
    font-size: 22px; 
    margin-bottom: 6px; 
}
.subtitle { 
    color: #6c757d; 
    font-size: 14px; 
}

/* Main action buttons row */
.main-actions { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 10px; 
    margin-bottom: 16px; 
}

/* Primary action buttons */
.action-button { 
    display: inline-flex; 
    align-items: center; 
    gap: 8px; 
    padding: 10px 14px; 
    border-radius: 6px; 
    border: none; 
    cursor: pointer; 
    font-size: 14px; 
    line-height: 1; 
}
.action-button .btn-icon { width: 18px; display: inline-block; }
.action-button .btn-text { font-weight: 600; }

/* Variants coming from server */
.start-btn { background: #0d6efd; color: #fff; }
.start-btn:hover { background: #0b5ed7; }
.start-btn-ready { background: #198754; color: #fff; }
.start-btn-ready:hover { background: #157347; }
.reset-btn { background: #6c757d; color: #fff; }
.reset-btn:hover { background: #5c636a; }
/* stop button removed */

/* Super button */
.super-button { 
    width: 100%; 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    gap: 8px; 
    padding: 12px 16px; 
    border: none; 
    border-radius: 6px; 
    background: #6f42c1; 
    color: #fff; 
    cursor: pointer; 
    margin: 10px 0 6px; 
}
.super-button:hover { background: #5a35a0; }

/* Status area */
.status-display { 
    display: grid; 
    grid-template-columns: auto 1fr; 
    gap: 6px 10px; 
    padding: 10px; 
    background: #ffffff; 
    border: 1px solid #dee2e6; 
    border-radius: 6px; 
    margin-bottom: 16px; 
}
.status-label { color: #6c757d; font-weight: 600; }
.status-value { color: #212529; }
.grn-value { font-weight: 700; color: #198754; }

/* VNC container styles */
#vnc-container { 
    height: 100%; 
    width: 100%; 
    overflow: hidden; 
    display: flex; 
    flex-direction: column; 
    position: relative;
}

#vnc-frame {
    width: 100% !important;
    height: 100% !important;
    border: none;
    transform-origin: 0 0;
    position: absolute;
    top: 0;
    left: 0;
    max-width: 100%;
    object-fit: contain;
}

#vnc-loading {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #666;
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    .container { 
        flex-direction: column; 
    }
    
    .browser-view { 
        flex: 1; 
        height: 60vh; 
        min-height: 400px;
    }
    
    .control-panel { 
        flex: none; 
        height: 40vh; 
        min-height: 300px;
        min-width: unset;
    }
}

/* Instructions and status panels */
.instructions { 
    margin: 15px 0; 
    padding: 15px; 
    background: #e7f3ff; 
    border-radius: 5px;
    border-left: 4px solid #007bff;
}

.status-panel {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
}

.step-section {
    margin: 20px 0;
    padding: 15px;
    background: white;
    border-radius: 5px;
    border: 1px solid #dee2e6;
}

/* Button styles */
.step-button { 
    width: 100%;
    margin: 5px 0; 
    padding: 12px 15px; 
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.step-button:hover { 
    background-color: #0056b3; 
    color: white; 
}

.step-button:disabled { 
    background-color: #6c757d; 
    cursor: not-allowed; 
    opacity: 0.6; 
}

/* Step button colors */
.step-1 { background-color: #007bff; color: white; }
.step-2 { background-color: #28a745; color: white; }
.step-3 { background-color: #17a2b8; color: white; }
.step-4 { background-color: #ffc107; color: black; }
.step-5 { background-color: #fd7e14; color: white; }
.step-6 { background-color: #e83e8c; color: white; }
.step-7 { background-color: #6f42c1; color: white; }
.step-8 { background-color: #20c997; color: white; }
.step-9 { background-color: #dc3545; color: white; }
.step-control { background-color: #6c757d; color: white; }

/* Completed step styles */
.step-completed { 
    background-color: #28a745 !important; 
    color: white !important;
}

.step-completed::after {
    content: " ✓";
    font-weight: bold;
}

/* Verification and details */
.verification-details {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 3px;
    font-size: 12px;
    max-height: 100px;
    overflow-y: auto;
}

.verification-success { 
    border-left: 3px solid #28a745; 
}

.verification-error { 
    border-left: 3px solid #dc3545; 
}

/* GRN display */
.grn-display {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
    font-weight: bold;
}

/* Loading and temporary message styles */
.action-button.loading {
    opacity: 0.7;
    cursor: not-allowed;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.7; }
    50% { opacity: 0.5; }
    100% { opacity: 0.7; }
}

.temp-message {
    animation: slideIn 0.3s ease-out;
    margin-bottom: 16px;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.temp-message.success {
    border-left-color: #48bb78;
    background: rgba(72, 187, 120, 0.1);
}

.temp-message.error {
    border-left-color: #f56565;
    background: rgba(245, 101, 101, 0.1);
}

.temp-message.warning {
    border-left-color: #ed8936;
    background: rgba(237, 137, 54, 0.1);
}

.temp-message.info {
    border-left-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}