/*
 * RCL Onboarding Wizard - Driver.js Custom Theme
 * ===============================================
 * Angepasst an das RCL Design System
 */

/* =============================================================================
   DRIVER.JS OVERLAY CUSTOMIZATION
   ============================================================================= */

/* Overlay Background - dunkler für besseren Kontrast */
.driver-overlay {
    background: rgba(5, 5, 12, 0.85) !important;
    backdrop-filter: blur(4px);
}

/* Highlighted Element - Glow Effect */
.driver-active-element {
    box-shadow:
        0 0 0 4px rgba(251, 133, 0, 0.4),
        0 0 30px rgba(251, 133, 0, 0.3),
        0 0 60px rgba(251, 133, 0, 0.1) !important;
    border-radius: 12px !important;
}

/* =============================================================================
   POPOVER STYLING
   ============================================================================= */

.driver-popover {
    background: linear-gradient(180deg, #1a1a2e 0%, #12121f 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 16px !important;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(251, 133, 0, 0.1) !important;
    padding: 0 !important;
    max-width: 420px !important;
    min-width: 320px !important;
    overflow: hidden;
}

/* Popover Arrow */
.driver-popover-arrow {
    border: 10px solid transparent !important;
}

.driver-popover-arrow-side-top {
    border-top-color: #1a1a2e !important;
}

.driver-popover-arrow-side-bottom {
    border-bottom-color: #1a1a2e !important;
}

.driver-popover-arrow-side-left {
    border-left-color: #1a1a2e !important;
}

.driver-popover-arrow-side-right {
    border-right-color: #1a1a2e !important;
}

/* =============================================================================
   POPOVER CONTENT
   ============================================================================= */

/* Header mit Icon */
.driver-popover-title {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 20px 24px 12px !important;
    margin: 0 !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #f0f0f5 !important;
    line-height: 1.4 !important;
}

/* Description */
.driver-popover-description {
    padding: 0 24px 20px !important;
    margin: 0 !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    color: #a0a0b0 !important;
    line-height: 1.6 !important;
}

/* =============================================================================
   PROGRESS INDICATOR
   ============================================================================= */

.driver-popover-progress-text {
    display: none !important; /* Wir nutzen custom Progress */
}

/* Custom Progress Bar (injected via JS) */
.wizard-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 24px 16px;
}

.wizard-progress-step {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wizard-progress-step.active {
    background: #FB8500;
    box-shadow: 0 0 12px rgba(251, 133, 0, 0.5);
    transform: scale(1.2);
}

.wizard-progress-step.completed {
    background: #10b981;
}

/* =============================================================================
   FOOTER / BUTTONS
   ============================================================================= */

.driver-popover-footer {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 16px 24px !important;
    background: rgba(0, 0, 0, 0.2) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
    gap: 12px !important;
}

/* Button Base */
.driver-popover-footer button {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    padding: 10px 18px !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    border: none !important;
}

/* Previous Button (Ghost) */
.driver-popover-prev-btn {
    background: transparent !important;
    color: #a0a0b0 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.driver-popover-prev-btn:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #f0f0f5 !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

/* Next Button (Primary) */
.driver-popover-next-btn {
    background: linear-gradient(135deg, #FB8500 0%, #F2295B 100%) !important;
    color: white !important;
    box-shadow: 0 4px 16px rgba(251, 133, 0, 0.3) !important;
}

.driver-popover-next-btn:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 20px rgba(251, 133, 0, 0.4) !important;
}

/* Close/Skip Button */
.driver-popover-close-btn {
    position: absolute !important;
    top: 16px !important;
    right: 16px !important;
    width: 28px !important;
    height: 28px !important;
    padding: 0 !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    color: #606070 !important;
    font-size: 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.driver-popover-close-btn:hover {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
    color: #ef4444 !important;
}

/* =============================================================================
   WELCOME SCREEN (Full-Screen Modal Style)
   ============================================================================= */

.wizard-welcome-popover .driver-popover {
    max-width: 500px !important;
    text-align: center;
}

.wizard-welcome-popover .driver-popover-title {
    justify-content: center !important;
    font-size: 24px !important;
    padding-top: 32px !important;
}

.wizard-welcome-popover .driver-popover-description {
    text-align: center;
    font-size: 15px !important;
    padding-bottom: 24px !important;
}

/* =============================================================================
   FEATURE CARDS (Inside Popover)
   ============================================================================= */

.wizard-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 0 24px 20px;
}

.wizard-feature-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 16px 12px;
    text-align: center;
    transition: all 0.2s ease;
}

.wizard-feature-card:hover {
    background: rgba(251, 133, 0, 0.08);
    border-color: rgba(251, 133, 0, 0.2);
    transform: translateY(-2px);
}

.wizard-feature-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.wizard-feature-title {
    font-size: 12px;
    font-weight: 600;
    color: #f0f0f5;
}

/* =============================================================================
   PULSE ANIMATION FOR HIGHLIGHTED ELEMENTS
   ============================================================================= */

@keyframes wizard-pulse {
    0%, 100% {
        box-shadow:
            0 0 0 4px rgba(251, 133, 0, 0.4),
            0 0 30px rgba(251, 133, 0, 0.3);
    }
    50% {
        box-shadow:
            0 0 0 8px rgba(251, 133, 0, 0.2),
            0 0 50px rgba(251, 133, 0, 0.4);
    }
}

.driver-active-element {
    animation: wizard-pulse 2s ease-in-out infinite;
}

/* =============================================================================
   COMPLETION CELEBRATION
   ============================================================================= */

.wizard-completion-popover .driver-popover {
    max-width: 460px !important;
}

.wizard-completion-icon {
    font-size: 64px;
    text-align: center;
    padding: 24px 0 8px;
    animation: wizard-bounce 0.6s ease;
}

@keyframes wizard-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.wizard-completion-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 16px 24px;
    margin: 0 24px 16px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
}

.wizard-stat {
    text-align: center;
}

.wizard-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #10b981;
}

.wizard-stat-label {
    font-size: 11px;
    color: #a0a0b0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* =============================================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================================= */

@media (max-width: 480px) {
    .driver-popover {
        max-width: calc(100vw - 32px) !important;
        min-width: auto !important;
        margin: 0 16px !important;
    }

    .driver-popover-title {
        font-size: 16px !important;
        padding: 16px 20px 10px !important;
    }

    .driver-popover-description {
        font-size: 13px !important;
        padding: 0 20px 16px !important;
    }

    .driver-popover-footer {
        padding: 12px 20px !important;
        flex-wrap: wrap;
    }

    .wizard-feature-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .wizard-feature-card {
        display: flex;
        align-items: center;
        gap: 12px;
        text-align: left;
        padding: 12px;
    }

    .wizard-feature-icon {
        margin-bottom: 0;
        font-size: 24px;
    }
}

/* =============================================================================
   KEYBOARD FOCUS STATES
   ============================================================================= */

.driver-popover-footer button:focus-visible {
    outline: 2px solid #FB8500 !important;
    outline-offset: 2px !important;
}

/* =============================================================================
   LIGHT THEME SUPPORT
   ============================================================================= */

[data-theme="light"] .driver-overlay {
    background: rgba(255, 255, 255, 0.9) !important;
}

[data-theme="light"] .driver-popover {
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fc 100%) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.15),
        0 0 40px rgba(251, 133, 0, 0.05) !important;
}

[data-theme="light"] .driver-popover-title {
    color: #0a0a12 !important;
}

[data-theme="light"] .driver-popover-description {
    color: #606070 !important;
}

[data-theme="light"] .driver-popover-arrow-side-top {
    border-top-color: #ffffff !important;
}

[data-theme="light"] .driver-popover-arrow-side-bottom {
    border-bottom-color: #ffffff !important;
}

[data-theme="light"] .wizard-progress-step {
    background: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .driver-popover-footer {
    background: rgba(0, 0, 0, 0.03) !important;
    border-top-color: rgba(0, 0, 0, 0.06) !important;
}

[data-theme="light"] .driver-popover-prev-btn {
    color: #606070 !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] .driver-popover-prev-btn:hover {
    background: rgba(0, 0, 0, 0.05) !important;
    color: #0a0a12 !important;
}