/* ============================================
   Mock Exam Access Control Styling
   ============================================ */

/* Locked menu item */
.menu-link--locked {
    opacity: 0.5;
    cursor: not-allowed !important;
    position: relative;
}

.menu-link--locked:hover {
    background: rgba(var(--theme-color-rgb), 0.05) !important;
}

.menu-lock-icon {
    margin-left: 0.75rem;
    opacity: 0.8;
    vertical-align: middle;
    display: inline-block;
}

.menu-lock-icon--locked {
    stroke: #dc3545 !important;
}

.menu-lock-icon--unlocked {
    stroke: #28a745 !important;
}

/* Tooltip on hover - for regular menu links */
.menu-link--locked:not(.has-submenu)::after {
    content: 'Complete requirements to unlock';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    margin-left: 0.75rem;
    z-index: 1000;
}

.menu-link--locked:not(.has-submenu):hover::after {
    opacity: 1;
}

/* Tooltip for locked submenu items (HTML element) */
.menu-locked-tooltip {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    visibility: hidden;
    opacity: 0;
    background: #1a1a1a;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: normal;
    line-height: 1.4;
    font-weight: normal;
    z-index: 99999;
    margin-top: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: opacity 0.2s, visibility 0.2s;
}

.left .has-submenu.menu-link--locked:hover .menu-locked-tooltip,
.has-submenu.menu-link--locked:hover .menu-locked-tooltip {
    visibility: visible !important;
    opacity: 1 !important;
}

/* ============================================
   Dashboard Congratulations Banner
   ============================================ */

.mock-unlocked-banner {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-radius: 8px;
}

.success-icon {
    stroke: #10b981;
    margin-bottom: 1.5rem;
    animation: checkmark-bounce 0.6s ease-in-out;
}

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

.mock-unlocked-banner h3 {
    font-size: 1.75rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 700;
}

.congratulations-text {
    font-size: 1.1rem;
    color: #6c757d;
    margin-bottom: 2rem;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn--large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 12px rgba(54, 139, 193, 0.3);
    transition: all 0.3s ease;
    text-decoration: none;
    border-radius: 8px;
    max-width: 100%;
    box-sizing: border-box;
}

.btn--large:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(54, 139, 193, 0.4);
}

.help-text {
    margin-top: 1.5rem;
    color: #95a5a6;
    font-size: 0.95rem;
    font-style: italic;
}

/* Lock icon inline with title */
.lock-icon-inline {
    vertical-align: middle;
    margin-left: 0.5rem;
    opacity: 0.6;
    stroke: #f39c12;
}

/* ============================================
   Requirements Checklist (Locked State)
   ============================================ */

.requirements-checklist {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
}

.requirement-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: #f8f9fa;
    border-radius: 6px;
    gap: 0.75rem;
    border-left: 4px solid #dee2e6;
    transition: all 0.2s ease;
}

.requirement-item.requirement-met {
    background: #d4edda;
    border-left-color: #28a745;
}

.requirement-icon {
    width: 20px;
    height: 20px;
    stroke: #6c757d;
    flex-shrink: 0;
}

.requirement-met .requirement-icon {
    stroke: #28a745;
}

.requirement-progress {
    margin-left: auto;
    font-weight: 600;
    color: #495057;
    font-size: 0.875rem;
}

/* ============================================
   Mobile Responsive
   ============================================ */

@media (max-width: 768px) {
    .mock-unlocked-banner {
        padding: 1.5rem 1rem;
    }

    .mock-unlocked-banner h3 {
        font-size: 1.5rem;
    }

    .congratulations-text {
        font-size: 1rem;
        padding: 0 0.5rem;
    }

    .btn--large {
        padding: 0.875rem 0.75rem;
        font-size: 0.95rem;
        width: 100%;
        display: flex;
        justify-content: center;
        white-space: normal;
        text-align: center;
    }

    .menu-link--locked::after,
    .menu-locked-tooltip {
        display: none !important; /* Hide tooltip on mobile */
    }
}

@media (max-width: 480px) {
    .mock-unlocked-banner {
        padding: 1.5rem 1rem;
    }

    .success-icon {
        width: 48px;
        height: 48px;
    }

    .mock-unlocked-banner h3 {
        font-size: 1.25rem;
    }
}

/* ============================================
   DARK MODE STYLES
   ============================================ */

/* Manual dark mode */
html.dark-mode .mock-unlocked-banner {
    background: linear-gradient(135deg, #1a2e1a 0%, #1e3a1e 100%) !important;
}

html.dark-mode .mock-unlocked-banner h3 {
    color: #86efac !important;
}

html.dark-mode .congratulations-text {
    color: #9ca3af !important;
}

html.dark-mode .help-text {
    color: #6b7280 !important;
}

html.dark-mode .requirement-item {
    background: #22262e !important;
    border-left-color: #4b5563 !important;
}

html.dark-mode .requirement-item.requirement-met {
    background: #1a2e1a !important;
    border-left-color: #22c55e !important;
}

html.dark-mode .requirement-icon {
    stroke: #9ca3af !important;
}

html.dark-mode .requirement-met .requirement-icon {
    stroke: #22c55e !important;
}

html.dark-mode .requirement-progress {
    color: #d1d5db !important;
}

html.dark-mode .menu-link--locked::after,
html.dark-mode .menu-locked-tooltip {
    background: rgba(30, 30, 30, 0.95) !important;
}

/* Auto dark mode */
@media (prefers-color-scheme: dark) {
    html.dark-mode-auto .mock-unlocked-banner {
        background: linear-gradient(135deg, #1a2e1a 0%, #1e3a1e 100%) !important;
    }

    html.dark-mode-auto .mock-unlocked-banner h3 {
        color: #86efac !important;
    }

    html.dark-mode-auto .congratulations-text {
        color: #9ca3af !important;
    }

    html.dark-mode-auto .help-text {
        color: #6b7280 !important;
    }

    html.dark-mode-auto .requirement-item {
        background: #22262e !important;
        border-left-color: #4b5563 !important;
    }

    html.dark-mode-auto .requirement-item.requirement-met {
        background: #1a2e1a !important;
        border-left-color: #22c55e !important;
    }

    html.dark-mode-auto .requirement-icon {
        stroke: #9ca3af !important;
    }

    html.dark-mode-auto .requirement-met .requirement-icon {
        stroke: #22c55e !important;
    }

    html.dark-mode-auto .requirement-progress {
        color: #d1d5db !important;
    }

    html.dark-mode-auto .menu-link--locked::after,
    html.dark-mode-auto .menu-locked-tooltip {
        background: rgba(30, 30, 30, 0.95) !important;
    }
}
