.goftiran-root, .goftiran-root *:not([class*="fa-"]) {
        font-family: 'Vazirmatn', Tahoma, sans-serif;
        box-sizing: border-box;
}
.goftiran-root * {
        box-sizing: border-box;
}

/* ===== حالت ایزوله‌سازی استایل (نسخه ۱.۲۵.۰) =====
   وقتی فعال باشد، تمام استایل‌های افزونه با !important و all:initial اعمال می‌شوند
   تا هیچ استایل خارجی از قالب یا افزونه‌های دیگر نتواند روی ابزار چت تأثیر بگذارد. */
body.goftiran-isolation-on .goftiran-root,
body.goftiran-isolation-on .goftiran-root * {
        all: revert;
        box-sizing: border-box !important;
}
body.goftiran-isolation-on .goftiran-root {
        position: fixed !important;
        z-index: 2147483646 !important;
}
body.goftiran-isolation-on .goftiran-root button,
body.goftiran-isolation-on .goftiran-root input,
body.goftiran-isolation-on .goftiran-root textarea,
body.goftiran-isolation-on .goftiran-root select {
        margin: 0 !important;
        font-family: 'Vazirmatn', Tahoma, sans-serif !important;
        -webkit-appearance: none !important;
        appearance: none !important;
        line-height: normal !important;
}
body.goftiran-isolation-on .goftiran-root button {
        background: none !important;
        border: none !important;
        padding: 0 !important;
        cursor: pointer !important;
        color: inherit !important;
        font: inherit !important;
        text-transform: none !important;
}
body.goftiran-isolation-on .goftiran-root i.fa-solid,
body.goftiran-isolation-on .goftiran-root i.fas,
body.goftiran-isolation-on .goftiran-root i.fa-regular,
body.goftiran-isolation-on .goftiran-root i.far,
body.goftiran-isolation-on .goftiran-root i.fa-brands,
body.goftiran-isolation-on .goftiran-root i.fab {
        font-family: "Font Awesome 6 Free" !important;
        font-weight: 900 !important;
        font-style: normal !important;
}
/* ریست کامل برای ایزوله‌سازی از استایل‌های سایت (نسخه ۱۹.۲۰) */
.goftiran-root, .goftiran-root *, .goftiran-root *::before, .goftiran-root *::after {
        -webkit-text-size-adjust: 100%;
}
.goftiran-root button, .goftiran-root input, .goftiran-root textarea, .goftiran-root select {
        margin: 0 !important;
        font-family: inherit !important;
        -webkit-appearance: none;
        appearance: none;
        line-height: normal;
}
.goftiran-root button {
        background: none;
        border: none;
        padding: 0;
        cursor: pointer;
        color: inherit;
        font: inherit;
        text-transform: none;
}
.goftiran-root input, .goftiran-root textarea, .goftiran-root select {
        background: var(--gf-surface);
        color: var(--gf-text);
        border: 1px solid var(--gf-border);
        border-radius: var(--goftiran-form-radius, 10px);
        padding: var(--goftiran-form-padding, 10px) 12px;
        font-size: var(--goftiran-form-font-size, 13px);
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
}
.goftiran-root input[type="checkbox"], .goftiran-root input[type="radio"] {
        width: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        background: none !important;
        border-radius: 0 !important;
}
.goftiran-root input[type="file"] {
        padding: 6px !important;
        border: 1px dashed var(--gf-border) !important;
        background: var(--gf-surface) !important;
}
.goftiran-root textarea { resize: vertical; min-height: 60px; }
.goftiran-root a { color: inherit; text-decoration: none; }
.goftiran-root img { max-width: 100%; height: auto; }
.goftiran-root i { font-style: normal; }
.goftiran-root h1, .goftiran-root h2, .goftiran-root h3, .goftiran-root h4, .goftiran-root p {
        margin: 0; padding: 0;
}
.goftiran-root table { border-collapse: collapse; }
.goftiran-root ul, .goftiran-root ol { margin: 0; padding: 0; list-style: none; }
.goftiran-root label { cursor: pointer; }
.goftiran-root {
        position: fixed;
        bottom: var(--goftiran-icon-margin-bottom, 24px);
        z-index: var(--goftiran-z-index, 9999);
        direction: rtl;
        font-size: var(--goftiran-font-size, 14px);
}
/* ============ ایزوله‌سازی استایل: ریست قوی روی المان‌های داخل ویجت (نسخه ۱.۹.۵) ============
   جلوگیری از نفوذ استایل‌های سراسری سایت (button, i, input, textarea) به باکس گفتگو.
   فقط روی المان‌های داخل .goftiran-root اعمال می‌شود تا سایت تغییر نکند. */
.goftiran-root, .goftiran-root *, .goftiran-root *::before, .goftiran-root *::after {
        box-sizing: border-box;
        -webkit-text-size-adjust: 100%;
}
.goftiran-root button, .goftiran-root input, .goftiran-root textarea, .goftiran-root select {
        margin: 0;
        font-family: inherit;
        -webkit-appearance: none;
        appearance: none;
        line-height: normal;
}
.goftiran-root button {
        background: none;
        border: none;
        padding: 0;
        cursor: pointer;
        color: inherit;
        font: inherit;
}
.goftiran-root i { font-style: normal; }
.goftiran-root img { max-width: 100%; }
/* ============ جایگاه آیکون شناور: قابل‌تنظیم جدا برای دسکتاپ و موبایل ============ */
.goftiran-dpos-right { right: var(--goftiran-icon-margin-side, 24px); left: auto; }
.goftiran-dpos-left  { left: var(--goftiran-icon-margin-side, 24px); right: auto; }
.goftiran-dpos-center { left: 50%; right: auto; transform: translateX(-50%); }

.goftiran-dpos-right .goftiran-box  { right: 0; left: auto; }
.goftiran-dpos-left .goftiran-box   { left: 0; right: auto; }
.goftiran-dpos-center .goftiran-box { left: 50%; right: auto; transform: translateX(-50%); }
.goftiran-dpos-center .goftiran-launcher { margin: 0 auto; }

@media (max-width: 480px) {
        .goftiran-mpos-right  { right: var(--goftiran-icon-margin-side, 24px) !important; left: auto !important; transform: none !important; }
        .goftiran-mpos-left   { left: var(--goftiran-icon-margin-side, 24px) !important; right: auto !important; transform: none !important; }
        .goftiran-mpos-center { left: 50% !important; right: auto !important; transform: translateX(-50%) !important; }

        .goftiran-mpos-right .goftiran-box  { right: 0 !important; left: auto !important; transform: none !important; }
        .goftiran-mpos-left .goftiran-box   { left: 0 !important; right: auto !important; transform: none !important; }
        .goftiran-mpos-center .goftiran-box { left: 50% !important; right: auto !important; transform: translateX(-50%) !important; }
}

/* ============ متغیرهای حالت روشن (آبی/سبز/نارنجی) ============ */
.goftiran-root {
        --gf-primary: var(--goftiran-primary, #2563eb);
        --gf-secondary: var(--goftiran-secondary, #16a34a);
        --gf-accent: var(--goftiran-accent, #f59e0b);
        --gf-bg: #ffffff;
        --gf-surface: #f7f8fc;
        --gf-text: #1f2430;
        --gf-text-muted: #8a8f9c;
        --gf-border: rgba(0,0,0,.08);
        --gf-launcher-shadow: 0 8px 24px rgba(37,99,235,.35);
        --gf-glass: rgba(255,255,255,.6);
        --gf-glow: none;
}

/* ============ متغیرهای حالت تیره (مشکی/طلایی/نئون) ============ */
.goftiran-root[data-theme="dark"] {
        --gf-primary: var(--goftiran-dark-gold, #d4af37);
        --gf-secondary: var(--goftiran-dark-gold, #d4af37);
        --gf-accent: #f5d576;
        --gf-bg: var(--goftiran-dark-bg, #0b0b0f);
        --gf-surface: var(--goftiran-dark-surface, #16161d);
        --gf-text: var(--goftiran-dark-text, #f5f5f0);
        --gf-text-muted: #9a9aa5;
        --gf-border: rgba(212,175,55,.35);
        --gf-launcher-shadow: 0 0 24px rgba(212,175,55,.5);
        --gf-glass: rgba(22,22,29,.7);
        --gf-glow: 0 0 10px rgba(212,175,55,.6);
}

/* ============ آیکون شناور + متن کنار آن (نسخه ۱.۹.۵) ============ */
.goftiran-launcher-wrap {
        position: relative;
        display: inline-flex;
        align-items: center;
        flex-direction: row;
}
.goftiran-dpos-left .goftiran-launcher-wrap { flex-direction: row-reverse; }
.goftiran-mpos-left .goftiran-launcher-wrap { flex-direction: row-reverse !important; }

/* موقعیت لیبل نسبت به آیکون (نسخه ۱۹.۸) — مستقل از جایگاه آیکون */
.goftiran-label-pos-left .goftiran-launcher-wrap { flex-direction: row; }
.goftiran-label-pos-right .goftiran-launcher-wrap { flex-direction: row-reverse; }
.goftiran-label-pos-top .goftiran-launcher-wrap { flex-direction: column; }
.goftiran-label-pos-bottom .goftiran-launcher-wrap { flex-direction: column-reverse; }
/* در موبایل اگر آیکون سمت چپ باشد و لیبل چپ/راست، ترتیب حفظ شود */
.goftiran-mpos-left.goftiran-label-pos-left .goftiran-launcher-wrap { flex-direction: row !important; }
.goftiran-mpos-left.goftiran-label-pos-right .goftiran-launcher-wrap { flex-direction: row-reverse !important; }
.goftiran-mpos-left.goftiran-label-pos-top .goftiran-launcher-wrap { flex-direction: column !important; }
.goftiran-mpos-left.goftiran-label-pos-bottom .goftiran-launcher-wrap { flex-direction: column-reverse !important; }

/* ریست بوردرهای پیش‌فرض (نسخه ۱۹.۱۹) — حذف بوردر مشکی در حالت focus/active */
.goftiran-root button:focus, .goftiran-root input:focus, .goftiran-root select:focus, .goftiran-root textarea:focus { outline: none !important; }
.goftiran-root button:active, .goftiran-launcher:active { outline: none !important; border: none !important; }
.goftiran-theme-toggle-btn, .goftiran-close-btn, .goftiran-fullscreen-btn, .goftiran-faq-btn, .goftiran-theme-settings-btn { outline: none !important; }
.goftiran-theme-toggle-btn:focus, .goftiran-close-btn:focus, .goftiran-fullscreen-btn:focus { outline: none !important; box-shadow: none !important; }

/* آیکون شناور پیش‌فرض با شخصی‌سازی (نسخه ۱۹.۱۹) */
.goftiran-launcher {
        width: var(--goftiran-launcher-size, 70px);
        height: var(--goftiran-launcher-size, 70px);
        background: var(--gf-launcher-default-bg, #f59e0b) !important;
        border: var(--gf-launcher-default-border-width, 0px) solid var(--gf-launcher-default-border-color, #f59e0b) !important;
        border-radius: var(--gf-launcher-default-radius, 50%) !important;
        padding: var(--gf-launcher-default-padding, 0px) !important;
        color: #fff; cursor: pointer;
        display: flex; align-items: center; justify-content: center;
        box-shadow: var(--gf-launcher-shadow);
        transition: transform .2s ease, box-shadow .3s ease;
        position: relative; flex-shrink: 0;
}
.goftiran-launcher:hover { transform: scale(1.06); }
.goftiran-launcher-icon {
        color: var(--gf-launcher-default-icon-color, #fff) !important;
        font-size: var(--gf-launcher-default-icon-size, 28px) !important;
        line-height: 1;
}
.goftiran-launcher img { width: calc(var(--goftiran-launcher-size, 70px) * 0.5); height: calc(var(--goftiran-launcher-size, 70px) * 0.5); object-fit: contain; }

/* افکت چشمک برای نام اوپراتور و دکمه تغییر (نسخه ۱۹.۱۹) */
@keyframes goftiran-blink-effect {
        0%, 100% { opacity: 1; text-shadow: 0 0 0 transparent; }
        50% { opacity: .7; text-shadow: 0 0 8px currentColor; }
}
.goftiran-header-operator-name {
        animation: goftiran-blink-effect 3s ease-in-out infinite;
}
#goftiran-change-operator-btn {
        animation: goftiran-blink-effect 3s ease-in-out infinite;
}
/* تأخیر نمایش آیکون شناور (نسخه ۱۹.۱۳) */
.goftiran-root.goftiran-delayed-show { opacity: 0; visibility: hidden; transition: opacity .4s ease, visibility .4s ease; }
.goftiran-root.goftiran-delayed-show.goftiran-delay-show-now { opacity: 1; visibility: visible; }
.goftiran-unread-dot {
        position: absolute; top: 2px; left: 2px;
        width: 12px; height: 12px; background: #ef4444; border-radius: 50%; border: 2px solid #fff;
}

/* متن کنار آیکون شناور */
.goftiran-launcher-label {
        background: var(--goftiran-label-bg, #fff);
        color: var(--goftiran-label-text-color, #1f2430);
        font-size: var(--goftiran-label-font-size, 13px);
        padding: var(--goftiran-label-pad-y, 6px) var(--goftiran-label-pad-x, 12px);
        margin: var(--goftiran-label-mar-y, 0) var(--goftiran-label-mar-x, 0);
        border-radius: var(--goftiran-label-radius, 10px);
        border: var(--goftiran-label-border-width, 1px) solid var(--goftiran-label-border-color, #e2e5ec);
        box-shadow: var(--goftiran-label-shadow, none);
        text-align: var(--goftiran-label-align, right);
        white-space: nowrap;
        line-height: 1.5;
        font-weight: 600;
        pointer-events: none;
}
.goftiran-launcher-wrap { gap: var(--goftiran-label-gap, 10px); }

/* نمایش فقط هنگام hover — در حالت همیشگی کلاس goftiran-label-always روی root است */
.goftiran-root.goftiran-label-on:not(.goftiran-label-always) .goftiran-launcher-label {
        opacity: 0;
        visibility: hidden;
        transition: opacity .25s ease, transform .25s ease, visibility .25s;
}
.goftiran-root.goftiran-label-on:not(.goftiran-label-always) .goftiran-launcher-wrap:hover .goftiran-launcher-label {
        opacity: 1;
        visibility: visible;
}
/* انیمیشن‌های ورود/خروج متن */
.goftiran-launcher-label.anim-fade { animation: goftiran-label-fade .3s ease both; }
.goftiran-launcher-label.anim-slide { animation: goftiran-label-slide .3s ease both; }
.goftiran-launcher-label.anim-zoom { animation: goftiran-label-zoom .3s ease both; }
.goftiran-launcher-label.anim-flip { animation: goftiran-label-flip .35s ease both; }
.goftiran-launcher-label.anim-bounce { animation: goftiran-label-bounce .4s ease both; }
@keyframes goftiran-label-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes goftiran-label-slide { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: translateX(0); } }
@keyframes goftiran-label-zoom { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: scale(1); } }
@keyframes goftiran-label-flip { from { opacity: 0; transform: perspective(200px) rotateY(60deg); } to { opacity: 1; transform: rotateY(0); } }
@keyframes goftiran-label-bounce { 0% { opacity: 0; transform: translateY(-16px); } 60% { opacity: 1; transform: translateY(4px); } 100% { transform: translateY(0); } }

.goftiran-box {
        position: absolute; bottom: calc(var(--goftiran-launcher-size, 70px) + 14px);
        width: var(--goftiran-width, 350px); height: var(--goftiran-height, 450px);
        background: var(--gf-bg); border-radius: var(--goftiran-radius, 16px);
        box-shadow: 0 12px 40px rgba(0,0,0,.18);
        display: flex; flex-direction: column; overflow: hidden;
        animation: goftiran-pop .22s ease;
        max-width: calc(100vw - 32px);
        max-height: calc(100vh - 120px);
        border: 1px solid var(--gf-border);
        transition: background .25s ease, border-color .25s ease;
}
.goftiran-root[data-theme="dark"] .goftiran-box {
        box-shadow: 0 0 0 1px rgba(212,175,55,.25), 0 20px 60px rgba(0,0,0,.6);
}
@keyframes goftiran-pop {
        from { opacity: 0; transform: translateY(16px) scale(.97); }
        to { opacity: 1; transform: translateY(0) scale(1); }
}

.goftiran-header {
        background: linear-gradient(135deg, var(--gf-primary), var(--gf-secondary));
        color: var(--goftiran-header-text, #fff);
        padding: var(--gf-header-pad, 10px);
        margin: var(--gf-header-mar, 0px);
        display: flex; flex-direction: column; gap: 8px;
}
.goftiran-root[data-theme="dark"] .goftiran-header {
        background: linear-gradient(135deg, #1a1a22, #0d0d12);
        color: var(--gf-primary);
        border-bottom: 1px solid var(--gf-border);
}
/* نسخه ۱.۲۳.۰ — کانتینر والد بالایی (۱۰۰٪ عرض، شامل دو کانتینر آیکون‌ها و اطلاعات) */
.goftiran-header-top-wrap {
        display: flex; flex-direction: row; align-items: stretch; gap: 8px;
        width: 100%; box-sizing: border-box;
}
/* کانتینر آیکون‌های هدر (نسخه ۱۹.۲۱ + ۱.۲۳.۰ — ۵۰٪ عرض با ترازبندی افقی/عمودی) */
.goftiran-header-icons-container {
        display: flex; gap: 5px; flex: 0 0 50%; width: 50%; max-width: 50%; min-width: 0;
        padding: var(--gf-icons-pad, 8px);
        margin: var(--gf-icons-mar, 0px);
        box-sizing: border-box;
}
/* کانتینر اطلاعات هدر (نسخه ۱۹.۲۱ + ۱.۲۳.۰ — ۵۰٪ عرض با ترازبندی افقی/عمودی) */
.goftiran-header-info-container {
        display: flex; gap: 10px; flex: 0 0 50%; width: 50%; max-width: 50%; min-width: 0;
        padding: var(--gf-info-pad, 8px);
        margin: var(--gf-info-mar, 0px);
        box-sizing: border-box;
}
/* ترازبندی افقی محتوا (نسخه ۱.۲۳.۰) */
.goftiran-halign-right { justify-content: flex-start; text-align: right; }
.goftiran-halign-center { justify-content: center; text-align: center; }
.goftiran-halign-left { justify-content: flex-end; text-align: left; }
/* ترازبندی عمودی محتوا (نسخه ۱.۲۳.۰) */
.goftiran-valign-top { align-items: flex-start; }
.goftiran-valign-middle { align-items: center; }
.goftiran-valign-bottom { align-items: flex-end; }
/* سازگاری با کلاس قدیمی goftiran-info-align-* (نسخه ۱۹.۲۱) */
.goftiran-info-align-right { justify-content: flex-start; text-align: right; }
.goftiran-info-align-center { justify-content: center; text-align: center; }
.goftiran-info-align-left { justify-content: flex-end; text-align: left; }
.goftiran-header-icon-btn {
        background: rgba(255,255,255,.15) !important; border: none !important; color: inherit !important;
        width: 30px !important; height: 30px !important; border-radius: var(--gf-icon-radius, 8px) !important;
        cursor: pointer; display: flex !important; align-items: center !important; justify-content: center !important;
        font-size: var(--gf-icon-size, 13px) !important; flex-shrink: 0; transition: background .2s, opacity .2s;
        outline: none !important; padding: 0 !important; margin: 0 !important;
}
.goftiran-header-icon-btn:hover { background: rgba(255,255,255,.28) !important; }
.goftiran-root[data-theme="dark"] .goftiran-header-icon-btn { background: rgba(212,175,55,.12) !important; }
.goftiran-root[data-theme="dark"] .goftiran-header-icon-btn:hover { background: rgba(212,175,55,.22) !important; }
.goftiran-header-info-text { min-width: 0; }
.goftiran-header-info-text .goftiran-title { font-weight: 700; font-size: 14px; text-shadow: var(--gf-glow); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.goftiran-header-info-text .goftiran-status { font-size: 11px; display: flex; align-items: center; gap: 5px; opacity: .9; }
.goftiran-avatar { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.goftiran-root[data-theme="dark"] .goftiran-avatar { background: rgba(212,175,55,.15); box-shadow: var(--gf-glow); }
.goftiran-avatar-ai { background: rgba(255,255,255,.25); animation: goftiran-ai-pulse 2.4s ease-in-out infinite; }
@keyframes goftiran-ai-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,.35); } 50% { box-shadow: 0 0 0 6px rgba(255,255,255,0); } }
.goftiran-title { font-weight: 700; font-size: 14px; text-shadow: var(--gf-glow); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.goftiran-ai-badge {
        display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 600;
        background: rgba(255,255,255,.22); padding: 2px 8px; border-radius: 20px; text-shadow: none;
        transition: background .2s, transform .15s;
}
/* نسخه ۱.۲۲.۰ — لیبل دستیار هوش مصنوعی قابل کلیک برای تغییر اوپراتور */
#goftiran-ai-badge-trigger { cursor: pointer; user-select: none; }
#goftiran-ai-badge-trigger:hover {
        background: rgba(255,255,255,.4) !important;
        transform: scale(1.05);
}
#goftiran-ai-badge-trigger:active { transform: scale(.98); }
.goftiran-status { font-size: 11px; display: flex; align-items: center; gap: 5px; opacity: .9; }
.goftiran-status-dot { width: 7px; height: 7px; border-radius: 50%; background: #9ca3af; }
.goftiran-status-dot.online { background: #22c55e; box-shadow: 0 0 6px #22c55e; }
.goftiran-header-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.goftiran-theme-toggle-btn, .goftiran-close-btn, .goftiran-fullscreen-btn { background: rgba(255,255,255,.15); border: none; color: inherit; font-size: 13px; cursor: pointer; opacity: .9; width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; transition: background .2s, opacity .2s; }
.goftiran-root[data-theme="dark"] .goftiran-theme-toggle-btn, .goftiran-root[data-theme="dark"] .goftiran-close-btn, .goftiran-root[data-theme="dark"] .goftiran-fullscreen-btn { background: rgba(212,175,55,.12); border: 1px solid var(--gf-border); }
.goftiran-theme-toggle-btn:hover, .goftiran-close-btn:hover, .goftiran-fullscreen-btn:hover { opacity: 1; background: rgba(255,255,255,.28); }
.goftiran-root[data-theme="dark"] .goftiran-theme-toggle-btn:hover, .goftiran-root[data-theme="dark"] .goftiran-close-btn:hover, .goftiran-root[data-theme="dark"] .goftiran-fullscreen-btn:hover { background: rgba(212,175,55,.22); }
.goftiran-theme-icon-dark { display: none; }
.goftiran-root[data-theme="dark"] .goftiran-theme-icon-light { display: none; }
.goftiran-root[data-theme="dark"] .goftiran-theme-icon-dark { display: inline; }
/* آیکون دکمه تمام‌صفحه: expand در حالت عادی، compress در حالت تمام‌صفحه */
.goftiran-fs-icon-compress { display: none; }
.goftiran-box.goftiran-fullscreen .goftiran-fs-icon-expand { display: none; }

/* ============ نوار اطلاعات اپراتور + ساعت کاری زنده در هدر (نسخه ۱۹.۷ + ۱.۲۳.۰) ============ */
/* نسخه ۱.۲۳.۰ — کانتینر اوپراتور همیشه تمام عرض ۱۰۰٪ زیر دو کانتینر بالایی قرار می‌گیرد */
.goftiran-header-operator-bar {
        display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
        padding: var(--gf-op-pad, 8px) 12px; margin: var(--gf-op-mar, 0px);
        border-radius: 10px;
        background: rgba(255,255,255,.10); backdrop-filter: blur(4px);
        animation: goftiran-fade .3s ease;
        width: 100%; box-sizing: border-box;
}
.goftiran-root[data-theme="dark"] .goftiran-header-operator-bar {
        background: rgba(212,175,55,.08); border: 1px solid rgba(212,175,55,.18);
}
/* ترازبندی افقی محتوای کانتینر اوپراتور (نسخه ۱.۲۳.۰) */
.goftiran-op-align-right { justify-content: flex-start; }
.goftiran-op-align-center { justify-content: center; }
.goftiran-op-align-left { justify-content: flex-end; }
.goftiran-header-operator-info { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.goftiran-header-operator-label { opacity: .75; font-size: 11px; }
.goftiran-header-operator-name {
        font-weight: 700; font-size: 13px; cursor: pointer; transition: color .15s, text-decoration .15s;
        display: inline-flex; align-items: center; gap: 4px;
}
.goftiran-header-operator-name::after { content: '\f073'; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: 10px; opacity: .6; }
.goftiran-header-operator-name:hover { text-decoration: underline; opacity: .85; }
.goftiran-change-operator-btn {
        background: rgba(255,255,255,.15); border: none; color: inherit; cursor: pointer;
        width: 24px; height: 24px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center;
        font-size: 11px; margin-inline-start: 4px; flex-shrink: 0; transition: background .2s;
}
.goftiran-change-operator-btn:hover { background: rgba(255,255,255,.28); }
.goftiran-root[data-theme="dark"] .goftiran-change-operator-btn { background: rgba(212,175,55,.12); }
.goftiran-header-operator-hours { display: flex; align-items: center; gap: 6px; margin-inline-start: auto; }
.goftiran-header-operator-hours .goftiran-op-hours-label { margin-top: 0 !important; }
/* وقتی اپراتوری انتخاب نشده (بدون اپراتور) — نسخه ۱.۲۳.۰: کانتینر در جای خود باقی می‌ماند ولی محتوا خالی است */
.goftiran-header-operator-bar.is-empty {
        /* نمایش یک نگهدارنده خالی برای حفظ ساختار — محتوا «انتخاب نشده» نمایش داده می‌شود */
        display: flex; opacity: .7;
}
.goftiran-header-operator-bar.is-empty .goftiran-header-operator-info { opacity: .6; }

/* ریسپانسیو موبایل — نسخه ۱.۲۳.۰: روی موبایل دو کانتینر بالایی همچنان ۵۰/۵۰ می‌مانند */
@media (max-width: 480px) {
        .goftiran-header { padding: 8px; gap: 6px; }
        .goftiran-header-top-wrap { gap: 4px; }
        .goftiran-header-icons-container,
        .goftiran-header-info-container { padding: 4px !important; }
        .goftiran-header-icons-container { gap: 3px; }
        .goftiran-header-icon-btn { width: 28px !important; height: 28px !important; font-size: 12px !important; }
        .goftiran-avatar { width: 30px; height: 30px; font-size: 14px; }
        .goftiran-header-info-text .goftiran-title { font-size: 12px; }
        .goftiran-header-info-text .goftiran-status { font-size: 10px; }
        .goftiran-header-operator-bar { padding: 6px 10px; font-size: 11px; }
}

/* پنل تغییر اوپراتور اینلاین (نسخه ۱۹.۱۹) */
.goftiran-operator-change-panel {
        flex: 1; display: flex; flex-direction: column; background: var(--gf-bg, #fff); overflow: hidden;
}
.goftiran-op-change-head {
        display: flex; align-items: center; justify-content: space-between; padding: 12px 16px;
        background: linear-gradient(135deg, var(--gf-primary, #2563eb), var(--gf-secondary, #16a34a)); color: #fff; flex-shrink: 0;
}
.goftiran-root[data-theme="dark"] .goftiran-op-change-head { background: linear-gradient(135deg, #1a1a22, #0d0d12); color: var(--gf-primary, #d4af37); }
.goftiran-op-change-title { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.goftiran-op-change-close {
        background: rgba(255,255,255,.2); border: none; color: #fff; cursor: pointer; width: 28px; height: 28px;
        border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 13px;
}
.goftiran-op-change-body { padding: 14px; overflow-y: auto; flex: 1; }
.goftiran-op-change-desc { font-size: 12px; color: var(--gf-text-muted, #8a8f9c); margin-bottom: 12px; line-height: 1.6; }
.goftiran-op-change-options { display: flex; flex-direction: column; gap: 8px; }
.goftiran-op-change-option {
        display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
        background: var(--gf-surface, #f7f8fc); border: 2px solid var(--gf-border, #e2e5ec); cursor: pointer; transition: all .18s;
}
.goftiran-op-change-option:hover { border-color: var(--gf-primary, #2563eb); transform: translateY(-1px); }
.goftiran-op-change-option.selected { border-color: var(--gf-primary, #2563eb); background: color-mix(in srgb, var(--gf-primary, #2563eb) 8%, var(--gf-surface, #f7f8fc)); }
.goftiran-op-change-avatar {
        width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
        background: linear-gradient(135deg, var(--gf-primary, #2563eb), var(--gf-secondary, #16a34a)); color: #fff;
        display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.goftiran-op-change-avatar img { width: 100%; height: 100%; object-fit: cover; }
.goftiran-op-change-info { flex: 1; min-width: 0; }
.goftiran-op-change-info strong { font-size: 13px; color: var(--gf-text, #1f2430); display: block; }
.goftiran-op-change-info span { font-size: 11px; color: var(--gf-text-muted, #8a8f9c); }
.goftiran-op-change-info span.is-online { color: #16a34a; font-weight: 600; }
.goftiran-op-change-info span.is-offline { color: #dc2626; font-weight: 600; }
.goftiran-box.goftiran-fullscreen .goftiran-fs-icon-compress { display: inline; }

.goftiran-preform { flex: 1; padding: 16px; overflow-y: auto; background: var(--gf-bg); color: var(--gf-text); display: flex; flex-direction: column; }
.goftiran-preform-inner { flex: 1; display: flex; flex-direction: column; }
.goftiran-preform-desc { font-size: 13px; color: var(--gf-text-muted); margin-top: 0; line-height: 1.8; }
#goftiran-preform-form { flex: 1; display: flex; flex-direction: column; gap: var(--goftiran-form-gap, 6px) !important; }
.goftiran-preform-fields { flex: 1; display: flex; flex-direction: column; gap: var(--goftiran-form-gap, 6px) !important; overflow-x: hidden; max-width: 100%; }
/* فیلدها همیشه عمودی، بدون اسکرول افقی (نسخه ۱۹.۲۰) — گپ یکسان در موبایل و دسکتاپ (نسخه ۱.۲۴.۱) */
.goftiran-fields-flex { flex-direction: column !important; flex-wrap: nowrap !important; gap: var(--goftiran-form-gap, 6px) !important; overflow-x: hidden; max-width: 100%; }
.goftiran-fields-flex .goftiran-form-row { min-width: 0 !important; box-sizing: border-box; width: 100% !important; flex: 0 0 auto !important; max-width: 100% !important; overflow: hidden; margin-bottom: 0 !important; }
/* موبایل: همه فیلدها تمام عرض، عمودی زیر هم — گپ یکسان با دسکتاپ (نسخه ۱.۲۴.۱) */
@media (max-width: 480px) {
        .goftiran-fields-flex { flex-direction: column !important; gap: var(--goftiran-form-gap, 6px) !important; }
        .goftiran-fields-flex .goftiran-form-row { width: 100% !important; flex: 0 0 auto !important; min-width: 0 !important; margin-bottom: 0 !important; }
        #goftiran-preform-form { gap: var(--goftiran-form-gap, 6px) !important; }
        .goftiran-preform-fields { gap: var(--goftiran-form-gap, 6px) !important; }
}
/* استایل گزینه‌های رادیو و چک‌باکس (نسخه ۱۹.۱۸) */
.goftiran-radio-group, .goftiran-checkbox-group { display: flex; flex-direction: column; gap: 6px; }
.goftiran-radio-item, .goftiran-checkbox-item { display: flex; align-items: center; gap: 6px; font-size: var(--goftiran-form-font-size, 13px); color: var(--goftiran-form-text, var(--gf-text)); cursor: pointer; }
.goftiran-radio-item input, .goftiran-checkbox-item input { width: 16px; height: 16px; cursor: pointer; }
.goftiran-checkbox-single { display: flex; align-items: center; gap: 6px; font-size: var(--goftiran-form-font-size, 13px); color: var(--goftiran-form-text, var(--gf-text)); cursor: pointer; }

/* ===== استایل فیلدهای فرم پیش از گفتگو (نسخه ۱.۲۲.۰ — بازنویسی با اولویت بالا) ===== */
.goftiran-form-row { margin-bottom: 0; }
.goftiran-form-row label {
        display: block; margin-bottom: 5px; font-weight: var(--goftiran-form-font-weight, 400);
        color: var(--goftiran-form-label, #1f2430) !important;
        font-size: var(--goftiran-form-font-size, 13px) !important;
}
.goftiran-form-row label .goftiran-req { color: #ef4444; font-weight: 700; }
/* همه فیلدهای ورودی (input/textarea/select) — استایل یکسان قابل تنظیم */
.goftiran-root .goftiran-form-row input[type="text"],
.goftiran-root .goftiran-form-row input[type="email"],
.goftiran-root .goftiran-form-row input[type="tel"],
.goftiran-root .goftiran-form-row input[type="number"],
.goftiran-root .goftiran-form-row input[type="url"],
.goftiran-root .goftiran-form-row input[type="date"],
.goftiran-root .goftiran-form-row input[type="time"],
.goftiran-root .goftiran-form-row input[type="password"],
.goftiran-root .goftiran-form-row input[type="file"],
.goftiran-root .goftiran-form-row textarea,
.goftiran-root .goftiran-form-row select {
        width: 100% !important; box-sizing: border-box !important;
        border: var(--goftiran-form-border-width, 1px) solid var(--goftiran-form-border, #cccccc) !important;
        border-radius: var(--goftiran-form-radius, 8px) !important;
        padding: var(--goftiran-form-padding, 8px) !important;
        font-size: var(--goftiran-form-font-size, 13px) !important;
        font-weight: var(--goftiran-form-font-weight, 400) !important;
        background: var(--goftiran-form-bg, #ffffff) !important;
        color: var(--goftiran-form-text, #1f2430) !important;
        transition: border-color .2s, box-shadow .2s, background .2s !important;
        font-family: inherit !important;
        outline: none !important;
        margin: 0 !important;
}
.goftiran-root .goftiran-form-row input::placeholder,
.goftiran-root .goftiran-form-row textarea::placeholder {
        color: var(--goftiran-form-hover, #9ca3af) !important;
        opacity: 1 !important;
}
.goftiran-root .goftiran-form-row input:hover,
.goftiran-root .goftiran-form-row textarea:hover,
.goftiran-root .goftiran-form-row select:hover {
        border-color: var(--goftiran-form-hover, #9ca3af) !important;
}
.goftiran-root .goftiran-form-row input:focus,
.goftiran-root .goftiran-form-row textarea:focus,
.goftiran-root .goftiran-form-row select:focus {
        outline: none !important;
        border-color: var(--goftiran-form-focus, #2563eb) !important;
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--goftiran-form-focus, #2563eb) 15%, transparent) !important;
}
.goftiran-form-row textarea { min-height: 60px; resize: vertical; }
.goftiran-form-row select { cursor: pointer; appearance: auto; }

/* ===== استایل دکمه‌های فرم (ذخیره / ادامه / شروع گفتگو) — نسخه ۱.۲۲.۰ ===== */
.goftiran-start-btn,
.goftiran-root .goftiran-preform button[type="submit"],
.goftiran-root .goftiran-preform .goftiran-start-btn {
        background: var(--goftiran-form-btn-bg, #16a34a) !important;
        color: var(--goftiran-form-btn-text, #ffffff) !important;
        border: var(--goftiran-form-btn-border-width, 0px) solid var(--goftiran-form-btn-border-color, #16a34a) !important;
        border-radius: var(--goftiran-form-btn-radius, 8px) !important;
        padding: var(--goftiran-form-btn-padding, 8px) !important;
        font-size: var(--goftiran-form-btn-font-size, 15px) !important;
        font-weight: var(--goftiran-form-btn-font-weight, 600) !important;
        cursor: pointer !important;
        margin-top: 4px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
        text-align: var(--goftiran-form-btn-align, center) !important;
        box-shadow: none !important;
        transition: background .2s ease, transform .15s ease !important;
        font-family: inherit !important;
        box-sizing: border-box !important;
}
.goftiran-start-btn:hover,
.goftiran-root .goftiran-preform button[type="submit"]:hover,
.goftiran-root .goftiran-preform .goftiran-start-btn:hover {
        background: var(--goftiran-form-btn-hover-bg, #15803d) !important;
        transform: translateY(-1px) !important;
        box-shadow: none !important;
}
/* حالت تمام‌عرض یا عرض خودکار */
.goftiran-root[data-form-btn-full="1"] .goftiran-start-btn,
.goftiran-root[data-form-btn-full="1"] .goftiran-preform button[type="submit"] {
        width: 100% !important;
}
.goftiran-root[data-form-btn-full="0"] .goftiran-start-btn,
.goftiran-root[data-form-btn-full="0"] .goftiran-preform button[type="submit"] {
        width: auto !important; min-width: 140px;
}
.goftiran-root[data-form-btn-full="0"] #goftiran-preform-form {
        align-items: var(--goftiran-form-btn-align, center);
}
/* ترازبندی دکمه وقتی تمام‌عرض نیست */
.goftiran-root[data-form-btn-align="right"][data-form-btn-full="0"] #goftiran-preform-form { align-items: flex-start; }
.goftiran-root[data-form-btn-align="left"][data-form-btn-full="0"] #goftiran-preform-form { align-items: flex-end; }
.goftiran-root[data-form-btn-align="center"][data-form-btn-full="0"] #goftiran-preform-form { align-items: center; }
/* حالت تیره — Override نکن */
.goftiran-root[data-theme="dark"] .goftiran-start-btn { color: var(--goftiran-form-btn-text, #ffffff) !important; box-shadow: none !important; }

/* ریسپانسیو موبایل */
@media (max-width: 480px) {
        .goftiran-root .goftiran-form-row input,
        .goftiran-root .goftiran-form-row textarea,
        .goftiran-root .goftiran-form-row select {
                padding: var(--goftiran-form-padding, 8px) !important;
                font-size: var(--goftiran-form-font-size, 13px) !important;
        }
        .goftiran-start-btn,
        .goftiran-root .goftiran-preform button[type="submit"] {
                padding: var(--goftiran-form-btn-padding, 8px) !important;
                font-size: var(--goftiran-form-btn-font-size, 15px) !important;
                width: 100% !important;
        }
}
@media (max-width: 380px) {
        .goftiran-form-row label { font-size: var(--goftiran-form-font-size, 13px) !important; }
        .goftiran-root .goftiran-form-row input,
        .goftiran-root .goftiran-form-row textarea,
        .goftiran-root .goftiran-form-row select { padding: var(--goftiran-form-padding, 8px) !important; }
}

/* صفحه مسدودی */
.goftiran-blocked-screen {
        flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
        text-align: center; padding: 30px 24px; background: #fef2f2; color: #7f1d1d; gap: 4px;
}
.goftiran-blocked-icon { font-size: 40px; margin-bottom: 10px; }
.goftiran-blocked-title { font-size: 16px; font-weight: 700; margin: 0 0 8px; }
.goftiran-blocked-message { font-size: 13px; line-height: 1.9; margin: 0 0 18px; opacity: .9; }
.goftiran-contact-btn {
        display: inline-block; padding: 10px 26px; border-radius: 10px; background: #dc2626; color: #fff;
        text-decoration: none; font-size: 13px; font-weight: 700;
}

/* بنر بسته‌بودن گفتگو */
.goftiran-closed-banner {
        display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center;
        padding: 14px 16px; background: var(--gf-surface); border-top: 1px solid var(--gf-border); font-size: 12.5px; color: var(--gf-text-muted);
}
.goftiran-reopen-btn {
        background: linear-gradient(135deg, var(--gf-primary), var(--gf-secondary)); color: #fff; border: none;
        padding: 8px 20px; border-radius: 10px; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.goftiran-root[data-theme="dark"] .goftiran-reopen-btn { color: #0b0b0f; }

.goftiran-chat-body { flex: 1; display: flex; flex-direction: column; min-height: 0; background: var(--gf-bg); }
.goftiran-messages { flex: 1; overflow-y: auto; padding: 16px; background: var(--gf-surface); display: flex; flex-direction: column; gap: 4px; }

.goftiran-msg { max-width: 78%; margin-bottom: 10px; display: flex; flex-direction: column; }
.goftiran-msg.user { align-self: flex-end; align-items: flex-end; }
.goftiran-msg.admin { align-self: flex-start; align-items: flex-start; }
.goftiran-bubble {
        padding: 9px 13px; border-radius: var(--goftiran-radius, 14px); font-size: var(--goftiran-font-size, 13px); line-height: 1.8;
        word-break: break-word;
}
.goftiran-msg.user .goftiran-bubble { background: linear-gradient(135deg, var(--gf-primary), var(--gf-secondary)); color: #fff; border-bottom-left-radius: 4px; }
.goftiran-root[data-theme="dark"] .goftiran-msg.user .goftiran-bubble { color: #0b0b0f; font-weight: 600; box-shadow: var(--gf-glow); }
.goftiran-msg.admin .goftiran-bubble { background: var(--gf-bg); color: var(--gf-text); border: 1px solid var(--gf-border); border-bottom-right-radius: 4px; }
.goftiran-msg-time { font-size: 10px; color: var(--gf-text-muted); margin-top: 3px; }
.goftiran-msg .goftiran-chat-image { max-width: 200px; border-radius: 10px; display: block; }
.goftiran-msg audio { max-width: 220px; }

/* ============ پیام سیستمی (اخطار کلمات نامناسب) ============ */
.goftiran-msg.system { max-width: 100%; align-self: center; align-items: center; }
.goftiran-msg.system .goftiran-bubble {
        background: #fef3c7; color: #92400e; border: 1px solid #fde68a; font-size: 12px; text-align: center;
        border-radius: 10px; max-width: 92%;
}
.goftiran-root[data-theme="dark"] .goftiran-msg.system .goftiran-bubble { background: rgba(251,191,36,.12); color: #fbbf24; border-color: rgba(251,191,36,.3); }

/* ============ برچسب پاسخ دستیار هوش مصنوعی ============ */
.goftiran-msg-ai-label { font-size: 10px; font-weight: 600; color: var(--gf-primary); margin-bottom: 4px; display: flex; align-items: center; gap: 4px; }
.goftiran-date-sep { text-align: center; font-size: 11px; color: var(--gf-text-muted); margin: 12px 0; }

.goftiran-typing { padding: 6px 16px; font-size: 12px; color: var(--gf-text-muted); display: flex; align-items: center; gap: 6px; }
.goftiran-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gf-primary); animation: goftiran-blink 1.2s infinite; }
.goftiran-dot:nth-child(2) { animation-delay: .2s; }
.goftiran-dot:nth-child(3) { animation-delay: .4s; }
@keyframes goftiran-blink { 0%,80%,100% { opacity: .2; } 40% { opacity: 1; } }

/* ============ استایل آیکون‌های فرم چت (composer) — مستقل لایت/دارک با ایزوله‌سازی (نسخه ۱.۹.۵) ============
   استفاده از !important برای جلوگیری از نفوذ استایل‌های سراسری سایت (button, i, .fa).
   رنگ‌ها جداگانه برای حالت روشن و تیره از تنظیمات مدیر اعمال می‌شود. */
.goftiran-composer {
        display: flex; align-items: center; gap: var(--goftiran-comp-gap, 6px);
        padding: 10px; border-top: 1px solid var(--gf-border); background: var(--gf-bg);
}
/* فیلد پیام — ارتفاع و پدینگ یکسان با آیکون‌ها (نسخه ۱.۲۴.۱) */
.goftiran-composer textarea,
.goftiran-root .goftiran-composer textarea {
        flex: 1; resize: none !important; border: 1px solid var(--gf-border) !important; border-radius: var(--goftiran-comp-radius, 10px) !important;
        padding: 0 12px !important;
        font-size: var(--goftiran-font-size, 13px) !important; max-height: 80px !important; min-height: var(--goftiran-comp-size, 34px) !important;
        height: var(--goftiran-comp-size, 34px);
        background: var(--gf-surface) !important; color: var(--gf-text) !important;
        box-sizing: border-box !important; line-height: var(--goftiran-comp-size, 34px) !important;
        overflow-y: auto;
}
.goftiran-icon-btn {
        background: var(--goftiran-comp-bg-light, var(--gf-surface)) !important;
        border: 1px solid var(--goftiran-comp-border-light, var(--gf-border)) !important;
        width: var(--goftiran-comp-size, 34px) !important;
        height: var(--goftiran-comp-size, 34px) !important;
        border-radius: var(--goftiran-comp-radius, 10px) !important;
        cursor: pointer;
        font-size: var(--goftiran-comp-font-size, 15px) !important;
        flex-shrink: 0;
        color: var(--goftiran-comp-color-light, var(--gf-text)) !important;
        display: flex !important; align-items: center !important; justify-content: center !important;
        padding: 0 !important; margin: 0 !important; line-height: 1 !important;
        transition: background .2s, color .2s, border-color .2s, transform .15s;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
}
.goftiran-root[data-theme="dark"] .goftiran-icon-btn {
        background: var(--goftiran-comp-bg-dark, var(--gf-surface)) !important;
        border: 1px solid var(--goftiran-comp-border-dark, var(--gf-border)) !important;
        color: var(--goftiran-comp-color-dark, var(--gf-text)) !important;
}
.goftiran-icon-btn i { font-size: var(--goftiran-comp-font-size, 15px) !important; color: inherit !important; }
.goftiran-icon-btn:hover { transform: translateY(-1px); }
.goftiran-icon-btn.recording { background: #fee2e2 !important; color: #dc2626 !important; border-color: #fecaca !important; }
/* دکمه ارسال — هم‌اندازه با سایر آیکون‌ها (نسخه ۱.۲۴.۱) */
.goftiran-send-btn {
        background: var(--goftiran-send-bg, var(--gf-primary)) !important;
        color: var(--goftiran-send-icon-color, #fff) !important;
        border: none !important;
        width: var(--goftiran-comp-size, 34px) !important;
        height: var(--goftiran-comp-size, 34px) !important;
        border-radius: var(--goftiran-comp-radius, 10px) !important;
        cursor: pointer;
        display: flex !important; align-items: center !important; justify-content: center !important;
        flex-shrink: 0;
        font-size: var(--goftiran-comp-font-size, 15px) !important;
        padding: 0 !important; margin: 0 !important; line-height: 1 !important;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
}
.goftiran-send-btn i { font-size: var(--goftiran-comp-font-size, 15px) !important; color: inherit !important; }
.goftiran-root[data-theme="dark"] .goftiran-send-btn { box-shadow: var(--gf-glow); }

.goftiran-hidden { display: none !important; }

.goftiran-composer { position: relative; }
.goftiran-emoji-panel {
        position: absolute; bottom: 100%; right: 0; width: 240px; max-height: 190px; overflow-y: auto;
        background: var(--gf-bg); border: 1px solid var(--gf-border); border-radius: 12px; padding: 8px; margin-bottom: 4px;
        display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; box-shadow: 0 10px 30px rgba(0,0,0,.18); z-index: 10;
}
.goftiran-emoji-panel button {
        background: none; border: none; font-size: 19px; padding: 4px; cursor: pointer; border-radius: 8px; line-height: 1;
}
.goftiran-emoji-panel button:hover { background: var(--gf-surface); }

@media (max-width: 480px) {
        .goftiran-root { bottom: calc(var(--goftiran-icon-margin-bottom, 24px) - 8px); }
        .goftiran-box { max-width: calc(100vw - 24px); max-height: calc(100vh - 100px); }
        /* سایز آیکون شناور در موبایل از متغیر --goftiran-launcher-size (که در مدیا کوئری موبایل تنظیم می‌شود) می‌آید */
        /* نسخه ۱.۲۴.۱ — composer در موبایل: ارتفاع یکسان فیلد و دکمه‌ها */
        .goftiran-composer { padding: 8px; gap: 4px; }
        .goftiran-composer textarea,
        .goftiran-root .goftiran-composer textarea { padding: 0 10px !important; min-height: var(--goftiran-comp-size, 34px) !important; height: var(--goftiran-comp-size, 34px); line-height: var(--goftiran-comp-size, 34px) !important; }
        .goftiran-emoji-panel { width: 200px; }
}

@media (max-width: 360px) {
        .goftiran-title { font-size: 13px; }
        .goftiran-header-subtitle, .goftiran-status { font-size: 10px; }
}

/* ============ تضمین نمایش صحیح آیکون‌های Font Awesome ============
   این قانون همیشه در انتهای فایل قرار دارد تا هیچ تنظیم فونت سفارشی
   (حتی با !important) نتواند فونت آیکون‌ها را بازنویسی و آن‌ها را ناپدید کند. */
.goftiran-root i.fa-solid,  .goftiran-root i.fas { font-family: "Font Awesome 6 Free" !important; font-weight: 900 !important; font-style: normal !important; }
.goftiran-root i.fa-regular, .goftiran-root i.far { font-family: "Font Awesome 6 Free" !important; font-weight: 400 !important; font-style: normal !important; }
.goftiran-root i.fa-brands, .goftiran-root i.fab { font-family: "Font Awesome 6 Brands" !important; font-weight: 400 !important; font-style: normal !important; }
.goftiran-root i[class*="fa-"] { display: inline-block; line-height: 1; }

/* ============ دکمه‌های شیک لینک و شماره موبایل در پیام‌ها (نسخه ۱.۴.۰) ============ */
.goftiran-link-chip {
        display: inline-flex; align-items: center; gap: 6px;
        padding: 5px 11px; border-radius: 20px; font-size: calc(var(--goftiran-font-size, 13px) - 1px);
        font-weight: 600; text-decoration: none; line-height: 1.5;
        max-width: 100%; vertical-align: middle; margin: 2px 0;
        transition: transform .15s ease, filter .2s ease, box-shadow .2s ease;
        word-break: break-all;
}
.goftiran-link-chip i { font-size: calc(var(--goftiran-font-size, 13px) - 2px); flex-shrink: 0; }
.goftiran-link-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }

/* لینک در پیام مدیر/AI (روی پس‌زمینه روشن) — رنگی با حاشیه */
.goftiran-msg.admin .goftiran-link-chip {
        background: color-mix(in srgb, var(--gf-primary) 12%, transparent);
        color: var(--gf-primary);
        border: 1px solid color-mix(in srgb, var(--gf-primary) 28%, transparent);
}
.goftiran-msg.admin .goftiran-link-chip:hover {
        background: color-mix(in srgb, var(--gf-primary) 20%, transparent);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px color-mix(in srgb, var(--gf-primary) 25%, transparent);
}
/* چیپ شماره موبایل در پیام مدیر — رنگ سبز */
.goftiran-msg.admin .goftiran-phone-chip {
        background: color-mix(in srgb, var(--gf-secondary) 14%, transparent);
        color: var(--gf-secondary);
        border-color: color-mix(in srgb, var(--gf-secondary) 30%, transparent);
}
.goftiran-msg.admin .goftiran-phone-chip:hover {
        background: color-mix(in srgb, var(--gf-secondary) 22%, transparent);
        box-shadow: 0 4px 12px color-mix(in srgb, var(--gf-secondary) 28%, transparent);
}

/* لینک در پیام کاربر (روی پس‌زمینه گرادیانی رنگی) — سفید نیمه‌شفاف */
.goftiran-msg.user .goftiran-link-chip {
        background: rgba(255,255,255,.22);
        color: #fff;
        border: 1px solid rgba(255,255,255,.3);
        backdrop-filter: blur(4px);
}
.goftiran-msg.user .goftiran-link-chip:hover {
        background: rgba(255,255,255,.35);
        transform: translateY(-1px);
}
.goftiran-msg.user .goftiran-phone-chip {
        background: rgba(255,255,255,.28);
        border-color: rgba(255,255,255,.4);
}
.goftiran-root[data-theme="dark"] .goftiran-msg.user .goftiran-link-chip { color: #0b0b0f; border-color: rgba(255,255,255,.25); }
.goftiran-root[data-theme="dark"] .goftiran-msg.user .goftiran-link-chip:hover { background: rgba(255,255,255,.45); }

/* حالت تیره: چیپ‌ها در پیام مدیر با رنگ طلایی */
.goftiran-root[data-theme="dark"] .goftiran-msg.admin .goftiran-link-chip { color: var(--gf-primary); }
.goftiran-root[data-theme="dark"] .goftiran-msg.admin .goftiran-phone-chip { color: var(--gf-accent); border-color: color-mix(in srgb, var(--gf-accent) 35%, transparent); }

/* ============ حالت تمام‌صفحه ویجت (نسخه ۱.۴.۰) ============
   ویجت کل viewport را می‌پوشاند — در موبایل، تبلت و دسکتاپ.
   position: fixed آن را از بافت root خارج می‌کند تا کل صفحه را بگیرد. */
.goftiran-box.goftiran-fullscreen {
        position: fixed !important;
        top: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        border-radius: 0 !important;
        z-index: 1000000;
        animation: goftiran-fs-in .2s ease;
}
@keyframes goftiran-fs-in { from { opacity: .6; } to { opacity: 1; } }
/* مخفی کردن آیکون شناور وقتی ویجت تمام‌صفحه است (تا زیر آن نیاشد) */
.goftiran-root.is-fullscreen .goftiran-launcher { opacity: 0; pointer-events: none; }
/* در حالت تمام‌صفحه موبایل، پیام‌ها فضای بیشتری دارند */
.goftiran-box.goftiran-fullscreen .goftiran-msg { max-width: 88%; }
.goftiran-box.goftiran-fullscreen .goftiran-link-chip span { max-width: 280px; }

@media (max-width: 480px) {
        .goftiran-box.goftiran-fullscreen .goftiran-msg { max-width: 92%; }
        .goftiran-box.goftiran-fullscreen .goftiran-link-chip span { max-width: 200px; }
}

/* ============ اوپراتورها در ویجت کاربر (نسخه ۱.۷.۰) ============ */

/* بجج اوپراتور فعال در هدر — رنگ‌بندی شیک */
.goftiran-operator-badge {
        display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600;
        background: rgba(255,255,255,.22); padding: 3px 10px 3px 8px; border-radius: 20px; margin-inline-start: 6px;
        color: inherit; border: 1px solid rgba(255,255,255,.25); backdrop-filter: blur(4px);
}
.goftiran-operator-badge i { font-size: 10px; opacity: .9; }
.goftiran-operator-badge img { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; border: 1px solid rgba(255,255,255,.4); }
.goftiran-root[data-theme="dark"] .goftiran-operator-badge { background: rgba(212,175,55,.15); border-color: rgba(212,175,55,.3); }

/* لیبل بخش انتخاب اوپراتور در فرم */
.goftiran-operator-select-wrap > label {
        display: flex; align-items: center; gap: 6px; font-weight: 700 !important;
        color: var(--gf-text) !important; font-size: 12.5px !important; margin-bottom: 6px !important;
}
.goftiran-operator-select-wrap > label::before {
        content: '\f590'; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: 13px; color: var(--gf-primary);
}

/* دکمه تغییر اوپراتور در هدر */
.goftiran-operator-change-btn {
        background: rgba(255,255,255,.15); border: none; color: inherit; font-size: 13px; cursor: pointer; opacity: .9;
        width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; transition: background .2s, opacity .2s;
}
.goftiran-operator-change-btn:hover { opacity: 1; background: rgba(255,255,255,.28); }
.goftiran-root[data-theme="dark"] .goftiran-operator-change-btn { background: rgba(212,175,55,.12); border: 1px solid var(--gf-border); }
.goftiran-root[data-theme="dark"] .goftiran-operator-change-btn:hover { background: rgba(212,175,55,.22); }

/* گزینه‌های انتخاب اوپراتور (در فرم شروع گفتگو) — ۲ به ۲ کنار هم، کوچک و جمع‌وجور */
.goftiran-operator-options { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.goftiran-op-option {
        display: flex; align-items: center; gap: 7px; padding: 6px 8px; border-radius: 9px; cursor: pointer;
        background: var(--gf-surface); border: 1.5px solid var(--gf-border); transition: all .18s ease;
        position: relative; overflow: hidden; min-width: 0;
}
.goftiran-op-option::before {
        content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 3px;
        background: var(--op-color, var(--gf-primary)); opacity: .7;
}
.goftiran-op-option:hover { border-color: var(--op-color, var(--gf-primary)); transform: translateY(-1px); box-shadow: 0 3px 10px color-mix(in srgb, var(--op-color, var(--gf-primary)) 18%, transparent); }
.goftiran-op-option.selected { border-color: var(--op-color, var(--gf-primary)); background: color-mix(in srgb, var(--op-color, var(--gf-primary)) 10%, var(--gf-surface)); }
.goftiran-op-option.selected::before { width: 4px; opacity: 1; }
.goftiran-op-option-avatar {
        width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
        display: flex; align-items: center; justify-content: center; font-size: 12px;
        background: linear-gradient(135deg, var(--op-color, var(--gf-primary)), color-mix(in srgb, var(--op-color, var(--gf-primary)) 60%, #000)); color: #fff;
}
.goftiran-op-option-avatar img { width: 100%; height: 100%; object-fit: cover; }
.goftiran-op-option-info { flex: 1; display: flex; flex-direction: column; gap: 0; min-width: 0; overflow: hidden; }
.goftiran-op-option-info strong { font-size: 11.5px; color: var(--gf-text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.goftiran-op-option-info span { font-size: 9.5px; color: var(--gf-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.goftiran-op-option-check { color: var(--op-color, var(--gf-primary)); font-size: 11px; opacity: 0; transition: opacity .2s; flex-shrink: 0; }
.goftiran-op-option.selected .goftiran-op-option-check { opacity: 1; }

/* رنگ‌بندی اوپراتورها — هر اوپراتور رنگ متفاوت بر اساس ترتیب */
.goftiran-op-option:nth-child(1) { --op-color: #3b82f6; }
.goftiran-op-option:nth-child(2) { --op-color: #10b981; }
.goftiran-op-option:nth-child(3) { --op-color: #f59e0b; }
.goftiran-op-option:nth-child(4) { --op-color: #8b5cf6; }
.goftiran-op-option:nth-child(5) { --op-color: #ec4899; }
.goftiran-op-option:nth-child(6) { --op-color: #14b8a6; }
.goftiran-op-option:nth-child(7) { --op-color: #f43f5e; }
.goftiran-op-option:nth-child(8) { --op-color: #6366f1; }

/* در صفحات خیلی کوچک، ۱ ستونه */
@media (max-width: 320px) {
        .goftiran-operator-options { grid-template-columns: 1fr; }
}

/* پنل تغییر اوپراتور در حین گفتگو */
.goftiran-operator-panel {
        position: absolute; top: 60px; inset-inline: 0; bottom: 0; background: var(--gf-bg); z-index: 20;
        display: flex; flex-direction: column; padding: 16px; overflow-y: auto; animation: goftiran-op-panel-in .2s ease;
}
@keyframes goftiran-op-panel-in { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.goftiran-operator-panel-head {
        display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--gf-border);
}
.goftiran-operator-panel-head span { font-size: 15px; font-weight: 700; color: var(--gf-text); }
.goftiran-operator-panel-head button {
        background: var(--gf-surface); border: 1px solid var(--gf-border); width: 28px; height: 28px; border-radius: 8px;
        cursor: pointer; color: var(--gf-text); display: flex; align-items: center; justify-content: center;
}

/* پیام سیستمی تغییر اوپراتور — کارت زیبا و متمایز */
.goftiran-msg.operator-change { max-width: 90%; align-self: center; margin: 10px 0; }
.goftiran-op-change-card {
        display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 14px;
        background: linear-gradient(135deg, color-mix(in srgb, var(--gf-primary) 14%, var(--gf-surface)), color-mix(in srgb, var(--gf-secondary) 10%, var(--gf-surface)));
        border: 1px solid color-mix(in srgb, var(--gf-primary) 25%, var(--gf-border));
        color: var(--gf-text); font-size: 12.5px; line-height: 1.7; text-align: center;
}
.goftiran-op-change-icon {
        width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
        background: linear-gradient(135deg, var(--gf-primary), var(--gf-secondary)); color: #fff;
        display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.goftiran-root[data-theme="dark"] .goftiran-op-change-icon { color: #0b0b0f; }
.goftiran-op-change-text { flex: 1; }

/* ============ دکمه‌های هدایت شبکه‌های اجتماعی (نسخه ۱.۹.۰) ============ */
.goftiran-social-links { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--gf-border); }
.goftiran-social-links-title { font-size: 11px; color: var(--gf-text-muted); text-align: center; margin-bottom: 8px; }
.goftiran-social-links-grid { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.goftiran-social-link {
        display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 8px;
        background: var(--gf-surface); border: 1px solid var(--gf-border); text-decoration: none;
        font-size: 11px; font-weight: 600; color: var(--gf-text); transition: all .18s ease;
}
.goftiran-social-link i { font-size: 13px; color: var(--sl-color, var(--gf-primary)); }
.goftiran-social-link:hover { border-color: var(--sl-color, var(--gf-primary)); transform: translateY(-1px); box-shadow: 0 3px 10px color-mix(in srgb, var(--sl-color, var(--gf-primary)) 20%, transparent); }
.goftiran-social-link:hover i { transform: scale(1.15); }
.goftiran-social-link span { white-space: nowrap; }

/* ============ دیالوگ‌های وضعیت گفتگو (نسخه ۱.۹.۲) ============ */
.goftiran-msg.status-dialog { max-width: 92%; align-self: center; margin: 8px 0; }
.goftiran-status-dialog {
        display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px;
        font-size: 12px; font-weight: 600; line-height: 1.7; text-align: center;
        border: 1px solid currentColor; opacity: .95;
}
.goftiran-status-dialog i { font-size: 18px; flex-shrink: 0; opacity: .8; }
.goftiran-status-dialog span { flex: 1; }

/* ============ آیکون چت سفارشی بدون استایل پیش‌فرض (نسخه ۱۹.۲) ============ */
.goftiran-launcher.goftiran-launcher-custom {
        background: none !important; box-shadow: none !important; border: none !important;
        border-radius: 0 !important; width: auto !important; height: auto !important;
}
.goftiran-launcher.goftiran-launcher-custom img { width: var(--goftiran-launcher-size, 70px); height: auto; object-fit: contain; }

/* ============ دکمه FAQ در هدر + پنل سوالات شما (نسخه ۱۹.۵) ============ */
.goftiran-faq-btn {
        background: var(--goftiran-faq-btn-bg, var(--gf-primary)) !important;
        color: var(--goftiran-faq-btn-color, #fff) !important;
        border: none !important;
        width: 30px; height: 30px; border-radius: 8px;
        display: flex; align-items: center; justify-content: center;
        cursor: pointer; flex-shrink: 0; font-size: 13px;
        padding: 0 !important; margin: 0 !important; line-height: 1 !important;
        transition: opacity .2s, transform .15s;
}
.goftiran-faq-btn:hover { opacity: .85; transform: translateY(-1px); }
.goftiran-faq-btn i { font-size: 13px !important; color: inherit !important; }

.goftiran-faq-panel {
        flex: 1; display: flex; flex-direction: column; overflow: hidden;
        background: var(--goftiran-faq-panel-bg, #f7f8fc); color: var(--goftiran-faq-panel-text, #1f2430);
        animation: goftiran-faq-in .25s ease;
}
@keyframes goftiran-faq-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.goftiran-faq-panel-head {
        display: flex; align-items: center; justify-content: space-between;
        padding: 14px 16px; border-bottom: 1px solid var(--gf-border); flex-shrink: 0;
}
.goftiran-faq-panel-title { font-size: 15px; font-weight: 700; color: var(--goftiran-faq-panel-text, var(--gf-text)); }
.goftiran-faq-close-btn {
        background: var(--gf-surface) !important; border: 1px solid var(--gf-border) !important;
        width: 28px; height: 28px; border-radius: 8px; cursor: pointer;
        color: var(--gf-text) !important; display: flex; align-items: center; justify-content: center;
        padding: 0 !important; margin: 0 !important; line-height: 1 !important; font-size: 12px !important;
}
.goftiran-faq-close-btn i { font-size: 12px !important; color: inherit !important; }
.goftiran-faq-list { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: var(--goftiran-faq-item-gap, 8px); }

.goftiran-faq-item {
        background: var(--goftiran-faq-item-bg, #fff);
        border: 1px solid var(--goftiran-faq-item-border, #e2e5ec);
        border-radius: var(--goftiran-faq-item-radius, 10px);
        overflow: hidden;
        transition: border-color .2s, box-shadow .2s;
}
.goftiran-faq-item.open { border-color: var(--gf-primary); box-shadow: 0 3px 12px rgba(0,0,0,.06); }
.goftiran-faq-question {
        width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
        padding: var(--goftiran-faq-item-padding, 12px);
        background: none !important; border: none !important; cursor: pointer;
        color: var(--goftiran-faq-q-color, var(--gf-text)) !important;
        font-size: var(--goftiran-faq-q-font, 13px) !important; font-weight: 600; text-align: right;
        font-family: inherit;
}
.goftiran-faq-question span { flex: 1; line-height: 1.6; }
.goftiran-faq-question i { flex-shrink: 0; font-size: calc(var(--goftiran-faq-q-font, 13px) - 1px) !important; color: var(--gf-primary) !important; transition: transform .25s; }
.goftiran-faq-icon-close { display: none; }
.goftiran-faq-item.open .goftiran-faq-icon-open { display: none; }
.goftiran-faq-item.open .goftiran-faq-icon-close { display: inline-block; }
.goftiran-faq-answer {
        max-height: 0; overflow: hidden; transition: max-height .3s ease;
        background: color-mix(in srgb, var(--goftiran-faq-item-bg, #fff) 85%, transparent);
}
.goftiran-faq-item.open .goftiran-faq-answer { max-height: 500px; }
.goftiran-faq-answer-inner {
        padding: 0 var(--goftiran-faq-item-padding, 12px) var(--goftiran-faq-item-padding, 12px);
        color: var(--goftiran-faq-a-color, var(--gf-text-muted));
        font-size: var(--goftiran-faq-a-font, 12px); line-height: 1.8; white-space: pre-wrap;
}

/* ============ انیمیشن‌های ورود آیکون شناور (نسخه ۱۹.۵) ============
   کلاس .goftiran-anim-{name} به آیکون شناور اضافه می‌شود. مدت زمان از data-attribute خوانده می‌شود. */
.goftiran-launcher-anim { animation-duration: var(--goftiran-anim-dur, 800ms); animation-fill-mode: both; animation-timing-function: cubic-bezier(.22,1,.36,1); }
.goftiran-anim-zoom { animation-name: goftiran-a-zoom; }
.goftiran-anim-slide-right { animation-name: goftiran-a-slide-right; }
.goftiran-anim-slide-left { animation-name: goftiran-a-slide-left; }
.goftiran-anim-slide-bottom { animation-name: goftiran-a-slide-bottom; }
.goftiran-anim-flash { animation-name: goftiran-a-flash; }
.goftiran-anim-rotate { animation-name: goftiran-a-rotate; }
.goftiran-anim-fade { animation-name: goftiran-a-fade; }
.goftiran-anim-bounce { animation-name: goftiran-a-bounce; }
.goftiran-anim-flip { animation-name: goftiran-a-flip; }
.goftiran-anim-pulse { animation-name: goftiran-a-pulse; }
.goftiran-anim-swing { animation-name: goftiran-a-swing; }
.goftiran-anim-drop { animation-name: goftiran-a-drop; }
.goftiran-anim-elastic { animation-name: goftiran-a-elastic; }

@keyframes goftiran-a-zoom { from { opacity: 0; transform: scale(.2); } to { opacity: 1; transform: scale(1); } }
@keyframes goftiran-a-slide-right { from { opacity: 0; transform: translateX(60px); } to { opacity: 1; transform: translateX(0); } }
@keyframes goftiran-a-slide-left { from { opacity: 0; transform: translateX(-60px); } to { opacity: 1; transform: translateX(0); } }
@keyframes goftiran-a-slide-bottom { from { opacity: 0; transform: translateY(60px); } to { opacity: 1; transform: translateY(0); } }
@keyframes goftiran-a-flash { 0% { opacity: 0; } 25% { opacity: 1; } 50% { opacity: .2; } 75% { opacity: 1; } 100% { opacity: 1; } }
@keyframes goftiran-a-rotate { from { opacity: 0; transform: rotate(-180deg) scale(.6); } to { opacity: 1; transform: rotate(0) scale(1); } }
@keyframes goftiran-a-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes goftiran-a-bounce { 0% { opacity: 0; transform: translateY(-120px); } 60% { opacity: 1; transform: translateY(15px); } 80% { transform: translateY(-8px); } 100% { transform: translateY(0); } }
@keyframes goftiran-a-flip { from { opacity: 0; transform: perspective(300px) rotateY(90deg); } to { opacity: 1; transform: rotateY(0); } }
@keyframes goftiran-a-pulse { 0% { opacity: 0; transform: scale(.4); } 50% { opacity: 1; transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes goftiran-a-swing { 0% { opacity: 0; transform: rotate(-30deg); transform-origin: top center; } 50% { opacity: 1; transform: rotate(20deg); } 100% { transform: rotate(0); } }
@keyframes goftiran-a-drop { 0% { opacity: 0; transform: translateY(-200px) scale(.8); } 60% { opacity: 1; transform: translateY(20px) scale(1.05); } 100% { transform: translateY(0) scale(1); } }
@keyframes goftiran-a-elastic { 0% { opacity: 0; transform: scale(0); } 55% { opacity: 1; transform: scale(1.25); } 75% { transform: scale(.85); } 90% { transform: scale(1.08); } 100% { transform: scale(1); } }

/* ============ ساعت کاری سرویس و اپراتورها (نسخه ۱۹.۶) ============ */

/* مخفی کردن کامل آیکون شناور خارج از ساعت کاری */
.goftiran-root.goftiran-service-hidden { display: none !important; }

/* صفحه خارج از ساعت کاری سرویس */
.goftiran-service-off-screen {
        flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
        text-align: center; padding: 30px 24px; background: linear-gradient(135deg, #f0f9ff, #e0f2fe); color: #075985; gap: 6px;
        animation: goftiran-fade .3s ease;
}
.goftiran-service-off-icon { font-size: 48px; margin-bottom: 10px; color: #0284c7; animation: goftiran-a-pulse 2s infinite; }
.goftiran-service-off-title { font-size: 17px; font-weight: 700; margin: 0 0 8px; }
.goftiran-service-off-message { font-size: 13px; line-height: 1.9; margin: 0; opacity: .9; }
.goftiran-root[data-theme="dark"] .goftiran-service-off-screen { background: linear-gradient(135deg, #0b0b0f, #16161d); color: #d4af37; }
.goftiran-root[data-theme="dark"] .goftiran-service-off-icon { color: #d4af37; }

/* لیبل ساعت کاری اپراتور در فرم شروع گفتگو */
.goftiran-op-hours-label {
        display: inline-flex; align-items: center; gap: 5px; font-size: var(--goftiran-wh-label-font, 11px) !important; font-weight: 600;
        padding: 3px 9px; border-radius: 14px; margin-top: 5px; cursor: pointer; line-height: 1.4 !important;
        border: 1.5px solid transparent; white-space: nowrap; transition: all .2s; user-select: none;
}
.goftiran-op-hours-label i { font-size: calc(var(--goftiran-wh-label-font, 11px) - 2px) !important; }
.goftiran-op-hours-label.is-online {
        background: var(--goftiran-wh-bg-online, rgba(34, 197, 94, .12)) !important;
        color: var(--goftiran-wh-text-online, #15803d) !important;
        border-color: var(--goftiran-wh-border-online, rgba(34, 197, 94, .4)) !important;
}
.goftiran-op-hours-label.is-waiting {
        background: var(--goftiran-wh-bg-waiting, rgba(239, 68, 68, .10)) !important;
        color: var(--goftiran-wh-text-waiting, #b91c1c) !important;
        border-color: var(--goftiran-wh-border-waiting, rgba(239, 68, 68, .35)) !important;
}
.goftiran-op-hours-label.is-offline {
        background: var(--goftiran-wh-bg-offline, rgba(156, 163, 175, .15)) !important;
        color: var(--goftiran-wh-text-offline, #6b7280) !important;
        border-color: var(--goftiran-wh-border-offline, rgba(156, 163, 175, .35)) !important;
}
.goftiran-op-hours-label:hover { transform: translateY(-1px); box-shadow: 0 3px 8px rgba(0,0,0,.1); }
/* بج وضعیت ساعت کاری (نسخه ۱۹.۱۶) */
.goftiran-op-hours-badge {
        display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 10px;
        font-size: 9px !important; font-weight: 700; margin-inline-start: 4px; line-height: 1.4;
}
.goftiran-op-hours-badge.is-online { background: rgba(34,197,94,.2); color: #15803d; }
.goftiran-op-hours-badge.is-waiting { background: rgba(239,68,68,.15); color: #b91c1c; }
.goftiran-op-hours-badge.is-offline { background: rgba(156,163,175,.2); color: #6b7280; }
.goftiran-op-name-label { cursor: pointer; transition: color .15s; }
.goftiran-op-name-label:hover { color: var(--gf-primary); text-decoration: underline; }

/* پاپ‌آپ ساعات کاری هفتگی اپراتور */
.goftiran-op-hours-popup {
        position: fixed; inset: 0; z-index: 1000001; display: flex; align-items: center; justify-content: center;
        padding: 16px; font-family: 'Vazirmatn', Tahoma, sans-serif;
}
.goftiran-op-hours-popup-overlay {
        position: absolute; inset: 0; background: rgba(0,0,0,.55); backdrop-filter: blur(2px);
        animation: goftiran-fade .2s ease;
}
.goftiran-op-hours-popup-box {
        position: relative; background: #fff; border-radius: 16px; width: 100%; max-width: 420px; max-height: 90vh;
        overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.3); display: flex; flex-direction: column;
        animation: goftiran-op-hours-in .25s ease;
}
@keyframes goftiran-op-hours-in { from { opacity: 0; transform: translateY(20px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
.goftiran-op-hours-popup-head {
        display: flex; align-items: center; justify-content: space-between; padding: 16px 18px;
        background: linear-gradient(135deg, #2563eb, #16a34a); color: #fff; flex-shrink: 0;
}
.goftiran-op-hours-popup-title { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.goftiran-op-hours-popup-title i { font-size: 16px; }
.goftiran-op-hours-popup-close {
        background: rgba(255,255,255,.2); border: none; color: #fff; cursor: pointer;
        width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.goftiran-op-hours-popup-close:hover { background: rgba(255,255,255,.32); }
.goftiran-op-hours-popup-body { padding: 14px; overflow-y: auto; background: #f7f8fc; }

.goftiran-op-hours-current {
        display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 10px;
        font-size: 12px; font-weight: 600; margin-bottom: 12px; line-height: 1.5;
}
.goftiran-op-hours-current.is-online { background: rgba(34,197,94,.12); color: #15803d; border: 1px solid rgba(34,197,94,.3); }
.goftiran-op-hours-current.is-offline { background: rgba(239,68,68,.08); color: #b91c1c; border: 1px solid rgba(239,68,68,.25); }
.goftiran-op-hours-current i { font-size: 16px; flex-shrink: 0; }

.goftiran-op-hours-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.goftiran-op-hours-table th { background: #f1f5f9; color: #475569; font-size: 11px; font-weight: 700; padding: 9px 10px; text-align: center; border-bottom: 1px solid #e2e8f0; }
.goftiran-op-hours-table td { padding: 9px 10px; font-size: 12px; text-align: center; border-bottom: 1px solid #f1f5f9; color: #1f2430; }
.goftiran-op-hours-table tr:last-child td { border-bottom: none; }
.goftiran-op-hours-table tr.is-today { background: linear-gradient(90deg, rgba(37,99,235,.06), rgba(37,99,235,.02)); }
.goftiran-op-hours-table tr.is-today td { font-weight: 600; }
.goftiran-op-hours-table tr.is-closed td { opacity: .55; }
.goftiran-op-hours-day-name { font-weight: 700; color: #1f2430; white-space: nowrap; }
.goftiran-op-hours-today-badge { background: #2563eb; color: #fff; font-size: 9px; padding: 2px 7px; border-radius: 10px; margin-inline-start: 4px; font-weight: 700; }
.goftiran-op-hours-day-status { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 10px; }
.goftiran-op-hours-day-status.is-on { background: rgba(34,197,94,.15); color: #15803d; }
.goftiran-op-hours-day-status.is-off { background: rgba(156,163,175,.2); color: #6b7280; }
.goftiran-op-hours-day-time { font-family: 'Vazirmatn', monospace; font-size: 12px; color: #2563eb; direction: ltr; }
.goftiran-op-hours-day-time .sep { color: #94a3b8; margin: 0 4px; font-family: 'Vazirmatn', Tahoma; }
.goftiran-op-hours-day-closed { color: #cbd5e1; font-size: 16px; }

/* دیالوگ ساعت کاری اپراتور در چت — استفاده از استایل status-dialog موجود، فقط افکت fade-out اضافه */
.goftiran-msg.operator-hours-dialog { animation: goftiran-fade .3s ease; }
@keyframes goftiran-fade { from { opacity: 0; } to { opacity: 1; } }

/* حالت تمام‌صفحه: پاپ‌آپ روی کل صفحه */
.goftiran-box.goftiran-fullscreen ~ .goftiran-op-hours-popup,
.goftiran-root.is-fullscreen .goftiran-op-hours-popup { z-index: 1000002; }
@media (max-width: 480px) {
        .goftiran-op-hours-popup-box { max-width: 100%; max-height: 95vh; }
        .goftiran-op-hours-table th, .goftiran-op-hours-table td { padding: 7px 6px; font-size: 11px; }
}

/* ============ دکمه سوالات متداول در فرم پیش از گفتگو (نسخه ۱۹.۷) ============ */
.goftiran-preform-faq-bar {
        display: flex; justify-content: center; margin-bottom: 14px;
}
.goftiran-preform-faq-btn {
        display: inline-flex; align-items: center; gap: 8px;
        padding: 10px 20px;
        background: var(--goftiran-faq-pf-bg, #f0f9ff) !important;
        color: var(--goftiran-faq-pf-color, #0369a1) !important;
        border: 1.5px solid var(--goftiran-faq-pf-border, #bae6fd) !important;
        border-radius: var(--goftiran-faq-pf-radius, 12px) !important;
        font-size: var(--goftiran-faq-pf-font, 13px) !important;
        font-weight: 600; cursor: pointer; transition: all .2s;
        font-family: inherit !important;
}
.goftiran-preform-faq-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.goftiran-preform-faq-icon { font-size: calc(var(--goftiran-faq-pf-font, 13px) + 2px) !important; color: inherit !important; }

/* ============ پاپ‌آپ سوالات متداول (FAQ) — نسخه ۱۹.۷ ============ */
.goftiran-faq-popup {
        position: fixed; inset: 0; z-index: 1000001; display: flex; align-items: center; justify-content: center;
        padding: 16px; font-family: 'Vazirmatn', Tahoma, sans-serif;
}
.goftiran-faq-popup-overlay {
        position: absolute; inset: 0; background: rgba(0,0,0,.55); backdrop-filter: blur(2px);
        animation: goftiran-fade .2s ease;
}
.goftiran-faq-popup-box {
        position: relative; background: var(--goftiran-faq-panel-bg, #f7f8fc); border-radius: 16px;
        width: 100%; max-width: 460px; max-height: 80vh; overflow: hidden;
        box-shadow: 0 20px 60px rgba(0,0,0,.3); display: flex; flex-direction: column;
        animation: goftiran-faq-popup-in .25s ease;
}
@keyframes goftiran-faq-popup-in { from { opacity: 0; transform: translateY(20px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
.goftiran-faq-popup-head {
        display: flex; align-items: center; justify-content: space-between; padding: 16px 18px;
        background: linear-gradient(135deg, var(--gf-primary), var(--gf-secondary)); color: #fff; flex-shrink: 0;
}
.goftiran-root[data-theme="dark"] .goftiran-faq-popup-head {
        background: linear-gradient(135deg, #1a1a22, #0d0d12); color: var(--gf-primary);
}
.goftiran-faq-popup-title { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.goftiran-faq-popup-title i { font-size: 16px; }
.goftiran-faq-popup-close {
        background: rgba(255,255,255,.2); border: none; color: #fff; cursor: pointer;
        width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.goftiran-faq-popup-close:hover { background: rgba(255,255,255,.32); }
.goftiran-faq-popup-body {
        padding: 14px; overflow-y: auto; display: flex; flex-direction: column; gap: var(--goftiran-faq-item-gap, 8px);
}
.goftiran-faq-popup-item {
        background: var(--goftiran-faq-item-bg, #fff);
        border: 1px solid var(--goftiran-faq-item-border, #e2e5ec);
        border-radius: var(--goftiran-faq-item-radius, 10px); overflow: hidden; transition: border-color .2s;
}
.goftiran-faq-popup-item.open { border-color: var(--gf-primary); box-shadow: 0 3px 12px rgba(0,0,0,.06); }
.goftiran-faq-popup-question {
        width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
        padding: var(--goftiran-faq-item-padding, 12px);
        background: none !important; border: none !important; cursor: pointer;
        color: var(--goftiran-faq-q-color, var(--gf-text)) !important;
        font-size: var(--goftiran-faq-q-font, 13px) !important; font-weight: 600; text-align: right; font-family: inherit;
}
.goftiran-faq-popup-question span { flex: 1; line-height: 1.6; }
.goftiran-faq-popup-question i { flex-shrink: 0; font-size: calc(var(--goftiran-faq-q-font, 13px) - 1px) !important; color: var(--gf-primary) !important; }
.goftiran-faq-popup-item .goftiran-faq-icon-close { display: none; }
.goftiran-faq-popup-item.open .goftiran-faq-icon-open { display: none; }
.goftiran-faq-popup-item.open .goftiran-faq-icon-close { display: inline-block; }
.goftiran-faq-popup-answer { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.goftiran-faq-popup-item.open .goftiran-faq-popup-answer { max-height: 400px; }
.goftiran-faq-popup-answer-inner {
        padding: 0 var(--goftiran-faq-item-padding, 12px) var(--goftiran-faq-item-padding, 12px);
        color: var(--goftiran-faq-a-color, var(--gf-text-muted));
        font-size: var(--goftiran-faq-a-font, 12px); line-height: 1.8; white-space: pre-wrap;
}
@media (max-width: 480px) {
        .goftiran-faq-popup-box { max-width: 100%; max-height: 88vh; }
}

/* ============ کپچا (نسخه ۱۹.۱۱) ============ */
/* کپچای فرم پیش از گفتگو */
.goftiran-captcha-row { margin-bottom: 10px; }
.goftiran-captcha-box {
        display: flex; align-items: center; gap: 8px; background: var(--gf-surface); border: 1.5px solid var(--gf-border);
        border-radius: 10px; padding: 10px 14px; margin-bottom: 6px;
}
.goftiran-captcha-question {
        flex: 1; font-size: 16px; font-weight: 700; color: var(--gf-text); font-family: 'Vazirmatn', monospace; letter-spacing: 1px;
}
.goftiran-captcha-refresh {
        background: var(--gf-primary); color: #fff; border: none; width: 32px; height: 32px; border-radius: 8px;
        cursor: pointer; font-size: 13px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.goftiran-captcha-refresh:hover { opacity: .85; }
.goftiran-captcha-row input[type="number"] {
        width: 100%; padding: 9px 12px; border: 1.5px solid var(--goftiran-form-border, var(--gf-border));
        border-radius: var(--goftiran-form-radius, 10px); font-size: 15px; text-align: center; background: var(--goftiran-form-bg, var(--gf-surface));
        color: var(--goftiran-form-text, var(--gf-text)); font-family: monospace; font-weight: 700;
}

/* پاپ‌آپ کپچای حین گفتگو */
.goftiran-chat-captcha {
        position: absolute; inset: 0; z-index: 1000000; display: flex; align-items: center; justify-content: center;
        background: rgba(0,0,0,.65); backdrop-filter: blur(4px); animation: goftiran-fade .25s ease;
}
.goftiran-chat-captcha-box {
        background: var(--gf-captcha-bg, #ffffff); border-radius: var(--gf-captcha-radius, 16px);
        padding: 24px 20px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.4);
        animation: goftiran-captcha-in .3s ease; margin: auto; max-height: 90vh; overflow-y: auto;
}
@keyframes goftiran-captcha-in { from { opacity: 0; transform: scale(.9) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
/* حالت تمام‌صفحه */
.goftiran-box.goftiran-fullscreen ~ .goftiran-chat-captcha,
.goftiran-root.is-fullscreen .goftiran-chat-captcha { z-index: 1000002 !important; }
/* موبایل: عرض درصدی */
@media (max-width: 480px) {
        .goftiran-chat-captcha-box { width: var(--gf-captcha-mobile-width, 80%); padding: 22px 18px; }
}
/* دسکتاپ: عرض px */
@media (min-width: 481px) {
        .goftiran-chat-captcha-box { width: var(--gf-captcha-desktop-width, 340px); max-width: 90%; }
}
.goftiran-chat-captcha-icon {
        width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 50%;
        background: linear-gradient(135deg, var(--gf-primary), var(--gf-secondary));
        color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.goftiran-root[data-theme="dark"] .goftiran-chat-captcha-icon { color: #0b0b0f; }
.goftiran-chat-captcha-box h3 { margin: 0 0 6px; font-size: 16px; color: var(--gf-captcha-text, #1f2430); }
.goftiran-chat-captcha-desc { margin: 0 0 14px; font-size: 12px; color: var(--gf-captcha-text-muted, var(--gf-text-muted)); line-height: 1.6; opacity: .8; }
.goftiran-chat-captcha-qbox {
        display: flex; align-items: center; gap: 8px; background: var(--gf-surface); border: 1.5px solid var(--gf-border);
        border-radius: 10px; padding: 10px 14px; margin-bottom: 10px;
}
.goftiran-chat-captcha-question {
        flex: 1; font-size: 18px; font-weight: 700; color: var(--gf-captcha-text, var(--gf-text)); font-family: 'Vazirmatn', monospace; letter-spacing: 2px;
}
.goftiran-chat-captcha-refresh {
        background: var(--gf-primary); color: #fff; border: none; width: 32px; height: 32px; border-radius: 8px;
        cursor: pointer; font-size: 13px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.goftiran-chat-captcha-refresh:hover { opacity: .85; }
.goftiran-chat-captcha-box input[type="number"] {
        width: 100%; padding: 11px; border: 2px solid var(--gf-border); border-radius: 10px; font-size: 16px;
        text-align: center; background: var(--gf-surface); color: var(--gf-captcha-text, var(--gf-text)); font-family: monospace; font-weight: 700;
        margin-bottom: 10px;
}
.goftiran-chat-captcha-box input[type="number"]:focus { outline: none; border-color: var(--gf-primary); }
.goftiran-chat-captcha-submit {
        width: 100%; padding: var(--gf-captcha-btn-pad-y, 11px) 16px;
        background: var(--gf-captcha-btn-bg, #2563eb) !important;
        color: var(--gf-captcha-btn-text-color, #fff) !important;
        border: var(--gf-captcha-btn-border-width, 1px) solid var(--gf-captcha-btn-border-color, #2563eb) !important;
        border-radius: var(--gf-captcha-btn-radius, 10px) !important;
        font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit !important;
}
.goftiran-chat-captcha-submit:hover { opacity: .9; }
.goftiran-chat-captcha-error { color: #dc2626; font-size: 12px; margin-top: 8px; min-height: 16px; }

/* حالت اینلاین کپچا — نمایش در محیط چت (نسخه ۱۹.۱۵) */
.goftiran-chat-captcha.is-inline {
        position: relative; inset: auto; z-index: 5; background: transparent; backdrop-filter: none;
        padding: 12px 16px; animation: goftiran-fade .25s ease;
}
.goftiran-chat-captcha.is-inline .goftiran-chat-captcha-box {
        width: 100%; max-width: 100%; margin: 0; box-shadow: 0 4px 16px rgba(0,0,0,.1);
        border: 1.5px solid var(--gf-border);
}
.goftiran-chat-captcha.is-inline .goftiran-chat-captcha-icon { width: 40px; height: 40px; font-size: 18px; margin-bottom: 8px; }

/* انیمیشن لرزش آیکون شناور (نسخه ۱۹.۱۵) */
@keyframes goftiran-shake {
        0%, 100% { transform: translateX(0); }
        10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
        20%, 40%, 60%, 80% { transform: translateX(4px); }
}
@keyframes goftiran-pulse-glow {
        0%, 100% { box-shadow: var(--gf-launcher-shadow); }
        50% { box-shadow: 0 0 30px var(--gf-primary), 0 0 60px var(--gf-primary); }
}
.goftiran-launcher.alert-shake { animation: goftiran-shake .5s ease, goftiran-pulse-glow 1s ease infinite; }
.goftiran-launcher.alert-flash { animation: goftiran-pulse-glow .8s ease infinite; }

/* ============ دیالوگ موفقیت عضویت و فرم لاگین (نسخه ۱۹.۱۲ — بازنویسی ۱.۲۲.۰) ============ */
.goftiran-membership-success, .goftiran-login-form {
        position: absolute; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
        background: rgba(0,0,0,.55); backdrop-filter: blur(4px); animation: goftiran-fade .25s ease;
}
/* پیام خوش‌آمد عضویت — مرکز صفحه چت، شیک و مرتب */
.goftiran-membership-success {
        background: var(--gf-bg, #ffffff);
        backdrop-filter: none;
        animation: goftiran-membership-fade-in .4s ease;
}
@keyframes goftiran-membership-fade-in {
        from { opacity: 0; transform: scale(.96); }
        to { opacity: 1; transform: scale(1); }
}
@keyframes goftiran-membership-pulse {
        0%, 100% { transform: scale(1); box-shadow: 0 8px 24px rgba(22,163,74,.25); }
        50% { transform: scale(1.05); box-shadow: 0 12px 32px rgba(22,163,74,.4); }
}
.goftiran-membership-success-box, .goftiran-login-form-box {
        background: var(--gf-surface, #ffffff); border-radius: 18px; padding: 32px 28px; width: 92%; max-width: 360px;
        text-align: center; box-shadow: 0 12px 48px rgba(0,0,0,.12); animation: goftiran-captcha-in .35s ease;
        border: 1px solid rgba(22,163,74,.15);
}
.goftiran-membership-success-box {
        animation: goftiran-captcha-in .35s ease, goftiran-membership-pulse 2s ease-in-out 1;
}
.goftiran-membership-success-icon, .goftiran-login-form-icon {
        width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%;
        background: linear-gradient(135deg, #16a34a, #22c55e);
        color: #fff; display: flex; align-items: center; justify-content: center; font-size: 28px;
        box-shadow: 0 6px 18px rgba(22,163,74,.35);
}
.goftiran-login-form-icon { background: linear-gradient(135deg, var(--gf-primary), var(--gf-secondary)); }
.goftiran-membership-success-box p {
        margin: 0 0 20px; font-size: 16px; font-weight: 600; line-height: 1.8; color: #15803d;
}
.goftiran-membership-success-btn, .goftiran-login-form-submit {
        width: 100%; padding: 12px; background: linear-gradient(135deg, var(--gf-primary), var(--gf-secondary));
        color: #fff; border: none; border-radius: 10px; font-size: 14px; font-weight: 700; cursor: pointer;
}
.goftiran-membership-success-btn:hover, .goftiran-login-form-submit:hover { opacity: .9; }
.goftiran-root[data-theme="dark"] .goftiran-membership-success-btn,
.goftiran-root[data-theme="dark"] .goftiran-login-form-submit { color: #0b0b0f; }
/* نوار پیشرفت زمان‌سنج (نسخه ۱.۲۲.۰) */
.goftiran-membership-success-progress {
        height: 4px; width: 100%; background: rgba(22,163,74,.15); border-radius: 4px; overflow: hidden;
        margin-top: 14px;
}
.goftiran-membership-success-progress-bar {
        height: 100%; width: 100%; background: linear-gradient(90deg, #16a34a, #22c55e);
        animation: goftiran-membership-progress 5s linear forwards;
        border-radius: 4px;
}
@keyframes goftiran-membership-progress {
        from { width: 100%; }
        to { width: 0%; }
}
.goftiran-login-form-box h3 { margin: 0 0 6px; font-size: 17px; color: var(--gf-text); }
.goftiran-login-form-desc { margin: 0 0 16px; font-size: 12px; color: var(--gf-text-muted); }
.goftiran-login-form-box input {
        width: 100%; padding: 11px 14px; border: 2px solid var(--gf-border); border-radius: 10px; font-size: 14px;
        background: var(--gf-surface); color: var(--gf-text); margin-bottom: 10px; text-align: left;
}
.goftiran-login-form-box input:focus { outline: none; border-color: var(--gf-primary); }
.goftiran-login-form-error { color: #dc2626; font-size: 12px; margin: 6px 0; min-height: 16px; }
.goftiran-login-form-cancel {
        width: 100%; padding: 10px; background: transparent; color: var(--gf-text-muted); border: 1px solid var(--gf-border);
        border-radius: 10px; font-size: 13px; cursor: pointer; margin-top: 6px;
}

/* ============ پنل تنظیمات چت (نسخه ۱۹.۱۷ + ۱.۲۴.۰ — مشابه تلگرام، تمام‌صفحه) ============ */
.goftiran-theme-settings-btn {
        background: rgba(255,255,255,.15) !important; border: none !important; color: inherit !important;
        width: 30px !important; height: 30px !important; border-radius: 8px !important; cursor: pointer;
        display: flex !important; align-items: center !important; justify-content: center !important; font-size: 13px !important;
        flex-shrink: 0; transition: background .2s;
}
.goftiran-root[data-theme="dark"] .goftiran-theme-settings-btn { background: rgba(212,175,55,.12) !important; }
.goftiran-theme-settings-btn:hover { background: rgba(255,255,255,.28) !important; }

/* پنل تنظیمات — داخل باکس چت، تمام ارتفاع (نسخه ۱.۲۵.۰ — رفع صفحه سفید) */
.goftiran-chat-settings {
        display: none; flex-direction: column;
        background: var(--gf-bg, #fff); overflow: hidden;
        animation: goftiran-cs-slide-in .3s ease;
        flex: 1; min-height: 0; width: 100%; box-sizing: border-box;
        position: relative; z-index: 10;
}
@keyframes goftiran-cs-slide-in {
        from { opacity: 0; transform: translateX(20px); }
        to { opacity: 1; transform: translateX(0); }
}
.goftiran-chat-settings.active { display: flex; }
/* وقتی پنل تنظیمات فعال است، بقیه بخش‌ها مخفی می‌شوند — با :has() و کلاس JS (نسخه ۱.۲۵.۰) */
.goftiran-box:has(.goftiran-chat-settings.active) .goftiran-preform,
.goftiran-box:has(.goftiran-chat-settings.active) .goftiran-chat-body,
.goftiran-box:has(.goftiran-chat-settings.active) .goftiran-blocked-screen,
.goftiran-box:has(.goftiran-chat-settings.active) .goftiran-service-off-screen,
.goftiran-box:has(.goftiran-chat-settings.active) .goftiran-faq-panel,
.goftiran-box:has(.goftiran-chat-settings.active) .goftiran-header { display: none !important; }
/* پشتیبانی برای مرورگرهای بدون :has() — کلاس goftiran-settings-active توسط JS اضافه می‌شود */
.goftiran-box.goftiran-settings-active .goftiran-preform,
.goftiran-box.goftiran-settings-active .goftiran-chat-body,
.goftiran-box.goftiran-settings-active .goftiran-blocked-screen,
.goftiran-box.goftiran-settings-active .goftiran-service-off-screen,
.goftiran-box.goftiran-settings-active .goftiran-faq-panel,
.goftiran-box.goftiran-settings-active .goftiran-header { display: none !important; }

.goftiran-chat-settings-head {
        display: flex; align-items: center; justify-content: space-between; padding: 14px 18px;
        background: linear-gradient(135deg, var(--gf-primary, #2563eb), var(--gf-secondary, #16a34a)); color: #fff; flex-shrink: 0;
        box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.goftiran-root[data-theme="dark"] .goftiran-chat-settings-head { background: linear-gradient(135deg, #1a1a22, #0d0d12); color: var(--gf-primary, #d4af37); }
.goftiran-chat-settings-title { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.goftiran-chat-settings-close {
        background: rgba(255,255,255,.2); border: none; color: #fff; cursor: pointer; width: 32px; height: 32px;
        border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 14px;
        transition: background .2s;
}
.goftiran-chat-settings-close:hover { background: rgba(255,255,255,.32); }

.goftiran-chat-settings-body { padding: 16px; overflow-y: auto; flex: 1; }

/* بخش‌های تنظیمات */
.goftiran-cs-section {
        background: var(--gf-surface, #fff); border-radius: 12px; padding: 14px; margin-bottom: 12px;
        box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.goftiran-root[data-theme="dark"] .goftiran-cs-section { background: rgba(255,255,255,.04); }
.goftiran-cs-section-title {
        font-size: 13px; font-weight: 700; color: var(--gf-text, #1f2430); margin-bottom: 12px;
        display: flex; align-items: center; gap: 6px;
}
.goftiran-cs-section-title i { color: var(--gf-primary, #2563eb); font-size: 14px; }
.goftiran-root[data-theme="dark"] .goftiran-cs-section-title i { color: var(--gf-primary, #d4af37); }

/* پوسته رنگی */
.goftiran-theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.goftiran-theme-card {
        border: 2px solid var(--gf-border, #e2e5ec); border-radius: 12px; padding: 6px; cursor: pointer; transition: all .2s; text-align: center;
        background: var(--gf-bg, #fff);
}
.goftiran-theme-card:hover { border-color: var(--gf-primary, #2563eb); transform: translateY(-2px); }
.goftiran-theme-card.selected { border-color: var(--gf-primary, #2563eb); box-shadow: 0 0 0 2px color-mix(in srgb, var(--gf-primary, #2563eb) 30%, transparent); }
.goftiran-theme-preview { width: 100%; height: 40px; border-radius: 8px; margin-bottom: 4px; display: flex; gap: 4px; padding: 4px; }
.goftiran-theme-preview-bubble { flex: 1; border-radius: 4px; }
.goftiran-theme-name { font-size: 10px; font-weight: 600; color: var(--gf-text, #1f2430); }
.goftiran-theme-mode { font-size: 8px; color: var(--gf-text-muted, #8a8f9c); }

/* اسلایدرها */
.goftiran-cs-slider-row { display: flex; align-items: center; gap: 12px; }
.goftiran-cs-slider {
        flex: 1; -webkit-appearance: none; appearance: none; height: 6px; border-radius: 3px;
        background: var(--gf-border, #e2e5ec); outline: none; cursor: pointer;
}
.goftiran-cs-slider::-webkit-slider-thumb {
        -webkit-appearance: none; appearance: none; width: 20px; height: 20px; border-radius: 50%;
        background: var(--gf-primary, #2563eb); cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.2);
        transition: transform .15s;
}
.goftiran-cs-slider::-webkit-slider-thumb:hover { transform: scale(1.15); }
.goftiran-cs-slider::-moz-range-thumb {
        width: 20px; height: 20px; border-radius: 50%; background: var(--gf-primary, #2563eb);
        cursor: pointer; border: none; box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.goftiran-root[data-theme="dark"] .goftiran-cs-slider::-webkit-slider-thumb { background: var(--gf-primary, #d4af37); }
.goftiran-root[data-theme="dark"] .goftiran-cs-slider::-moz-range-thumb { background: var(--gf-primary, #d4af37); }
.goftiran-cs-slider-val {
        min-width: 36px; text-align: center; font-size: 13px; font-weight: 700; color: var(--gf-text, #1f2430);
        background: var(--gf-bg, #f7f8fc); border-radius: 8px; padding: 4px 8px;
}

/* پیش‌نمایش گردی گوشه */
.goftiran-cs-radius-preview {
        margin-top: 10px; padding: 10px 14px; background: var(--gf-primary, #2563eb); color: #fff;
        font-size: 13px; display: inline-block; max-width: 200px;
        border-radius: 16px 16px 16px 0; /* پیش‌فرض — با JS آپدیت می‌شود */
        transition: border-radius .2s;
}

/* پس‌زمینه چت */
.goftiran-cs-bg-row { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.goftiran-cs-bg-preview {
        width: 80px; height: 80px; border-radius: 10px; border: 2px dashed var(--gf-border, #e2e5ec);
        display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
        background: var(--gf-bg, #f7f8fc); color: var(--gf-text-muted, #8a8f9c); font-size: 10px;
        background-size: cover; background-position: center; flex-shrink: 0; overflow: hidden;
}
.goftiran-cs-bg-preview i { font-size: 20px; }
.goftiran-cs-bg-preview.has-image i, .goftiran-cs-bg-preview.has-image span { display: none; }
.goftiran-cs-bg-actions { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.goftiran-cs-btn {
        padding: 8px 12px; border: none; border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer;
        display: inline-flex; align-items: center; justify-content: center; gap: 5px; transition: all .2s;
        font-family: inherit;
}
.goftiran-cs-btn-primary { background: var(--gf-primary, #2563eb); color: #fff; }
.goftiran-cs-btn-primary:hover { opacity: .9; transform: translateY(-1px); }
.goftiran-cs-btn-secondary { background: var(--gf-bg, #f7f8fc); color: var(--gf-text, #1f2430); border: 1px solid var(--gf-border, #e2e5ec); }
.goftiran-cs-btn-secondary:hover { background: var(--gf-surface, #fff); }
.goftiran-cs-bg-fit-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.goftiran-cs-bg-fit-row label { font-size: 12px; color: var(--gf-text-muted, #8a8f9c); }
.goftiran-cs-bg-fit-row select {
        flex: 1; padding: 6px 10px; border: 1px solid var(--gf-border, #e2e5ec); border-radius: 8px;
        background: var(--gf-bg, #fff); color: var(--gf-text, #1f2430); font-size: 12px; font-family: inherit;
}

/* رنگ‌ها */
.goftiran-cs-color-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.goftiran-cs-color-row:last-child { margin-bottom: 0; }
.goftiran-cs-color-row label { font-size: 12px; color: var(--gf-text, #1f2430); flex: 1; }
.goftiran-cs-color {
        width: 60px; height: 32px; padding: 2px !important; border: 1px solid var(--gf-border, #e2e5ec) !important;
        border-radius: 8px; cursor: pointer; background: var(--gf-bg, #fff);
}

/* ردیف‌های تاگل */
.goftiran-cs-toggle-row {
        display: flex; align-items: center; justify-content: space-between; padding: 10px 0;
        border-bottom: 1px solid var(--gf-border, #e2e5ec);
}
.goftiran-cs-toggle-row:last-child { border-bottom: none; }
.goftiran-cs-toggle-row span { font-size: 13px; color: var(--gf-text, #1f2430); display: flex; align-items: center; gap: 8px; }
.goftiran-cs-toggle-row span i { color: var(--gf-text-muted, #8a8f9c); font-size: 14px; width: 18px; text-align: center; }

/* سوییچ */
.goftiran-switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.goftiran-switch input { opacity: 0; width: 0; height: 0; }
.goftiran-switch span {
        position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
        background: #ccc; transition: .3s; border-radius: 24px;
}
.goftiran-switch span:before {
        position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px;
        background: #fff; transition: .3s; border-radius: 50%;
}
.goftiran-switch input:checked + span { background: var(--gf-primary, #2563eb); }
.goftiran-switch input:checked + span:before { transform: translateX(18px); }
.goftiran-root[data-theme="dark"] .goftiran-switch input:checked + span { background: var(--gf-primary, #d4af37); }

/* دکمه بازگردانی */
.goftiran-cs-actions { margin-top: 8px; }
.goftiran-cs-actions .goftiran-cs-btn { width: 100%; }

@media (max-width: 480px) {
        .goftiran-theme-grid { grid-template-columns: repeat(2, 1fr); }
        .goftiran-chat-settings-body { padding: 12px; }
        .goftiran-cs-section { padding: 12px; }
        .goftiran-cs-bg-row { flex-direction: column; align-items: stretch; }
        .goftiran-cs-bg-preview { width: 100%; height: 100px; }
        .goftiran-cs-bg-actions { flex-direction: row; }
}
