/* ==========================================================
   menu.css — Facebook-style two-row header
   ========================================================== */

/* Header Container */
.ey-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* Body padding for fixed header */
body {
    padding-top: 88px !important;
}

/* ==================== ROW 1: Logo + Icons ==================== */
.ey-header__row1 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    border-bottom: 1px solid #f0f0f0;
}

/* Brand: Logo + Title */
.ey-header__brand {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #1877f2;
}

.ey-header__logo {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    object-fit: cover;
}

.ey-header__title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

/* Icon buttons group */
.ey-header__icons {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ey-header__icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f0f2f5;
    color: #050505;
    text-decoration: none;
    transition: background 0.15s;
}

.ey-header__icon:hover {
    background: #e4e6e9;
}

.ey-header__icon svg {
    width: 20px;
    height: 20px;
}

/* Badge for counts */
.ey-header__badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #e41e3f;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    border: 2px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==================== ROW 2: Navigation Tabs ==================== */
.ey-header__row2 {
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    padding: 0 4px;
}

.ey-header__tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 8px 4px;
    text-decoration: none;
    color: #65676b;
    font-size: 10px;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.15s;
    position: relative;
}

.ey-header__tab svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.8;
}

.ey-header__tab span {
    line-height: 1;
}

.ey-header__tab:hover {
    background: #f0f2f5;
    border-radius: 8px 8px 0 0;
}

.ey-header__tab.active {
    color: #1877f2;
    border-bottom-color: #1877f2;
}

.ey-header__tab.active svg {
    stroke: #1877f2;
}

/* ==================== User Dropdown Tab ==================== */
.ey-header__user-tab {
    position: relative;
}

.ey-header__user-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: none;
    border: none;
    padding: 8px 4px;
    color: #65676b;
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
}

.ey-header__user-btn img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.ey-header__user-btn svg {
    display: none;
}

/* Dropdown menu - opens DOWNWARD */
.ey-header__dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 180px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    padding: 8px 0;
    margin-top: 4px;
    z-index: 10000;
}

.ey-header__dropdown::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 0;
    right: 0;
    height: 8px;
}

.ey-header__dropdown a {
    display: block;
    padding: 10px 16px;
    color: #050505;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.ey-header__dropdown a:hover {
    background: #f0f2f5;
}

.ey-header__dropdown hr {
    margin: 8px 0;
    border: none;
    border-top: 1px solid #e4e6e9;
}

.ey-header__user-tab:hover .ey-header__dropdown,
.ey-header__user-tab:focus-within .ey-header__dropdown {
    display: block;
}

/* ==================== Responsive ==================== */
@media (max-width: 480px) {
    body {
        padding-top: 72px !important;
    }
    
    .ey-header__row1 {
        padding: 4px 8px;
    }
    
    .ey-header__logo {
        width: 22px;
        height: 22px;
    }
    
    .ey-header__title {
        font-size: 15px;
    }
    
    .ey-header__icon {
        width: 30px;
        height: 30px;
    }
    
    .ey-header__icon svg {
        width: 16px;
        height: 16px;
    }
    
    /* Compact navigation tabs */
    .ey-header__row2 {
        padding: 0;
    }
    
    .ey-header__tab {
        padding: 3px 1px;
        gap: 0;
    }
    
    .ey-header__tab svg {
        width: 18px;
        height: 18px;
    }
    
    .ey-header__tab span {
        font-size: 10px;
    }
    
    .ey-header__user-btn {
        padding: 3px 1px;
    }
    
    .ey-header__user-btn img {
        width: 20px;
        height: 20px;
    }
}

/* Dropdown positioning fix for all screens */
.ey-header__dropdown {
    position: fixed !important;
    top: 72px !important;
    right: 10px !important;
    left: auto !important;
    bottom: auto !important;
    min-width: 200px;
    max-width: 280px;
}

@media (min-width: 481px) {
    .ey-header__dropdown {
        top: 88px !important;
    }
}

@media (min-width: 768px) {
    .ey-header__dropdown {
        position: absolute !important;
        top: 100% !important;
        right: 0 !important;
        left: auto !important;
        margin-top: 8px;
    }
}

/* Desktop: compact header */
@media (min-width: 768px) {
    body {
        padding-top: 56px !important;
    }
    
    .ey-header__row1 {
        padding: 2px 16px !important;
    }
    
    .ey-header__logo {
        width: 24px;
        height: 24px;
    }
    
    .ey-header__title {
        font-size: 16px;
    }
    
    .ey-header__icon {
        width: 30px;
        height: 30px;
    }
    
    .ey-header__icon svg {
        width: 16px;
        height: 16px;
    }
    
    .ey-header__row2 {
        max-width: 680px;
        margin: 0 auto;
    }
    
    .ey-header__tab {
        flex-direction: row;
        gap: 4px;
        font-size: 12px;
        padding: 2px 6px !important;
        border-bottom-width: 2px;
    }
    
    .ey-header__tab svg {
        width: 16px;
        height: 16px;
    }
    
    .ey-header__user-btn {
        flex-direction: row;
        gap: 4px;
        font-size: 12px;
        padding: 2px 6px !important;
    }
    
    .ey-header__user-btn img {
        width: 20px;
        height: 20px;
    }
    
    .ey-header__user-btn svg {
        display: block;
    }
}

/* ==========================================================
   Logout Modal (unchanged)
   ========================================================== */
.logout-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logout-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.logout-modal-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 28px 32px;
    max-width: 360px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    text-align: center;
    animation: modalSlideIn 0.2s ease;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: scale(0.95) translateY(-10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.logout-modal-content h3 {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 700;
    color: #111827;
}

.logout-modal-content p {
    margin: 0 0 24px;
    font-size: 15px;
    color: #6b7280;
}

.logout-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.logout-modal-cancel,
.logout-modal-confirm {
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
}

.logout-modal-cancel {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: #374151;
}

.logout-modal-cancel:hover {
    background: #e5e7eb;
}

.logout-modal-confirm {
    background: #dc2626;
    border: none;
    color: #fff;
}

.logout-modal-confirm:hover {
    background: #b91c1c;
}
