/* Centoway marketing site: "Chat with us" box (assets/chat.js). Brand: orange #FF7A1A, green #0E8A52, ink #14281F.
   Sits at the end of the reading direction (right in English, left in Persian). */
.cw-launch { position: fixed; inset-inline-end: 20px; bottom: 20px; z-index: 45; display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 20px 0 16px; border: 0; border-radius: 999px; background: #FF7A1A; color: #14281F; font: inherit; font-weight: 700; font-size: 0.98rem; cursor: pointer; box-shadow: 0 12px 28px rgba(255, 122, 26, 0.35), 0 2px 6px rgba(20, 40, 31, 0.15); transition: transform .15s; }
.cw-launch:hover { transform: translateY(-2px); }
.cw-launch:focus-visible { outline: 3px solid #14281F; outline-offset: 3px; }
.cw-launch svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; }
.cw-launch.on { background: #14281F; color: #FFFFFF; box-shadow: 0 8px 20px rgba(20, 40, 31, 0.3); }

.cw-panel { position: fixed; inset-inline-end: 20px; bottom: 86px; z-index: 46; width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100vh - 120px)); display: flex; flex-direction: column; background: #FFFFFF; color: #14281F; border: 1px solid #E6EDE9; border-radius: 20px; box-shadow: 0 24px 60px rgba(20, 40, 31, 0.22); overflow: hidden; }
.cw-panel[hidden] { display: none; }
.cw-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 14px 16px; background: linear-gradient(120deg, #FFF1E6, #E5F7EE); border-bottom: 1px solid #E6EDE9; }
.cw-head b { display: block; font-family: var(--font-display, "Fredoka", sans-serif); font-size: 1.05rem; }
.cw-head small { display: block; color: #3D5547; font-size: 0.82rem; }
.cw-dot { width: 10px; height: 10px; border-radius: 50%; background: #1FB66A; box-shadow: 0 0 0 4px rgba(31, 182, 106, 0.2); flex: 0 0 10px; }
.cw-close { margin-inline-start: auto; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: #14281F; cursor: pointer; }
.cw-close:hover { background: rgba(20, 40, 31, 0.07); }
.cw-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }

.cw-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: #FBFCFB; }
.cw-msg { max-width: 88%; padding: 10px 13px; border-radius: 14px; font-size: 0.92rem; line-height: 1.55; overflow-wrap: anywhere; }
.cw-bot { align-self: flex-start; background: #FFFFFF; border: 1px solid #E6EDE9; border-start-start-radius: 4px; }
.cw-me { align-self: flex-end; background: #0E8A52; color: #FFFFFF; border-start-end-radius: 4px; }
.cw-link { display: block; margin-top: 8px; color: #0B5C3A; font-weight: 700; text-decoration: none; }
.cw-link:hover { text-decoration: underline; }
.cw-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cw-chip { min-height: 36px; padding: 6px 12px; border: 1px solid #BFE7D3; border-radius: 999px; background: #E7F8EF; color: #0B5C3A; font: inherit; font-size: 0.84rem; font-weight: 600; cursor: pointer; }
.cw-chip:hover, .cw-chip:focus-visible { background: #0E8A52; border-color: #0E8A52; color: #FFFFFF; }

.cw-form { display: grid; gap: 8px; padding: 12px; background: #FFF6DB; border-radius: 14px; }
.cw-form label { display: grid; gap: 3px; font-size: 0.8rem; font-weight: 600; }
.cw-form input { min-height: 40px; padding: 8px 10px; border: 1px solid #D5E3DA; border-radius: 9px; background: #FFFFFF; font: inherit; font-weight: 400; }
.cw-send { min-height: 44px; border: 0; border-radius: 10px; background: #FF7A1A; color: #14281F; font: inherit; font-weight: 700; cursor: pointer; }
.cw-send:disabled { opacity: .6; cursor: progress; }
.cw-out { margin: 0; font-size: 0.82rem; color: #B3261E; }
.cw-out:empty { display: none; }

.cw-ask { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #E6EDE9; background: #FFFFFF; }
.cw-ask input { flex: 1; min-width: 0; min-height: 44px; padding: 0 12px; border: 1px solid #D5E3DA; border-radius: 12px; font: inherit; }
.cw-ask input:focus { outline: 2px solid #0E8A52; outline-offset: 0; border-color: #0E8A52; }
.cw-ask button { width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center; border: 0; border-radius: 12px; background: #0E8A52; color: #FFFFFF; cursor: pointer; }
.cw-ask button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
[dir="rtl"] .cw-ask button svg { transform: scaleX(-1); }
.cw-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 520px) {
  .cw-launch { inset-inline-end: 12px; bottom: 12px; padding: 0 16px 0 14px; }
  .cw-panel { inset-inline: 8px; bottom: 74px; width: auto; height: calc(100vh - 96px); height: calc(100dvh - 96px); }
}
@media (prefers-reduced-motion: reduce) { .cw-launch { transition: none; } .cw-launch:hover { transform: none; } }
