/**
 * Admin Mode Styles
 * Visual indicators and styles for admin users
 */

/* Ensure ALL parent containers allow overflow for admin borders */
.header-right:has(.admin-mode),
header:has(.admin-mode),
.header:has(.admin-mode) {
    overflow: visible !important;
}

/* Force visible overflow on mobile header */
@media (max-width: 768px) {
    header.admin-mode,
    .header.admin-mode,
    header:has(.admin-mode),
    .header:has(.admin-mode) {
        overflow: visible !important;
        min-height: fit-content !important;
    }
}

/* Ensure parent container doesn't clip borders */
.user-menu.admin-mode,
.user-menu:has(.admin-mode) {
    overflow: visible !important;
}

/* Admin gold border for user menu button */
.user-menu-toggle.admin-mode {
    border: 1px solid #FFD700 !important;
    /* Use inset shadow as backup border (won't be clipped) */
    box-shadow:
        inset 0 0 0 1px #FFD700,
        0 0 8px rgba(255, 215, 0, 0.3),
        0 0 15px rgba(255, 215, 0, 0.15) !important;
    position: relative;
    overflow: visible !important;
    z-index: 100;
    /* Use outline as additional visible border */
    outline: 1px solid #FFD700 !important;
    outline-offset: 0px !important;
}

/* Admin badge/indicator */
.user-menu-toggle.admin-mode::before {
    content: '★';
    position: absolute;
    top: -3px;
    right: -3px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: bold;
    border: 1.5px solid var(--bg-primary);
    z-index: 10;
    animation: adminPulse 2s ease-in-out infinite;
}

/* Pulse animation for admin badge */
@keyframes adminPulse {
    0%, 100% {
        box-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
    }
    50% {
        box-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
    }
}

/* Admin indicator in dropdown */
.user-dropdown.admin-mode::before {
    content: 'ADMIN MODE';
    display: block;
    padding: 8px 16px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
    font-weight: bold;
    font-size: 11px;
    letter-spacing: 1px;
    text-align: center;
    border-radius: 6px 6px 0 0;
    margin: -8px -8px 8px -8px;
}

/* Admin avatar glow */
.user-avatar.admin-mode {
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.6) !important;
    border: 2px solid #FFD700 !important;
}

/* Admin menu items styling */
.admin-menu-section {
    border-top: 2px solid #FFD700;
    padding-top: 8px;
    margin-top: 8px;
}

.admin-menu-section .admin-menu-title {
    padding: 8px 16px;
    color: #FFD700;
    font-weight: bold;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-primary);
}

.admin-menu-item:hover {
    background: rgba(255, 215, 0, 0.1);
    color: #FFD700;
}

.admin-menu-item svg {
    width: 18px;
    height: 18px;
    color: #FFD700;
}

/* Admin panel badge */
.admin-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.admin-badge svg {
    width: 12px;
    height: 12px;
}

/* Subtle admin background glow */
body.admin-mode {
    background-image: radial-gradient(circle at top right, rgba(255, 215, 0, 0.03), transparent 50%);
}

/* Admin notification badge */
.admin-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
    font-weight: bold;
    z-index: 9999;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    /* Ensure parent containers don't clip borders on mobile */
    .user-menu.admin-mode,
    .user-menu:has(.admin-mode) {
        overflow: visible !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Remove top/bottom margin, keep overflow visible */
    .user-menu-toggle.admin-mode {
        margin: 0 !important;
        overflow: visible !important;
    }

    /* Remove header padding on mobile */
    .header-right.admin-mode {
        overflow: visible !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    /* Remove avatar margins */
    .user-avatar.admin-mode {
        margin: 0 !important;
    }

    /* Thinner border and smaller glow on mobile */
    .user-menu-toggle.admin-mode {
        border-width: 0.5px !important;
        outline-width: 0.5px !important;
        box-shadow:
            inset 0 0 0 0.5px #FFD700,
            0 0 5px rgba(255, 215, 0, 0.25) !important;
    }

    /* Smaller star badge on mobile */
    .user-menu-toggle.admin-mode::before {
        top: -2px;
        right: -2px;
        width: 12px;
        height: 12px;
        font-size: 7px;
        border-width: 0.5px;
    }

    .admin-notification {
        top: 60px;
        right: 10px;
        left: 10px;
        text-align: center;
        font-size: 12px;
        padding: 10px 16px;
    }
}

/* Console log styling for admin */
.admin-log {
    color: #FFD700;
    font-weight: bold;
}
