/* ======================== */
/* ناوبار اصلی (Desktop)   */
/* ======================== */

.kowork-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px 12px 32px;
    background: var(--color-bg-navbar);
    direction: rtl;
    flex-direction: row;
}

/* --------------------- */
/* بخش دکمه‌های سمت راست  */
/* --------------------- */
.navbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* --------------------- */
/* دکمه پروفایل          */
/* --------------------- */
.profile-btn {
    width: 44px;
    height: 44px;
    border-radius: 999999999px;
    border: 1px solid rgb(255 255 255 / 16%);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    font-size: 22px;
    transition: border-color 0.2s;
    cursor: pointer;
    background: #383551;
    box-shadow: inset 0 -4px 9.6px #ffffff8c;
}
.profile-btn:hover { border-color: var(--color-profile-border-hover); }

/* --------------------- */
/* لیست لینک‌های ناوبار  */
/* --------------------- */
.navbar-links {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 34px;
    margin: 0;
    padding: 0;
}
.navbar-links li a {
    color: var(--color-white);
    text-decoration: none;
    font-size: 16px;
    transition: color 0.15s;
    font-weight: 600;
}
.navbar-links li a:hover { color: var(--color-link-hover); }

/* لینک‌های برجسته در ناوبار (is_highlighted = true) */
.navbar-links li a.navbar-link--highlighted {
    background-color: #ffffff;   /* پس‌زمینه سفید */
    color: #000000;              /* رنگ متن سیاه */
    border-radius: 9999px;       /* کاملاً گرد */
    padding: 6px 16px;           /* کمی padding تا حالت دکمه‌ای بگیرد */
    transition: background-color 0.15s, color 0.15s;
}

/* روی hover هم رنگ‌ها ثابت بمانند و با قانون عمومی hover override شوند */
.navbar-links li a.navbar-link--highlighted:hover {
    background-color: #ffffff;
    color: #000000;              /* جلوگیری از اعمال var(--color-link-hover) */
}

/* --------------------- */
/* لوگوی سایت            */
/* --------------------- */
.logo img {
    height: 38px;
    vertical-align: middle;
    margin-right: 18px;
}

/* ======================== */
/* دکمه منو (همبرگر)       */
/* ======================== */
.menu-btn {
    display: none;
    width: 48px;
    height: 48px;
    border-radius: 999999999px;
    border: 1px solid rgb(255 255 255 / 16%);
    color: var(--color-white);
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    font-size: 22px;
    transition: border-color 0.2s;
    cursor: pointer;
    background: linear-gradient(0deg, rgb(56 53 81 / 95%) 0%, rgb(56 53 81 / 50%) 100%);
    /*box-shadow: inset 0 -4px 9.6px #ffffff8c;*/
}
.menu-btn:hover { border-color: var(--color-profile-border-hover); }

/* ================================================================== */
/*                  Mobile Menu Overlay (top-covered)                  */
/* ================================================================== */

:root{
    --mobile-menu-gap-x: 0px;        /* فاصله چپ/راست */
    --mobile-menu-gap-bottom: 12px;  /* فاصله پایین */
    --mobile-menu-radius: 28px;
}

/* بک‌دراپ */
.mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    background: var(--color-mobile-backdrop);
    display: none;
    opacity: 0;
    transition: opacity .22s;
    z-index: 998;
}
.mobile-menu-backdrop.active { display: block; opacity: 1; }

/* پنل */
.mobile-menu {
    position: fixed;
    top: 0;
    left: var(--mobile-menu-gap-x);
    right: var(--mobile-menu-gap-x);
    height: auto;
    max-height: calc(100vh - var(--mobile-menu-gap-bottom));
    border-radius: 0 0 var(--mobile-menu-radius) var(--mobile-menu-radius);
    overflow: auto;

    background:
        radial-gradient(140% 120% at 92% 0%, rgba(255,255,255,.07) 0%, rgba(255,255,255,0) 60%),
        linear-gradient(180deg, rgba(255,255,255,.06) 0%, rgba(255,255,255,0) 42%),
        var(--color-mobile-bg);

    box-shadow:
        0 26px 64px rgba(8, 7, 30, .55),
        inset 0 -1.5px 0 rgba(255,255,255,.14),
        inset 0 -18px 36px rgba(255,255,255,.07);

    z-index: 999;
    display: flex;
    flex-direction: column;
    padding: 24px 24px 18px;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-6px) scale(.985);
    transition: opacity .22s ease, transform .22s ease, visibility 0s linear .22s;
}
.mobile-menu.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    transition-delay: 0s;
    box-sizing: revert!important;
}

/* درخشش کف */
.mobile-menu::after{
    content: "";
    position: absolute;
    bottom: 0; right: 0; left: 0;
    height: 52px;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,.10) 100%);
    opacity: .65;
    pointer-events: none;
}

/* دکمه بستن: هم‌استایل با profile/menu */
.mobile-menu-close{
    position:absolute; top:25px; left:25px;
    width:48px; height:48px;
    border-radius:999999999px;
    border:1px solid rgb(255 255 255 / 16%);
    background:#383551;
    box-shadow: inset 0 -4px 9.6px #ffffff8c;
    color:var(--color-white);
    display:flex; align-items:center; justify-content:center;
    cursor:pointer; transition:border-color .2s;
}
.mobile-menu-close:hover{ border-color:var(--color-profile-border-hover); }
.mobile-menu-close img{ width:18px; height:18px; display:block; }

/* فهرست لینک‌های منو */
.mobile-navbar-links {
    list-style: none;
    padding: 72px 0 16px;
    margin: 0;
    text-align: right;
}
.mobile-navbar-links li { margin: 16px 0; }
.mobile-navbar-links a {
    color: var(--color-white);
    font-size: 24px;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    padding: 8px 0;
    border-radius: 9px;
    transition: background .12s, opacity .12s;
}
.mobile-navbar-links a:hover { background: var(--color-mobile-link-hover); }

/* CTA ها */
.mobile-expert-btn,
.mobile-order-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 14px 18px;
    border-radius: 25px;
    font-size: 17px;
    font-weight: 600;
    text-decoration: none;
    justify-content: center;
    transition: opacity .18s;
}
.mobile-expert-btn {
    background: var(--color-expert-gradient);
    color: var(--color-white);
    margin-inline-end: 10px;
}
.mobile-order-btn {
    background: var(--color-order-gradient);
    color: var(--color-white);
}

/* قفل بدنه در حالت منو */
body.no-scroll { overflow: hidden; height: 100vh; }

/* ======================== */
/* Breakpoints              */
/* ======================== */
@media (max-width: 1096px) {
    .navbar-links { display: none !important; }
    .menu-btn { display: flex !important; }
    .navbar-center { gap: 12px; }
}
@media (max-width: 714px) {
    nav .expert-btn { display: none !important; }
    .kowork-navbar {
        padding: 24px 20px 12px 20px;
    }

    .navbar-right{
        gap: 8px;
    }

    .profile-btn, .menu-btn{
        margin-left: 0px;
    }
    .logo img{
        margin-right: 0px;
    }
}
@media (max-width: 391.98px) { nav .order-btn { display: none !important; } }
@media (min-width: 1097px) {
    .mobile-menu,
    .mobile-menu-backdrop { display: none !important; }
}

/* ======================== */
/* دکمه اعلان‌ها (Bell)     */
/* هم‌استایل با .menu-btn   */
/* ======================== */
.notifications-btn {
    width: 48px;
    height: 48px;
    border-radius: 999999999px;
    border: 1px solid rgb(255 255 255 / 16%);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    transition: border-color 0.2s;
    cursor: pointer;
    background: linear-gradient(0deg, rgb(56 53 81 / 95%) 0%, rgb(56 53 81 / 50%) 100%);
    /*box-shadow: inset 0 -4px 9.6px #ffffff8c;*/
    padding: 0;
    position: relative;
    /*overflow: hidden;*/
    isolation: isolate;
}
.notifications-btn:hover { border-color: var(--color-profile-border-hover); }

.notifications-btn img {
    width: 24px;
    height: 24px;
    display: block;
    position: relative;
    z-index: 2;
}

.notifications-btn.has-unread::before{
    content: "";
    position: absolute;
    top: 2.5px;
    right: 2.5px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #C52222;
    z-index: 3;
    pointer-events: none;
}

.notifications-btn.is-open{
    background: linear-gradient(180deg, #ffffff 0%, rgb(255 255 255 / 69%) 100%);
    border-color: white;
    box-shadow: inset 0 -4px 9.6px rgba(255, 255, 255, .71);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.notifications-btn.is-open::after{
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 -4px 9.6px rgba(255, 255, 255, .71);
    mix-blend-mode: overlay;
    z-index:1;
    pointer-events: none;
}

.notifications-btn.is-open img{
    filter: brightness(0) saturate(100%) invert(24%) sepia(18%) saturate(712%) hue-rotate(206deg) brightness(91%) contrast(90%);
    opacity: .9;
}


@media (max-width: 714px) {
    .profile-btn, .menu-btn{
        margin-left: 0px;
    }
}

.kw-notif-backdrop{
    display:none !important;
}

.kw-notif-panel{
    position:fixed;
    inset:0;
    opacity:0;
    pointer-events:none;
    transform:translateY(8px);
    transition:opacity .18s ease, transform .18s ease;
    z-index:9998;
}

.kw-notif-panel.is-open{
    opacity:1;
    pointer-events:auto;
    transform:none;
}

.kw-notif-backdrop.is-open{
    display:none !important;
}

.kw-notif-close{
    position:absolute;
    inset:0;
    background:transparent;
    border:0;
    padding:0;
    cursor:pointer;
}

.kw-notif-close__icon{
    display:none;
}

.kw-notif-card{
    position: absolute;
    left: 16px;
    top: 84px;
    width: calc(100% - 32px);
    max-width: 362px;
    max-height: 517px;
    border-radius: 20px;
    background: rgba(18, 16, 36, .72);
    border: 1px solid rgba(255, 255, 255, .10);
    /*box-shadow: 0 18px 60px rgba(0, 0, 0, .45);*/
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.kw-notif-card__top{
    padding:18px 18px 10px 18px;
    display:flex;
    align-items:center;
    justify-content:flex-start;
}

.kw-notif-card__bell{
    width:46px;
    height:46px;
    border-radius:999px;
    background:rgba(255,255,255,.10);
    border:1px solid rgba(255,255,255,.10);
    display:flex;
    align-items:center;
    justify-content:center;
}

.kw-notif-card__bell img{
    width:22px;
    height:22px;
    opacity:.95;
}

.kw-notif-list{
    flex:1;
    overflow:auto;
    padding: 17px 14px 12px 16px;
    -ms-overflow-style:none;
    scrollbar-width:none;

    display: flex;
    flex-direction: column;
    gap: 14px;

    mask-image: linear-gradient(0deg, #ffffff00 2%, #ffffff 4%, #ffffff 96%, #ffffff00 98%);
    -webkit-mask-image: linear-gradient(0deg, #ffffff00 2%, #ffffff 4%, #ffffff 96%, #ffffff00 98%);
}

.kw-notif-list::-webkit-scrollbar{
    display:none;
}

.kw-notif-day{
    display:flex;
    align-items:center;
    justify-content:flex-start;
    /*padding:12px 4px 10px 4px;*/
    color:rgba(255,255,255,.85);
    font-size:12px;
    line-height:1.2;
    padding: 0 2px 0 0;
}

.kw-notif-day__label{
    opacity:.98;
    font-size:inherit;
    font-weight:500;
    color:#fff;
    white-space:nowrap;
}

.kw-notif-day__date{
    opacity:.92;
    font-size:inherit;
    font-weight:500;
    color:#fff;
    font-variant-numeric:tabular-nums;
    white-space:nowrap;
    min-width:0;
}

.kw-notif-day__label::after{
    content:"";
    display:inline-block;
    width:2px;
    height:2px;
    border-radius:999px;
    background:#D9D9D9;
    margin:0 10px;
    transform:translateY(-1px);
    opacity: 20%;
}

.kw-notif-day::after{
    content:"";
    flex:1;
    height:1px;
    background:rgba(255,255,255,.1);
    margin-right:10px;
    min-width:24px;
}

@media (max-width: 480px) {
    .kw-notif-day{ font-size:18px; }
    .kw-notif-day__label::after{ margin:0 10px; }
}

/*.kw-notif-day--sep{
    border-top:1px solid rgba(255,255,255,.10);
    margin-top:10px;
}*/

.kw-notif-item{
    display:flex;
    align-items:flex-start;
    gap:10px;
    /*padding:12px 6px;*/
    padding:0px;
    border-radius:18px;
    flex-direction: row-reverse;
}

.kw-notif-item:not(.kw-notif-item--unread){
    opacity: 40%;
}

.kw-notif-item:not(.kw-notif-item--unread) .kw-notif-item__dot{
    opacity: 0;
}

/*.kw-notif-item + .kw-notif-item{
    border-top:1px solid rgba(255,255,255,.08);
    border-radius:0;
}*/

.kw-notif-item__left{
    /*width:44px;*/
    /*height:44px;*/
    border-radius: 999px;
    border: 0;
    background: rgba(255, 255, 255, .05);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex: 0 0 auto;
    padding: 6px 11px;
}

.kw-notif-item__arrow{
    font-size:18px;
    color:rgba(255,255,255,.85);
    line-height:1;
}

.kw-notif-item__body{
    flex:1;
    padding-top:2px;
    min-width:0;
}

.kw-notif-item__text{
    color:white;
    font-size:12px;
    line-height:1.6;
    white-space:normal;
    word-break:break-word;
}

.kw-notif-item__time{
    margin-top:6px;
    color:rgba(255,255,255,.5);
    font-size:10px;
    font-variant-numeric:tabular-nums;
}

.kw-notif-item__right{
    width:32px;
    flex:0 0 32px;
    position:relative;
    display:flex;
    align-items:center;
    justify-content:center;
    padding-top:0;
}

.kw-notif-item__dot{
    width:4px;
    height:4px;
    border-radius:999px;
    background:#C52222;
    position:absolute;
    top:0px;
    right:0px;
    z-index:2;
}

.kw-notif-item__icon{
    width:32px;
    height:32px;
    border-radius:999px;
    background:rgba(255,255,255,.1);
    display:flex;
    align-items:center;
    justify-content:center;
}

.kw-notif-item__icon img{
    width:16px;
    height:16px;
    opacity:.9;
}

.kw-notif-clear{
    margin: 0px 14px 12px 16px;
    padding: 6px 11px;
    border-radius:999px;
    border:none;
    background:rgba(255,255,255,.05);
    color:white;
    font-size:12px;
    font-weight: 600;
    cursor:pointer;
}

body.kw-lock-scroll{
    overflow:hidden !important;
    touch-action:none;
}
