/* Header Component Styles — extracted from backend/includes/header.php */

.header-nav-layer { position: relative; z-index: 50000; }
.header-sidebar-slot { width: 256px; height: 56px; }
.header-sidebar-toggle { width: 32px; height: 32px; flex-shrink: 0; }
#toggleIcon { display: inline-flex; align-items: center; justify-content: center; }
.header-logo-image { background: transparent; mix-blend-mode: normal; min-width: 80px; max-width: 160px; }
.header-logo-tooltip { z-index: 9999; }
.header-search-container { width: 280px; min-width: 240px; }
.header-search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 16px; pointer-events: none; }
.header-search-input { width: 100%; padding: 8px 36px; box-sizing: border-box; }
.header-search-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; border-radius: 50%; background-color: #e2e8f0; align-items: center; justify-content: center; cursor: pointer; border: 0; padding: 0; }
.header-search-clear:hover { background-color: #cbd5e1; }
.header-search-clear-icon { font-size: 11px; line-height: 1; }
.notif-toggle-btn { background-color: transparent; }
.notif-toggle-btn:hover { background-color: #f3f4f6; }
.impersonate-dialog { height: 520px; max-height: 90vh; }
.toast-container-layer { z-index: 99999 !important; }

@media (max-width: 640px) {
    .header-sidebar-slot {
        width: auto;
        min-width: 0;
        flex: 1 1 auto;
        padding-left: 0.5rem;
        padding-right: 0.25rem;
    }

    #headerLogo {
        min-width: 0;
    }

    .header-logo-image {
        max-width: 7rem;
    }

    .header-logo-tooltip {
        display: none;
    }

    .header-actions {
        gap: 0.125rem !important;
        margin-left: auto;
    }

    .header-quick-actions {
        gap: 0.25rem !important;
    }
}

/* Global Page Navigation Loading Overlay - Covers only main content area */
.main-content-wrapper {
    position: relative;
}
#globalPageLoadingOverlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex; /* Show by default on page load */
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}
@keyframes slideDown {
    from { transform: translateY(-10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.animate-slide-down {
    animation: slideDown 0.2s ease-out forwards;
}
.nav-center-adaptive {
    display: flex;
}
@media (max-width: 1399px) {
    .nav-center-adaptive {
        display: none !important;
    }
}

/* Notification badge blink animation (only used when notification has unread items) */
@keyframes notificationBlink {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.15);
    }
}
.notification-badge {
    animation: notificationBlink 1.2s ease-in-out infinite !important;
    will-change: opacity, transform;
}

/* Impersonate user list (only renders for Super Admin) */
.impersonate-user-item {
    transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
}
#impersonateUserList.loading-active {
    opacity: 0.6;
    pointer-events: none;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.animate-fadeIn {
    animation: fadeIn 0.3s ease-out forwards;
}
