/* Admin Navigation Styles */
/* Extracted from admin_nav.php and other includes files */

/* Top Bar Styles */
.admin-top-bar {
    background: linear-gradient(135deg, #1b34a3 0%, #370985 100%);
    color: white;
    padding: 12px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1002;
}

.admin-top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1600px !important;
    margin: 0 auto;
    padding: 0 20px;
}

.admin-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-logo-img {
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px;
}

.admin-logo-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    margin: 0;
}

.event-name {
    font-weight: 300;
    opacity: 0.9;
    font-size: 1.4rem;
}

/* Hide mobile elements on desktop */
.mobile-menu-toggle {
    display: none;
}

.mobile-event-name {
    display: none;
}

.frontend-link {
    color: white;
    text-decoration: none;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 4px;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 500;
    letter-spacing: 0.3px;
}

.frontend-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-separator {
    height: 20px;
    width: 1px;
    background-color: rgba(255, 255, 255, 0.3);
    margin: 0 4px;
}

.user-name {
    font-weight: 500;
    font-size: 0.95rem;
}

.user-role-badge {
    background: rgba(255,255,255,0.2);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.logout-btn {
    color: white;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: background-color 0.2s;
    border: 1px solid rgba(255,255,255,0.3);
}

.logout-btn:hover {
    background: rgba(255,255,255,0.1);
}

/* Main Navigation Bar Styles */
.admin-nav-bar {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: relative;
    z-index: 999;
    transition: all 0.3s ease;
    width: 100%;
}

/* Enhanced sticky state */
.admin-nav-bar.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    z-index: 1000;
}

/* Add padding to body when nav is sticky to prevent content jumping */
body.nav-sticky {
    padding-top: 60px; /* Approximate height of nav bar */
}

/* Icon Styles */
.nav-link i,
.dropdown-item i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
    font-size: 14px;
    color: #001b42;
}

.dropdown-toggle i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
    font-size: 14px;
    color: #001b42;
}

/* Active state icon colors */
.nav-link.active i,
.dropdown-item.active i,
.nav-dropdown.active > .dropdown-toggle i {
    color: #3b82f6;
}

/* Hover state icon colors */
.nav-link:hover i,
.dropdown-item:hover i,
.dropdown-toggle:hover i {
    color: #3b82f6;
}

.admin-nav-container {
    max-width: 1600px !important;
    margin: 0 auto;
    padding: 0 20px;
}

.main-nav {
    display: flex;
    gap: 0;
}

.nav-link {
    color: #64748b;
    text-decoration: none;
    padding: 16px 20px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
    position: relative;
}

.nav-link:hover {
    color: #3b82f6;
    background: #f8fafc;
}

.nav-link.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
    background: #f8fafc;
}

/* Dropdown Navigation Styles */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #64748b;
    text-decoration: none;
    padding: 16px 20px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
}

.dropdown-toggle:hover {
    color: #3b82f6;
    background: #f8fafc;
}

.dropdown-arrow {
    font-size: 0.8rem;
    transition: transform 0.2s ease;
    margin-left: 4px;
}

.nav-dropdown:hover .dropdown-arrow,
.nav-dropdown.mobile-open .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    min-width: 240px;
    z-index: 1001; /* Higher than sticky nav */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 2px;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.show .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 12px 16px;
    color: #64748b;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    border-bottom: 1px solid #f1f5f9;
}

.dropdown-item:last-child {
    border-bottom: none;
    border-radius: 0 0 8px 8px;
}

.dropdown-item:first-child {
    border-radius: 8px 8px 0 0;
}

.dropdown-item:hover {
    background: #f8fafc;
    color: #3b82f6;
    padding-left: 20px;
}

.dropdown-item.active {
    background: #eff6ff;
    color: #3b82f6;
    border-left: 3px solid #3b82f6;
}

.nav-dropdown.active > .nav-link {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
    background: #f8fafc;
}

/* Content spacing adjustment */
.admin-content {
    margin-top: 20px;
    max-width: 1600px !important;
    margin: 0 auto;
    padding: 2rem 20px 60px 20px;
    min-height: calc(100vh - 140px);
}

/* Legacy Header Styles (from header.php) */
.admin-header {
    background: white;
    padding: 20px 0;
    border-bottom: 1px solid var(--slate-200);
    margin-bottom: 32px;
}

.admin-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1600px !important;
    margin: 0 auto;
    padding: 0 20px;
}

.admin-nav h1 {
    margin: 0;
    color: var(--slate-800);
}

.admin-nav .nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.admin-nav .nav-links a {
    color: var(--slate-600);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s;
}

.admin-nav .nav-links a:hover {
    background: var(--slate-100);
    color: var(--slate-800);
}

.admin-nav .nav-links a.active {
    background: var(--indigo-100);
    color: var(--indigo-700);
}

/* Legacy Navigation Styles (from navigation.php) */
.header {
    background: linear-gradient(135deg, #1b34a3 0%, #370985 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1600px !important;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.nav-content {
    max-width: 1600px !important;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    gap: 0;
}

.nav-item {
    color: #64748b;
    text-decoration: none;
    padding: 1rem 1.5rem;
    font-weight: 500;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-item:hover {
    color: #3b82f6;
    background: #f8fafc;
}

.nav-item.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
    background: #f8fafc;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .admin-top-nav {
        padding: 0 15px;
        flex-wrap: wrap;
        min-height: 60px;
    }
    
    .admin-logo {
        font-size: 1.2rem;
        flex: 1;
        min-width: 0;
    }
    
    .admin-logo-text {
        font-size: 1.2rem;
    }
    
    .event-name {
        display: none; /* Hide on mobile */
    }
    
    .mobile-event-name {
        display: block;
        margin-top: 2px;
    }
    
    .mobile-event-text {
        font-size: 0.8rem;
        font-weight: 300;
        opacity: 0.8;
        color: white;
        display: block;
        line-height: 1.2;
    }
    
    .user-info {
        gap: 6px;
        order: 2;
        width: 100%;
        justify-content: flex-end;
        margin-top: 8px;
        padding-top: 8px;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .user-name {
        display: none;
    }
    
    .frontend-link {
        font-size: 0.7rem;
        padding: 3px 8px;
    }
    
    .user-role-badge {
        font-size: 0.7rem;
        padding: 3px 6px;
    }
    
    .logout-btn {
        font-size: 0.8rem;
        padding: 4px 8px;
    }
    
    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 30px;
        height: 30px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
        margin-left: 10px;
        order: 1;
        position: relative;
        z-index: 1003;
    }
    
    .hamburger-line {
        width: 20px;
        height: 2px;
        background-color: white;
        margin: 2px 0;
        transition: all 0.3s ease;
        border-radius: 1px;
    }
    
    .mobile-menu-toggle.active .hamburger-line:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-toggle.active .hamburger-line:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active .hamburger-line:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .main-nav {
        position: fixed;
        top: 100px;
        left: 0;
        right: 0;
        background: white;
        border-bottom: 1px solid #e2e8f0;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        z-index: 1002;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        flex-direction: column;
        padding: 0;
        pointer-events: auto;
    }
    
    .main-nav.mobile-open {
        max-height: 80vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        pointer-events: auto;
    }
    
    /* Ensure all mobile menu elements are clickable */
    .main-nav.mobile-open * {
        pointer-events: auto !important;
    }
    
    .main-nav::-webkit-scrollbar { /* WebKit */
        display: none;
    }
    
    /* Ensure sticky behavior works well on mobile */
    .admin-nav-bar.sticky {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
    }
    
    /* Adjust body padding for mobile when nav is sticky */
    body.nav-sticky {
        padding-top: 70px; /* Slightly more padding for mobile */
    }
    
    .nav-link {
        display: flex;
        align-items: center;
        padding: 16px 20px;
        font-size: 0.95rem;
        border-bottom: 1px solid #f1f5f9;
        width: 100%;
        text-align: left;
        color: #64748b !important;
        background: white;
        text-decoration: none;
        pointer-events: auto;
        position: relative;
        z-index: 1003;
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }
    
    .nav-link:hover {
        color: #3b82f6 !important;
        background: #f8fafc;
    }
    
    .nav-link.active {
        color: #3b82f6 !important;
        background: #f8fafc;
    }
    
    .nav-link i {
        margin-right: 12px;
        width: 20px;
        text-align: center;
        color: #64748b;
    }
    
    .nav-link:hover i,
    .nav-link.active i {
        color: #3b82f6;
    }
    
    .nav-dropdown {
        display: block;
        width: 100%;
    }
    
    .dropdown-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 20px;
        font-size: 0.95rem;
        border-bottom: 1px solid #f1f5f9;
        width: 100%;
        text-align: left;
        background: white;
        border: none;
        cursor: pointer;
        color: #64748b !important;
        pointer-events: auto;
        position: relative;
        z-index: 1003;
    }
    
    .dropdown-toggle:hover {
        color: #3b82f6 !important;
        background: #f8fafc;
    }
    
    .dropdown-toggle i {
        margin-right: 12px;
        width: 20px;
        text-align: center;
        color: #64748b;
    }
    
    .dropdown-toggle:hover i {
        color: #3b82f6;
    }
    
    .dropdown-arrow {
        font-size: 0.8rem;
        transition: transform 0.2s ease;
        margin-left: auto;
        pointer-events: none;
        position: relative;
        z-index: 1003;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        border-left: 3px solid #e2e8f0;
        margin: 0;
        padding: 0;
        display: none;
        z-index: 1003;
        background: #f8fafc;
        pointer-events: auto;
    }
    
    .nav-dropdown.mobile-open .dropdown-menu {
        display: block;
    }
    
    .nav-dropdown.mobile-open .dropdown-arrow {
        transform: rotate(180deg);
    }
    
    .dropdown-item {
        padding: 12px 20px 12px 40px;
        border-bottom: 1px solid #e2e8f0;
        color: #64748b !important;
        background: #f8fafc;
        text-decoration: none;
        display: flex;
        align-items: center;
        pointer-events: auto;
        position: relative;
        z-index: 1003;
    }
    
    .dropdown-item:hover {
        color: #3b82f6 !important;
        background: #eff6ff;
    }
    
    .dropdown-item.active {
        color: #3b82f6 !important;
        background: #eff6ff;
    }
    
    .dropdown-item:last-child {
        border-bottom: none;
    }
    
    .dropdown-item i {
        margin-right: 12px;
        width: 16px;
        text-align: center;
        color: #64748b;
    }
    
    .dropdown-item:hover i,
    .dropdown-item.active i {
        color: #3b82f6;
    }
    
    .admin-nav-container {
        padding: 0;
    }
    
    /* Adjust body padding when mobile menu is open */
    body.mobile-menu-open {
        overflow: hidden;
    }
    
    /* Mobile menu overlay - disabled to prevent click interference */
    .main-nav.mobile-open::before {
        display: none;
    }
    
    .header-content {
        padding: 0 1rem;
    }
    
    .nav-content {
        padding: 0 1rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-item {
        white-space: nowrap;
        padding: 1rem;
    }
}

/* Additional Common Styles from header.php */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-title {
    font-size: 2rem;
    color: #2c3e50;
    margin: 0;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 2rem;
}

.card-header {
    background: #f8f9fa;
    padding: 1.5rem;
    border-bottom: 1px solid #dee2e6;
}

.card-title {
    margin: 0;
    color: #2c3e50;
}

.card-body {
    padding: 1.5rem;
}

.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Additional Styles from navigation.php */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.badge-primary {
    background: #cce7ff;
    color: #004085;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Mobile responsive adjustments for navigation.php styles */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-content {
        flex-wrap: wrap;
    }
}
