/* Lusaka Eye Hospital - Navigation Bar & Top Utility Bar
   Design Language: LEH Portal Style (Slate-50, Blue-600, border-slate-200, Inter)
*/

/* Top Utility Bar */
.top-bar {
    background-color: #f8fafc;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1.25rem;
    gap: 1rem;
}

.top-bar-left, .top-bar-right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.top-bar-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 500;
}

.top-bar-item i {
    color: var(--primary-color);
    font-size: 0.95rem;
}

.emergency-tag {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.775rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.emergency-tag a {
    color: #dc2626;
}

.emergency-tag:hover {
    background-color: #fee2e2;
}

/* Discrete Staff Portal Link (matches portal secondary button style) */
.staff-portal-link {
    color: #475569;
    font-size: 0.775rem;
    padding: 0.3rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.staff-portal-link:hover {
    color: var(--primary-color);
    border-color: var(--border-hover);
    background: #eff6ff;
    transform: translateY(-1px);
}

.staff-portal-link i {
    font-size: 0.9rem;
    color: var(--primary-color);
}

/* Main Application Header */
.app-header {
    height: 70px;
    border-bottom: 1px solid var(--border-color);
    background-color: #ffffff;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    transition: box-shadow 0.2s ease;
}

.app-header.scrolled {
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
    width: 100%;
    flex-wrap: nowrap;
}

.logo-link {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo-img {
    height: 46px;
    width: auto;
    max-width: 260px;
    object-fit: contain;
}

@media (min-width: 768px) {
    .logo-img {
        height: 50px;
        max-width: 290px;
    }
}

/* Desktop Nav Links - Never Wrap */
.desktop-nav {
    display: none;
    flex-shrink: 0;
}

@media (min-width: 992px) {
    .desktop-nav {
        display: flex;
        align-items: center;
        flex-shrink: 0;
    }

    .nav-list {
        display: flex;
        align-items: center;
        list-style: none;
        gap: clamp(0.5rem, 1.1vw, 1.4rem);
        margin: 0;
        padding: 0;
        flex-wrap: nowrap;
    }

    .nav-item {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .nav-link {
        font-size: clamp(0.85rem, 0.9vw, 0.925rem);
        font-weight: 500;
        color: #475569;
        padding: 0.5rem 0;
        position: relative;
        white-space: nowrap;
        display: inline-block;
        transition: color 0.2s ease;
    }

    .nav-link:hover, .nav-link.active {
        color: var(--primary-color);
    }

    .nav-link::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 0;
        width: 0%;
        height: 2px;
        background-color: var(--primary-color);
        border-radius: 2px;
        transition: width 0.2s ease;
    }

    .nav-link:hover::after, .nav-link.active::after {
        width: 100%;
    }
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* Portal-style Blue-600 Appointment Button */
.btn-appointment {
    display: none;
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 0.65rem 1.35rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    align-items: center;
    gap: 0.45rem;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    border: 1px solid var(--primary-color);
    transition: var(--transition);
    flex-shrink: 0;
}

.btn-appointment:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

@media (min-width: 640px) {
    .btn-appointment {
        display: inline-flex;
    }
}

.mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition);
}

.mobile-menu-btn:hover {
    background: #f8fafc;
    color: var(--primary-color);
    border-color: var(--border-hover);
}

.mobile-menu-btn i {
    font-size: 1.4rem;
}

@media (min-width: 992px) {
    .mobile-menu-btn {
        display: none;
    }
}

/* Mobile Drawer (Portal Drawer Layout) */
.drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.drawer-backdrop.is-open {
    opacity: 1;
    visibility: visible;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 320px;
    height: 100%;
    background: #ffffff;
    border-left: 1px solid var(--border-color);
    box-shadow: -4px 0 24px rgba(15, 23, 42, 0.12);
    z-index: 999;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    padding: 1.25rem;
}

.mobile-drawer.is-open {
    right: 0;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.drawer-logo {
    height: 38px;
    width: auto;
    object-fit: contain;
}

.drawer-close-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: #f8fafc;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    cursor: pointer;
    transition: var(--transition);
}

.drawer-close-btn:hover {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fca5a5;
}

.drawer-nav {
    margin: 1.25rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.drawer-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
    border-radius: var(--radius-md);
    color: #334155;
    font-weight: 500;
    font-size: 0.925rem;
    transition: var(--transition);
}

.drawer-nav-item i {
    font-size: 1.25rem;
    color: var(--primary-color);
    width: 24px;
    text-align: center;
}

.drawer-nav-item:hover, .drawer-nav-item:active {
    background-color: #eff6ff;
    color: var(--primary-color);
}

.drawer-footer {
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.drawer-btn-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.85rem;
    background-color: var(--primary-color);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.925rem;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.drawer-btn-emergency {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    padding: 0.75rem;
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 700;
    text-align: center;
}

.drawer-staff-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    color: var(--text-light);
    font-size: 0.8125rem;
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: #f8fafc;
    font-weight: 600;
}

.drawer-staff-link:hover {
    color: var(--primary-color);
    border-color: var(--border-hover);
    background-color: #eff6ff;
}

@media (max-width: 640px) {
    .top-bar-item.hide-mobile {
        display: none;
    }
}
