:root{
    --g-stop-0:  #FFFFFF;
    --g-stop-25: #24D3A7;
    --g-stop-40: #2D84DA;
    --g-stop-100: rgba(1,80,158,0);

    --hero-bg-top: #081828;
    --hero-bg-bottom: #0B2E59;

    --hero-radius-desktop: 20px;
    --hero-gap-desktop: 20px;
    --hero-navbar-height: 84px;

    --topbar-h: 56px;
    --topbar-pad: 10px;
}

/* ظرف اصلی */
.kw-hero-intel{
    position: relative;
    margin: var(--hero-gap-desktop);
    border-radius: var(--hero-radius-desktop);
    overflow: hidden;
    min-height: calc(100dvh - (var(--hero-gap-desktop) * 2) - var(--hero-navbar-height));
    color: #fff;
    display: flex;
}
/* پس‌زمینه */
.kw-hero-intel::after{
    content: "";
    position: absolute;
    width: 173%;
    height: 100%;
    background: radial-gradient(100% 100% at 61% 120%, var(--g-stop-0) 0%, var(--g-stop-25) 25%, var(--g-stop-40) 40%, var(--g-stop-100) 100%);
    top: 0%;
    left: -17%;
    z-index: -2;
}
/* اوورلی تیره نرم از بالا */
.kw-hero-intel::before{
    content:"";
    position:absolute; inset:0;
    z-index:-1;
}

.kw-hero-intel__inner{
    max-width: 1100px;
    margin-inline: auto;
    padding: clamp(24px, 4vw, 48px);
    flex: 1;
}

/* تاپ‌بار */
.kw-hero-topbar{
    position: absolute;
    inset-inline: 8px;
    top: 8px;
    height: var(--topbar-h);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none; /* فقط دکمه‌ها کلیک‌پذیر باشند */
    z-index: 2;
    padding: 0.8rem;
}
.kw-hero-topbar__title{
    /*font-family: IRANSansXVF, "IRANSans", system-ui;*/
    font-weight: 600;
    font-size: 20px;
    letter-spacing: -0.02em;
    color: #fff;
    pointer-events: none;
}
.kw-hero-topbar__actions{
    inset-inline-end: calc(var(--topbar-pad) + env(safe-area-inset-left, 0));
    display: flex;
    gap: 19px;
    pointer-events: auto;
}
/* Topbar buttons mimic .profile-btn */
.kw-circle-btn{
    width: 48px;
    height: 48px;
    border-radius: 999999px;
    border: 1px solid rgba(255,255,255,0.16);
    color: var(--color-white, #fff);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;

    /* from .profile-btn */
    background: #383551;
    box-shadow: inset 0 -4px 9.6px #ffffff8c;

    /* small extras for feel */
    transition: border-color .2s, transform .12s ease, opacity .12s ease;
    backdrop-filter: none; /* شبیه نمونه، بدون بلور */
}
.kw-circle-btn:hover{
    border-color: rgba(255,255,255,0.32);
    transform: translateY(-1px);
}
.kw-circle-btn:active{
    transform: translateY(0);
    box-shadow: inset 0 -2px 6px rgba(255,255,255,0.45);
}
.kw-circle-btn img{
    width: 22px;
    height: 22px;
    display: block;
}

/* نوار ورودی در پایین */
.kw-hero-intel__bottom{
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(18px + env(safe-area-inset-bottom, 0));
    width: min(820px, calc(100% - 48px));
    z-index: 2;
}

.kw-hero-blur__bottom {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: min(820px, calc(100% - 48px));
    height: 120px;
    z-index: 1;
    overflow: hidden; /* برای اینکه ::before بیرون نزنه */
}

.kw-hero-blur__bottom::before {
    content: "";
    position: absolute;
    inset: 0;
    backdrop-filter: blur(2.8px);
    -webkit-backdrop-filter: blur(2.8px);
    mask-image: linear-gradient(to bottom, rgba(255, 255, 255, 0) 9.04%, rgba(255, 255, 255, 1) 100%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 20%);
}

/* متن کمک پایین چپ */
.kw-hero-intel__help{
    text-decoration: auto!important;
    position: absolute;
    inset-inline-end: calc(14px + env(safe-area-inset-left, 0));
    bottom: calc(14px + env(safe-area-inset-bottom, 0));
    font-family: IRANSansXVF, "IRANSans", system-ui;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: -0.03em;
    color: #E6F4FF;
    background: rgba(255, 255, 255, .2);
    backdrop-filter: blur(4px);
    border-radius: 999px;
    padding: 8px 12px;
    line-height: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 1;
}

@media (max-width: 1228px){
    .kw-hero-intel__help{
        display: none!important;
    }
}

@media (max-width: 768px){
    .woot--bubble-holder{
        display: none!important;
    }
}

.kw-hero-intel__help img{ height: 13.5px; }

/* عناصر قبلی که باید حذف/مخفی شوند تا مثل عکس شود */
.kw-hero-intel__brand,
.kw-hero-intel__headline,
.hero-segment{ display: none !important; }

/* ریسپانسیو موبایل */
@media (max-width: 768px){
    .kw-hero-intel{
        margin: 0;
        border-radius: 0;
        min-height: calc(100vh - 84px); /* تمام ارتفاع صفحه (fallback) */
        min-height: calc(100dvh - 84px);/* تمام ارتفاع صفحه */
    }
    .kw-hero-topbar{ inset-inline: 8px; top: 8px; height: 52px; }
    .kw-circle-btn{ width: 34px; height: 34px; }
    .kw-hero-intel__bottom{ width: min(760px, calc(100% - 24px)); bottom: calc(12px + env(safe-area-inset-bottom, 0)); }
}


/* ===== Chat container (scrollable) ===== */
.kw-chat{
    position: absolute;
    inset-inline: clamp(8px, 4vw, 32px);         /* فاصله‌ی امن از لبه‌ها */
    top: calc(8px + var(--topbar-h));     /* زیر تاپ‌بار */
    bottom: 0;   /* بالای نوار ورودی */
    z-index: 1;
}
.kw-chat__scroll{
    height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    scroll-behavior: smooth;
    padding-inline: clamp(8px, 2vw, 16px);
    display: flex;
    justify-content: center;
    overflow-x: hidden;
}
.kw-chat__list{
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 760px;          /* عرض محتوای چت */
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ردیف هر پیام */
.msg-row{ position: relative; display: flex; }
.msg-row.is-ai{ justify-content: flex-end; }   /* راست */
.msg-row.is-user{ justify-content: flex-start; }/* چپ */

/* حباب پیام */
.chat-msg{
    max-width: min(640px, 88%);
    border-radius: 18px;
    padding: 10px 14px;
    font-family: IRANSansXVF, "IRANSans", system-ui;
    font-size: 16px;
    line-height: 1.9;
    box-shadow: 0 8px 24px rgba(0,0,0,.18);
}

/* دستیار (سفید) */
.chat-msg.is-ai{
    background: #ffffff;
    color: #0f1a2a;
    border: 1px solid rgba(0,0,0,.06);
}

/* کاربر (حباب شیشه‌ای ملایم) */
.chat-msg.is-user{
    background: linear-gradient(180deg, rgba(255,255,255,.38), rgba(255,255,255,.18));
    color: #f1f6ff;
    border: 1px solid rgba(255,255,255,.28);
    box-shadow: 0 8px 24px rgba(0,0,0,.18), inset 0 -1px 0 rgba(255,255,255,.35);
    backdrop-filter: blur(8px);
}

/* نقطه‌ی کنار پیام‌های دستیار */
.msg-dot{
    position: absolute;
    width: 8px; height: 8px; border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255,255,255,.18);
    inset-inline-end: -18px;           /* سمت راست در RTL */
    top: calc(50% - 4px);
    opacity: .95;
}
.msg-row.is-user .msg-dot{ display: none; }

/* اسکرول‌بار ظریف (اختیاری) */
.kw-chat__scroll::-webkit-scrollbar{ width: 8px; }
.kw-chat__scroll::-webkit-scrollbar-thumb{ background: rgba(255,255,255,.25); border-radius: 999px; }
.kw-chat__scroll::-webkit-scrollbar-track{ background: transparent; }

@media (max-width: 768px){
    .kw-chat{
        inset-inline: 8px;
        top: calc(8px + var(--topbar-h) + 6px);
        bottom: calc(var(--input-h, 92px) + 12px);
    }
    .chat-msg{ max-width: 92%; font-size: 15px; }
}
