/* ============================================================
   DRIVER REQUIRED MODAL - Enterprise-Grade Styling
   Inspired by Microsoft/Adobe installer UX patterns
   ============================================================ */

.driver-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-in-out;
}

.driver-modal-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.4s ease-out;
}

/* Header Section */
.driver-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    text-align: center;
    border-radius: 12px 12px 0 0;
}

.driver-modal-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.icon-success {
    color: #10b981;
    animation: scaleIn 0.5s ease-out;
}

.icon-warning {
    color: #f59e0b;
    animation: pulse 2s infinite;
}

.icon-loading {
    display: inline-block;
    animation: rotate 1s linear infinite;
}

.driver-modal-header h2 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 600;
}

/* Body Section */
.driver-modal-body {
    padding: 2rem;
}

.message-checking,
.message-error,
.message-success {
    text-align: center;
    margin-bottom: 1.5rem;
}

.message-error strong,
.message-success strong {
    font-size: 1.2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.missing-drivers-list {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.missing-drivers-list ul {
    margin: 0.5rem 0 0 0;
    padding-left: 1.5rem;
}

.missing-drivers-list li {
    color: #dc2626;
    font-family: 'Courier New', monospace;
    margin: 0.25rem 0;
}

/* Instructions */
.instructions {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.instructions h3 {
    margin: 0 0 1rem 0;
    color: #0369a1;
    font-size: 1.1rem;
}

.instructions ol {
    margin: 0;
    padding-left: 1.5rem;
}

.instructions li {
    margin: 0.5rem 0;
    line-height: 1.6;
}

/* Progress Components */
.progress-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e5e7eb;
    border-top-color: #667eea;
    border-radius: 50%;
    margin: 1rem auto;
    animation: rotate 1s linear infinite;
}

.download-progress {
    margin: 1.5rem 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease-out;
}

.progress-text {
    text-align: center;
    font-weight: 600;
    color: #667eea;
}

.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    color: #dc2626;
    text-align: center;
}

/* Actions Section */
.driver-modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.driver-modal-actions .btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.btn-secondary:hover:not(:disabled) {
    background: #e5e7eb;
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.driver-modal-actions .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Footer Section */
.driver-modal-footer {
    background: #f9fafb;
    padding: 1rem;
    text-align: center;
    border-radius: 0 0 12px 12px;
    border-top: 1px solid #e5e7eb;
}

.footer-text {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 640px) {
    .driver-modal-container {
        width: 95%;
        margin: 1rem;
    }

    .driver-modal-header {
        padding: 1.5rem;
    }

    .driver-modal-header h2 {
        font-size: 1.5rem;
    }

    .driver-modal-body {
        padding: 1.5rem;
    }

    .driver-modal-actions {
        flex-direction: column;
    }

    .driver-modal-actions .btn {
        width: 100%;
    }
}
