/* ============================================================
   mobile_navbar.css
   Auth navbar mobile styles — mirrors base_guest.html pattern
   Targets: .auth-mobile-toggle, .auth-mobile-menu, .auth-right-section
   ============================================================ */

/* ── Desktop: hide mobile toggle ── */
.auth-mobile-toggle {
    display: none;
}

/* ── auth-right-section: flex container for desktop nav + actions ── */
.auth-right-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ── Mobile menu: hidden by default ── */
.auth-mobile-menu {
    display: none;
    position: fixed;
    top: var(--navbar-height, 70px);
    left: 0;
    /* ── লোগো ও ব্র্যান্ড নাম ── */
    .navbar-brand {
        font-size: 1.4rem !important;
        font-weight: 800 !important;
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        flex-shrink: 0 !important;
        white-space: nowrap !important;
    }

    .navbar-brand img {
        width: 34px !important;
        height: 34px !important;
        object-fit: contain !important;
        flex-shrink: 0 !important;
    }

    .navbar-brand span {
        flex-shrink: 0 !important;
    }

    /* Right section — shrink করতে পারবে, overflow hidden */
    .auth-right-section {
        flex-shrink: 1 !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }

@keyframes authMenuSlide {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── User header inside mobile menu ── */
.auth-mobile-user-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px 12px;
    border-bottom: 1px solid #f0f0f0;
    background: linear-gradient(135deg, #f8f9ff 0%, #fff 100%);
}

.auth-mobile-user-header img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #4361EE;
    flex-shrink: 0;
}

.auth-mobile-name {
    font-weight: 700;
    font-size: 15px;
    color: #2B2D42;
    line-height: 1.2;
}

.auth-mobile-username {
    font-size: 12px;
    color: #6c757d;
}

/* ── Links inside mobile menu ── */
.auth-mobile-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 20px;
    font-size: 15px;
    font-weight: 600;
    color: #2B2D42;
    text-decoration: none;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.15s;
}

.auth-mobile-menu a:hover {
    background: #f0f3ff;
    color: #4361EE;
}

.auth-mobile-menu a i,
.auth-mobile-menu a .bi {
    font-size: 18px;
    width: 24px;
    text-align: center;
    color: #4361EE;
    flex-shrink: 0;
}

.auth-mobile-menu a.text-danger {
    color: #dc3545 !important;
}

.auth-mobile-menu a.text-danger i,
.auth-mobile-menu a.text-danger .bi {
    color: #dc3545 !important;
}

.auth-mobile-menu a.text-danger:hover {
    background: #fff5f5;
}

/* ── Auth row (login/register buttons) ── */
.auth-mobile-auth-row {
    display: flex;
    gap: 10px;
    padding: 14px 20px 4px;
}

.auth-mobile-auth-row a {
    flex: 1;
    justify-content: center;
    border-radius: 8px;
    border-bottom: none !important;
    padding: 10px 12px !important;
}

.btn-auth-login {
    background: white;
    color: #4361EE !important;
    border: 2px solid #4361EE;
}

.btn-auth-register {
    background: linear-gradient(135deg, #4361EE, #3A0CA3);
    color: white !important;
}

/* ============================================================
   MOBILE BREAKPOINT (≤ 991px)
   ============================================================ */
@media (max-width: 991px) {

    /* Show hamburger toggle */
    .auth-mobile-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        background: #fff;
        border: 1.5px solid #dee2e6;
        border-radius: 10px;
        width: 40px;
        height: 40px;
        padding: 0;
        cursor: pointer;
        color: #4361EE;
        font-size: 1.3rem;
        transition: all 0.2s;
        flex-shrink: 0;
    }

    .auth-mobile-toggle:hover {
        border-color: #4361EE;
        background: rgba(67, 97, 238, 0.08);
    }

    .auth-mobile-toggle:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
    }

    /* Hide desktop nav links and actions on mobile */
    .auth-nav-links,
    .auth-desktop-actions {
        display: none !important;
    }

    /* Navbar container: logo left, toggle right */
    .fade-navbar > .container {
        padding-left: 4% !important;
        padding-right: 4% !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
    }

    /* Hide search completely */
    .search-container {
        display: none !important;
    }

    /* Navbar height */
    :root {
        --navbar-height: 60px;
    }

    body {
        padding-top: 60px !important;
    }
}

/* ── Small mobile (≤ 576px) ── */
@media (max-width: 576px) {
    :root {
        --navbar-height: 56px;
    }

    body {
        padding-top: 56px !important;
    }

    .fade-navbar > .container {
        padding-left: 3% !important;
        padding-right: 3% !important;
    }

    .navbar-brand {
        font-size: 1.25rem !important;
    }

    .navbar-brand img {
        width: 30px !important;
        height: 30px !important;
    }
}


/* ============================================================
   🔔 NOTIFICATION DROPDOWN — Professional Design
   ============================================================ */

/* Trigger button */
.nf-notif-trigger {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #f0f3ff;
    color: #4361EE;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    flex-shrink: 0;
}
.nf-notif-trigger:hover { background: #e0e7ff; transform: scale(1.05); }
.nf-notif-trigger:focus { outline: none; box-shadow: 0 0 0 3px rgba(67,97,238,0.2); }

/* Badge on trigger */
.nf-notif-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #F72585;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 17px;
    height: 17px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid #fff;
    line-height: 1;
    animation: nf-badge-pop 0.3s ease;
}
@keyframes nf-badge-pop {
    0%   { transform: scale(0); }
    70%  { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Panel */
.nf-notif-panel {
    width: 360px;
    max-width: calc(100vw - 24px);
    border: none !important;
    border-radius: 16px !important;
    padding: 0 !important;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.14) !important;
    margin-top: 8px !important;
}

/* Header */
.nf-notif-header {
/* ── ছোট মোবাইল (576px এর নিচে) ── */
@media (max-width: 576px) {
    :root {
        --navbar-height: 56px;
    }

    body {
        padding-top: 56px !important;
    }

    /* লোগো আরও ছোট */
    .navbar-brand {
        font-size: 1.2rem !important;
    }

    .navbar-brand img {
        width: 28px !important;
        height: 28px !important;
    }

    /* কন্টেইনার padding কমানো */
    .fade-navbar > .container {
        padding-left: 3% !important;
        padding-right: 3% !important;
    }

    /* icon button ছোট */
    .auth-mobile-icon-btn {
        width: 32px !important;
        height: 32px !important;
        font-size: 15px !important;
    }

    /* toggle button ছোট */
    .auth-mobile-toggle {
        width: 34px !important;
        height: 34px !important;
    }
}

/* ── অতি ছোট (400px এর নিচে) ── */
@media (max-width: 400px) {
    .navbar-brand {
        font-size: 1.1rem !important;
    }

    .navbar-brand img {
        width: 26px !important;
        height: 26px !important;
    }

    .auth-mobile-icon-btn {
        width: 30px !important;
        height: 30px !important;
        font-size: 14px !important;
    }

    .auth-mobile-toggle {
        width: 32px !important;
        height: 32px !important;
    }

    .fade-navbar > .container {
        padding-left: 2% !important;
        padding-right: 2% !important;
        gap: 4px !important;
    }
}
.nf-notif-mark-all:hover { background: #f0f3ff; }

/* Scrollable list */
.nf-notif-list {
    max-height: 380px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #dee2e6 transparent;
}
.nf-notif-list::-webkit-scrollbar { width: 4px; }
.nf-notif-list::-webkit-scrollbar-track { background: transparent; }
.nf-notif-list::-webkit-scrollbar-thumb { background: #dee2e6; border-radius: 4px; }

/* Each notification item */
.nf-notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.15s;
    position: relative;
}
.nf-notif-item:last-child { border-bottom: none; }
.nf-notif-item:hover { background: #f8f9ff; }
.nf-notif-item.nf-notif-unread { background: #f0f4ff; }
.nf-notif-item.nf-notif-unread:hover { background: #e8eeff; }

/* Icon wrap */
.nf-notif-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.nf-notif-icon--like    { background: #fff0f3; color: #e91e63; }
.nf-notif-icon--comment { background: #f0f4ff; color: #4361EE; }
.nf-notif-icon--follow  { background: #f0fff4; color: #28a745; }
.nf-notif-icon--message { background: #e8f8ff; color: #0dcaf0; }
.nf-notif-icon--friend  { background: #fff8e1; color: #f59e0b; }
.nf-notif-icon--default { background: #f0f4ff; color: #4361EE; }

/* Text body */
.nf-notif-body { flex: 1; min-width: 0; }
.nf-notif-text {
    font-size: 13px;
    font-weight: 600;
    color: #1c1e21;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nf-notif-sub {
    font-size: 12px;
    color: #65676b;
    margin-top: 2px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.nf-notif-time {
    font-size: 11px;
    color: #4361EE;
    margin-top: 4px;
    font-weight: 500;
}

/* Unread dot */
.nf-notif-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4361EE;
    flex-shrink: 0;
    margin-top: 6px;
}

/* Empty state */
.nf-notif-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 36px 20px;
    color: #adb5bd;
}
.nf-notif-empty i { font-size: 36px; }
.nf-notif-empty span { font-size: 13px; font-weight: 500; }

/* Footer link */
.nf-notif-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px;
    font-size: 13px;
    font-weight: 700;
    color: #4361EE;
    text-decoration: none;
    border-top: 1px solid #f0f0f0;
    background: #fafbff;
    transition: background 0.15s;
}
.nf-notif-footer:hover { background: #f0f3ff; color: #3A0CA3; }


/* ============================================================
   Message Indicator Badge
   ============================================================ */
.message-indicator {
    position: absolute;
    top: -5px;
    right: -8px;
    background-color: #dc3545;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    line-height: 1.2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Mobile badge for auth navbar */
.auth-mobile-badge {
    position: absolute;
    top: -4px;
    right: -6px;
    background-color: #dc3545;
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 8px;
    min-width: 16px;
    text-align: center;
    line-height: 1.2;
}

/* Mobile menu badge */
.auth-mobile-menu-badge {
    background-color: #dc3545;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}
