/* چت پشتیبانی شناور — هویت سرمه‌ای/طلایی HAMIURA */
.sc-root { position: fixed; z-index: 60; bottom: 22px; font-family: inherit; }
.sc-root.sc-left { left: 22px; }
.sc-root.sc-right { right: 22px; }
.sc-fab { position: relative; width: 58px; height: 58px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; color: var(--gold-2, #e3c27a); background: radial-gradient(circle at 30% 25%, #1d3a66, var(--navy, #071a33)); box-shadow: 0 10px 28px rgba(7,26,51,.35), inset 0 0 0 1.5px rgba(227,194,122,.45); transition: transform .2s ease; }
.sc-fab:hover { transform: translateY(-2px) scale(1.03); }
.sc-fab:focus-visible { outline: 3px solid var(--gold, #c99a3a); outline-offset: 3px; }
.sc-ico-close, .is-open .sc-ico-chat { display: none; }
.is-open .sc-ico-close { display: block; }
.sc-dot { position: absolute; top: 3px; inset-inline-end: 3px; width: 14px; height: 14px; border-radius: 50%; background: #e11d48; border: 2px solid #fff; animation: sc-pulse 1.8s infinite; }
@keyframes sc-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(225,29,72,.55); } 50% { box-shadow: 0 0 0 7px rgba(225,29,72,0); } }
.sc-panel { position: absolute; bottom: 72px; width: min(370px, calc(100vw - 32px)); height: min(560px, calc(100vh - 120px)); display: flex; flex-direction: column; overflow: hidden; border-radius: 20px; background: #f7f8fb; box-shadow: 0 24px 60px rgba(7,26,51,.32); border: 1px solid rgba(7,26,51,.08); }
.sc-left .sc-panel { left: 0; }
.sc-right .sc-panel { right: 0; }
.sc-panel[hidden] { display: none; }
.sc-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; color: #fff; background: linear-gradient(135deg, var(--navy, #071a33), var(--navy-2, #12305a)); }
.sc-head img { border-radius: 10px; background: #fff; }
.sc-head div { flex: 1; display: grid; }
.sc-head strong { font-size: 15px; }
.sc-head small { color: #c3cfe0; font-size: 12px; }
.sc-close { width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; }
.sc-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 8px; background: #fff; border-bottom: 1px solid #e8ecf2; }
.sc-tabs button { position: relative; min-height: 38px; border: 0; border-radius: 12px; background: transparent; color: #5b6880; font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.sc-tabs button[aria-selected="true"] { background: var(--navy, #071a33); color: var(--gold-2, #e3c27a); }
.sc-tab-dot { position: absolute; top: 7px; inset-inline-end: 10px; width: 9px; height: 9px; border-radius: 50%; background: #e11d48; }
.sc-body { flex: 1; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 8px; scroll-behavior: smooth; }
.sc-msg { max-width: 84%; padding: 9px 12px 6px; border-radius: 16px; font-size: 14px; line-height: 1.9; box-shadow: 0 1px 2px rgba(7,26,51,.06); word-wrap: break-word; }
.sc-msg p { margin: 0; }
.sc-msg b { display: block; font-size: 11.5px; color: var(--gold, #b58a35); }
.sc-msg time { display: block; text-align: end; font-size: 10.5px; opacity: .6; }
.sc-me { align-self: flex-start; background: var(--navy, #071a33); color: #fff; border-end-start-radius: 4px; }
.sc-me a { color: var(--gold-2, #e3c27a); }
.sc-them { align-self: flex-end; background: #fff; color: #1d2a3f; border-end-end-radius: 4px; }
.sc-sys { align-self: center; max-width: 92%; background: #fff7e6; color: #7a5a14; font-size: 12.5px; text-align: center; box-shadow: none; border: 1px solid #f2e0b4; }
.sc-welcome { background: linear-gradient(135deg, #fffaf0, #fff); border: 1px solid #f0e2c0; }
.sc-typing { display: flex; gap: 4px; padding: 12px 14px; }
.sc-typing span { width: 7px; height: 7px; border-radius: 50%; background: #9aa6ba; animation: sc-blink 1.2s infinite; }
.sc-typing span:nth-child(2) { animation-delay: .2s; } .sc-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes sc-blink { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
.sc-handoff { align-self: center; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; padding: 8px 12px; border-radius: 14px; background: #fff; border: 1px dashed #d8c08a; font-size: 13px; }
.sc-handoff button { border: 0; border-radius: 10px; padding: 6px 12px; background: linear-gradient(135deg, var(--gold-2, #e3c27a), var(--gold, #c99a3a)); color: var(--navy, #071a33); font: inherit; font-weight: 800; cursor: pointer; }
.sc-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px; background: #fff; border-top: 1px solid #e8ecf2; }
.sc-form textarea { flex: 1; resize: none; min-height: 42px; max-height: 120px; padding: 10px 12px; border-radius: 14px; border: 1px solid #dfe5ee; font: inherit; font-size: 14px; line-height: 1.6; background: #f7f8fb; }
.sc-form textarea:focus { outline: none; border-color: var(--gold, #c99a3a); background: #fff; }
.sc-form button { flex: none; width: 42px; height: 42px; border: 0; border-radius: 50%; display: grid; place-items: center; background: var(--navy, #071a33); color: var(--gold-2, #e3c27a); cursor: pointer; transform: scaleX(-1); }
.sc-guest { justify-content: center; align-items: center; text-align: center; gap: 14px; color: #3c4a60; }
.sc-loading, .sc-error { margin: auto; color: #7a879c; font-size: 13px; }
@media (max-width: 720px) {
  .sc-root { bottom: calc(68px + env(safe-area-inset-bottom)); }
  .sc-root.sc-left { left: 14px; } .sc-root.sc-right { right: 14px; }
  .sc-fab { width: 52px; height: 52px; }
  .sc-panel { position: fixed; inset: auto 8px calc(128px + env(safe-area-inset-bottom)) 8px; width: auto; height: min(560px, calc(100vh - 170px)); }
}
@media print { .sc-root { display: none; } }
