/* =========================================================
   TALK2MARKET COMMON HEADER
   PREMIUM RESPONSIVE HEADER
========================================================= */


/* =========================================================
   HEADER
========================================================= */

.topbar {

    width: 100%;

    min-height: 90px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 0 32px;

    box-sizing: border-box;

    background: #111827;

    color: #ffffff;

    border-bottom:
        1px solid
        rgba(255,255,255,.08);

    position: relative;

    z-index: 3000;
}


/* =========================================================
   BRAND
========================================================= */

.brand {

    display: flex;

    align-items: center;

    gap: 10px;

    font-size: 20px;

    font-weight: 800;

    white-space: nowrap;
}


.brand-icon {

    width: 38px;

    height: 38px;

    flex-shrink: 0;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 10px;

    background:
        rgba(255,255,255,.08);

    font-size: 21px;
}


/* =========================================================
   DESKTOP NAVIGATION
========================================================= */

.topbar-nav {

    display: flex;

    align-items: center;

    gap: 7px;

    margin-left: auto;
}


.nav-btn {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 7px;

    min-height: 42px;

    padding: 0 14px;

    border-radius: 9px;

    color: #d1d5db;

    text-decoration: none;

    font-size: 13px;

    font-weight: 700;

    transition:
        background .2s ease,
        color .2s ease,
        transform .2s ease;
}


.nav-btn span {

    font-size: 16px;

    line-height: 1;
}


.nav-btn:hover {

    background:
        rgba(255,255,255,.08);

    color: #ffffff;
}


.nav-btn.active {

    background: #2563eb;

    color: #ffffff;

    box-shadow:
        0 5px 15px
        rgba(37,99,235,.25);
}


.logout-btn {

    margin-left: 6px;

    color: #d1d5db;

    border: none;
}


.logout-btn:hover {

    background:
        rgba(255,255,255,.08);

    color: #ffffff;
}


/* =========================================================
   BURGER BUTTON
   Hidden on desktop
========================================================= */

.menu-toggle {

    display: none;

    border: 0;

    outline: none;
}


/* =========================================================
   HEADER SCROLL EFFECT
========================================================= */

.topbar.scrolled {

    box-shadow:
        0 8px 25px
        rgba(0,0,0,.18);
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1000px) {

    .topbar {

        padding:
            0 20px;
    }


    .brand {

        font-size: 18px;
    }


    .nav-btn {

        padding:
            0 10px;

        font-size: 12px;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 800px) {

    /* =====================================================
       HEADER
    ===================================================== */

    .topbar {

        min-height: 76px;

        padding:
            0 18px;

        flex-direction: row;

        align-items: center;

        justify-content: space-between;

        gap: 15px;

        position: relative;

        z-index: 3000;
    }


    /* =====================================================
       BRAND
    ===================================================== */

    .brand {

        flex: 1;

        min-width: 0;

        justify-content: flex-start;

        font-size: 18px;
    }


    .brand-icon {

        width: 36px;

        height: 36px;

        font-size: 20px;
    }


    /* =====================================================
       BURGER BUTTON
    ===================================================== */

    .menu-toggle {

        display: flex;

        width: 44px;

        height: 44px;

        flex-shrink: 0;

        margin-left: auto;

        padding: 0;

        align-items: center;

        justify-content: center;

        flex-direction: column;

        gap: 5px;

        background:
            rgba(255,255,255,.06);

        border:
            1px solid
            rgba(255,255,255,.16);

        border-radius: 10px;

        color: #ffffff;

        cursor: pointer;

        position: relative;

        z-index: 5000;

        appearance: none;

        -webkit-appearance: none;

        transition:
            background .2s ease,
            border-color .2s ease;
    }


    .menu-toggle:hover {

        background:
            rgba(255,255,255,.10);

        border-color:
            rgba(255,255,255,.25);
    }


    /* =====================================================
       BURGER LINES
    ===================================================== */

    .menu-toggle span {

        display: block !important;

        width: 20px !important;

        height: 2px !important;

        margin: 0 !important;

        padding: 0 !important;

        background: #ffffff !important;

        border-radius: 5px;

        opacity: 1 !important;

        transition:
            transform .25s ease,
            opacity .2s ease;
    }


    /* =====================================================
       BURGER → CROSS
    ===================================================== */

    .topbar.menu-open
    .menu-toggle span:nth-child(1) {

        transform:
            translateY(7px)
            rotate(45deg);
    }


    .topbar.menu-open
    .menu-toggle span:nth-child(2) {

        opacity: 0 !important;
    }


    .topbar.menu-open
    .menu-toggle span:nth-child(3) {

        transform:
            translateY(-7px)
            rotate(-45deg);
    }


    /* =====================================================
       MOBILE DRAWER
       
       IMPORTANT:
       height = auto
       इसलिए सिर्फ menu content तक रहेगा
    ===================================================== */

    .topbar-nav {

        display: flex;

        position: fixed;

        top: 76px;

        right: 0;

        left: auto;

        width: 52%;

        min-width: 260px;

        max-width: 330px;

        height: auto;

        max-height:
            calc(100vh - 90px);

        margin: 0;

        padding:
            18px 12px 14px;

        box-sizing: border-box;

        flex-direction: column;

        align-items: stretch;

        gap: 7px;

        background: #111827;

        border-left:
            1px solid
            rgba(255,255,255,.10);

        border-top:
            1px solid
            rgba(255,255,255,.06);

        border-bottom:
            1px solid
            rgba(255,255,255,.10);

        border-radius:
            0 0 0 12px;

        box-shadow:
            -15px 15px 40px
            rgba(0,0,0,.28);

        overflow-y: auto;

        transform:
            translateX(105%);

        visibility: hidden;

        opacity: 0;

        transition:
            transform .28s ease,
            opacity .25s ease,
            visibility .28s ease;

        z-index: 4000;
    }


    /* =====================================================
       OPEN DRAWER
    ===================================================== */

    .topbar.menu-open .topbar-nav {

        transform:
            translateX(0);

        visibility: visible;

        opacity: 1;
    }


    /* =====================================================
       MOBILE NAV BUTTONS
    ===================================================== */

    .nav-btn {

        width: 100%;

        min-height: 48px;

        padding:
            0 14px;

        box-sizing: border-box;

        justify-content: flex-start;

        gap: 8px;

        border-radius: 10px;

        font-size: 13px;
    }


    .nav-btn span {

        width: 24px;

        flex-shrink: 0;

        text-align: center;
    }


    /* =====================================================
       LOGOUT
    ===================================================== */

    .logout-btn {

        margin-left: 0;

        margin-top: 4px;
    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 520px) {

    .topbar {

        min-height: 70px;

        padding:
            0 12px;
    }


    /* =====================================================
       BRAND
    ===================================================== */

    .brand {

        font-size: 16px;
    }


    .brand-icon {

        width: 34px;

        height: 34px;

        font-size: 18px;
    }


    /* =====================================================
       BURGER
    ===================================================== */

    .menu-toggle {

        width: 42px;

        height: 42px;
    }


    /* =====================================================
       DRAWER
    ===================================================== */

    .topbar-nav {

        top: 70px;

        width: 72%;

        min-width: 245px;

        max-width: 300px;

        height: auto;

        max-height:
            calc(100vh - 82px);

        padding:
            14px 10px 12px;

        border-radius:
            0 0 0 12px;
    }


    /* =====================================================
       BUTTONS
    ===================================================== */

    .nav-btn {

        min-height: 45px;

        padding:
            0 12px;

        font-size: 12px;
    }


    .nav-btn span {

        width: 22px;
    }

}


/* =========================================================
   VERY SMALL SCREEN
========================================================= */

@media (max-width: 360px) {

    .brand {

        font-size: 14px;
    }


    .brand-icon {

        width: 32px;

        height: 32px;

        font-size: 17px;
    }


    .menu-toggle {

        width: 40px;

        height: 40px;
    }


    .topbar-nav {

        width: 78%;

        min-width: 230px;
    }

}