/* ShowSeeker Mobile Navigation Styles */
/* CSP Compliant Glassmorphism Design */
/* Add this to /public/mobile-nav.css or append to global.css */

/* Mobile Navigation Variables */
:root {
    --mobile-nav-width: 280px;
    --mobile-nav-bg: rgba(255, 255, 255, 0.95);
    --mobile-nav-backdrop: blur(20px);
    --mobile-nav-border: rgba(255, 255, 255, 0.3);
    --mobile-nav-shadow: 0 0 40px rgba(31, 38, 135, 0.3);
    --hamburger-size: 24px;
    --hamburger-gap: 4px;
    --transition-speed: 0.3s;
}

/* Dark mode support for admin pages */
.admin-layout {
    --mobile-nav-bg: rgba(15, 23, 42, 0.95);
    --mobile-nav-border: rgba(255, 255, 255, 0.1);
}

/* Hamburger Toggle Button */
.mobile-nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 48px;
    height: 48px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    z-index: 1001;
    position: relative;
}

.mobile-nav-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.mobile-nav-toggle:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Hamburger Lines */
.hamburger-line {
    width: var(--hamburger-size);
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all var(--transition-speed) ease;
    position: relative;
    display: block;
}

.hamburger-line:nth-child(1) {
    transform: translateY(calc(-1 * var(--hamburger-gap)));
}

.hamburger-line:nth-child(3) {
    transform: translateY(var(--hamburger-gap));
}

/* Hamburger Animation (X shape when active) */
.mobile-nav-toggle.is-active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translateY(0);
    position: absolute;
}

.mobile-nav-toggle.is-active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.mobile-nav-toggle.is-active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translateY(0);
    position: absolute;
}

/* Mobile Menu Container */
.mobile-nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: var(--mobile-nav-width);
    height: 100vh;
    background: var(--mobile-nav-bg);
    backdrop-filter: var(--mobile-nav-backdrop);
    -webkit-backdrop-filter: var(--mobile-nav-backdrop);
    border-left: 1px solid var(--mobile-nav-border);
    box-shadow: var(--mobile-nav-shadow);
    z-index: 10001;
    transition: right var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.mobile-nav-menu.is-open {
    right: 0;
}

/* Mobile Menu Header */
.mobile-nav-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.mobile-nav-logo {
    flex: 1;
}

.mobile-nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.mobile-nav-tagline {
    font-size: 0.875rem;
    color: #6b7280;
    display: block;
    margin-top: 0.25rem;
}

/* Close Button */
.mobile-nav-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    color: #4b5563;
}

.mobile-nav-close:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #dc2626;
    transform: rotate(90deg);
}

/* Mobile Menu Content */
.mobile-nav-content {
    flex: 1;
    padding: 1.5rem 0;
    overflow-y: auto;
}

.mobile-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav-item {
    margin: 0;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: #374151;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: all var(--transition-speed) ease;
    position: relative;
    overflow: hidden;
}

.mobile-nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: translateX(-100%);
    transition: transform var(--transition-speed) ease;
}

.mobile-nav-link:hover {
    background: rgba(102, 126, 234, 0.05);
    padding-left: 2rem;
}

.mobile-nav-link:hover::before {
    transform: translateX(0);
}

/* Navigation Icons */
.mobile-nav-icon {
    width: 24px;
    height: 24px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

/* Admin Badge */
.mobile-nav-badge {
    margin-left: auto;
    padding: 0.25rem 0.5rem;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Mobile Menu Footer */
.mobile-nav-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    background: rgba(0, 0, 0, 0.02);
}

.mobile-nav-user {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 10px;
    margin-bottom: 1rem;
    color: #4b5563;
    font-size: 0.875rem;
    font-weight: 500;
}

.mobile-nav-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.mobile-nav-logout:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.mobile-nav-copyright {
    text-align: center;
    color: #9ca3af;
    font-size: 0.75rem;
}

/* Overlay */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    z-index: 10000;
    pointer-events: none;
    transition: background var(--transition-speed) ease;
}

.mobile-nav-overlay.is-visible {
    background: rgba(0, 0, 0, 0.5);
    pointer-events: auto;
}

/* Empty State */
.mobile-nav-empty {
    padding: 2rem 1.5rem;
    text-align: center;
    color: #9ca3af;
    font-size: 0.875rem;
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
    .mobile-nav-toggle {
        display: flex;
    }

    /* Hide desktop navigation items on mobile */
    nav .flex.space-x-4,
    nav .flex.items-center.space-x-4,
    .admin-nav-user > span,
    nav > div > div:last-child > a:not(.mobile-nav-toggle) {
        display: none;
    }

    /* Adjust main navigation container */
    nav .flex.justify-between {
        justify-content: space-between;
    }
}

@media (max-width: 375px) {
    .mobile-nav-menu {
        width: 100%;
        max-width: var(--mobile-nav-width);
    }
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Smooth animations for menu items */
.mobile-nav-menu.is-open .mobile-nav-item {
    animation: slideInRight 0.4s ease-out backwards;
}

.mobile-nav-menu.is-open .mobile-nav-item:nth-child(1) {
    animation-delay: 0.05s;
}

.mobile-nav-menu.is-open .mobile-nav-item:nth-child(2) {
    animation-delay: 0.1s;
}

.mobile-nav-menu.is-open .mobile-nav-item:nth-child(3) {
    animation-delay: 0.15s;
}

.mobile-nav-menu.is-open .mobile-nav-item:nth-child(4) {
    animation-delay: 0.2s;
}

.mobile-nav-menu.is-open .mobile-nav-item:nth-child(5) {
    animation-delay: 0.25s;
}

/* Z-index hierarchy to work with toast system */
.mobile-nav-overlay {
    z-index: 10000;
}

.mobile-nav-menu {
    z-index: 10001;
}

#toast-container {
    z-index: 99999; /* Toasts appear above mobile menu */
}

/* Accessibility - Focus Visible */
.mobile-nav-toggle:focus-visible,
.mobile-nav-close:focus-visible,
.mobile-nav-link:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Prevent body scroll when menu is open */
body.mobile-nav-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Print styles - hide mobile navigation */
@media print {
    .mobile-nav-toggle,
    .mobile-nav-menu,
    .mobile-nav-overlay {
        display: none !important;
    }
}