/* =========================================================================
   LIFEBOOK - TOP NAVIGATION BAR (FACEBOOK STYLE)
   ========================================================================= */

header.top-nav-bar {
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    height: 56px;
}

.top-bar-inner {
    max-width: 100%;
    margin: 0 auto;
    height: 100%;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* LEFT COLUMN: BRAND LOGO & SEARCH PILL (width: ~320px) */
.brand-section {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    min-width: 200px;
    max-width: 320px;
}

.fb-brand-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
}

/* Icon tròn L */
.fb-brand-circle {
    width: 38px;
    height: 38px;
    background: #1877f2;
    color: #ffffff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 900;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    box-shadow: 0 2px 5px rgba(24, 119, 242, 0.3);
    transition: transform 0.15s ease;
    line-height: 1;
    padding-bottom: 2px;
    flex-shrink: 0;
}

/* Logo icon L chỉ hiện trên mobile */
.fb-brand-circle.mobile-only-logo {
    display: none !important;
}

/* Text Logo "Lifebook" phong cách Facebook trên Laptop / Desktop */
.fb-brand-text {
    font-size: 1.45rem;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: -0.5px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    display: inline-block !important;
    transition: opacity 0.15s;
}

.fb-brand-link:hover .fb-brand-text {
    opacity: 0.9;
}

@media (max-width: 768px) {
    .fb-brand-circle.mobile-only-logo {
        display: inline-flex !important;
    }
    .fb-brand-text {
        display: none !important;
    }
}

/* Facebook search pill */
.fb-search-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f0f2f5;
    border-radius: 50px;
    padding: 0 14px;
    height: 38px;
    flex: 1;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.fb-search-pill:focus-within {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.2);
}

.fb-search-pill .search-icon {
    color: #65676b;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.fb-search-pill input {
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.88rem;
    color: var(--text-main);
    width: 100%;
}

.fb-search-pill input::placeholder {
    color: #65676b;
    font-weight: 400;
}

/* CENTER COLUMN: FACEBOOK NAVIGATION TABS */
.center-section {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    max-width: 580px;
    height: 100%;
}

.fb-tabs-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    gap: 4px;
}

.fb-tab-item {
    flex: 1;
    max-width: 110px;
    height: 100%;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    cursor: pointer;
    border: none;
    background: transparent;
    color: #65676b;
    position: relative;
    transition: background 0.15s, color 0.15s;
    border-radius: 8px 8px 0 0;
    padding: 0 6px;
}

.fb-tab-item:hover {
    background: #f0f2f5;
    color: var(--text-main);
}

.fb-tab-item.active {
    color: var(--primary);
}

/* Facebook blue bottom active bar */
.fb-tab-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    border-radius: 3px 3px 0 0;
}

.tab-icon {
    font-size: 1.15rem;
}

.tab-label {
    font-size: 0.72rem;
    font-weight: 600;
}

/* Nút mũi tên tiến/lùi thời gian */
.fb-tab-nav-arrow {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #65676b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}

.fb-tab-nav-arrow:hover {
    background: #e4e6eb;
    color: var(--text-main);
}

/* RIGHT COLUMN: ACTION CIRCLE BUTTONS & AVATAR */
.right-section {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-shrink: 0;
    min-width: 180px;
    max-width: 320px;
}

.fb-circle-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #e4e6eb;
    color: #050505;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s;
    position: relative;
    flex-shrink: 0;
    text-decoration: none;
}

.fb-circle-btn:hover {
    background: #d8dadf;
    transform: scale(1.04);
}

.fb-circle-btn:active {
    transform: scale(0.96);
}

.fb-badge-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #e41e3f;
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 10px;
    border: 2px solid #ffffff;
    line-height: 1;
}

.fb-profile-avatar-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px 2px 2px;
    border-radius: 50px;
    background: #e4e6eb;
    border: none;
    cursor: pointer;
    transition: background 0.15s;
    flex-shrink: 0;
}

.fb-profile-avatar-btn:hover {
    background: #d8dadf;
}

.fb-profile-avatar-inner {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* RESPONSIVE TOPBAR & MOBILE BOTTOM NAVIGATION */
@media (max-width: 768px) {
    .brand-section {
        min-width: 0;
        max-width: none;
        flex: 1;
    }
    .center-section {
        display: none !important;
    }
    .right-section {
        min-width: 0;
        gap: 6px;
    }
    body {
        padding-bottom: 60px !important;
    }
}

/* MOBILE BOTTOM NAVIGATION BAR (FACEBOOK STYLE) */
.mobile-bottom-bar {
    display: none !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 54px;
    background: #ffffff;
    border-top: 1px solid var(--border);
    z-index: 1000;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
    justify-content: space-around;
    align-items: center;
    padding: 0 4px;
}

@media (max-width: 768px) {
    .mobile-bottom-bar {
        display: flex !important;
    }
}

.mobile-tab-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: transparent;
    border: none;
    color: #65676b;
    font-size: 0.68rem;
    font-weight: 600;
    cursor: pointer;
    height: 100%;
    transition: color 0.15s;
    text-decoration: none;
}

.mobile-tab-btn.active {
    color: var(--primary);
}

.mobile-tab-btn i {
    font-size: 1.2rem;
}
