/* 1.21.371: live chat avatar + window (includes/chat.php) */
.sch { --sch-acc: var(--sam-gold, #9c7a2e); --sch-ink: #0b1220; --sch-bg: #fff; --sch-mute: #6b7280; --sch-bubble: #f3f4f6; --sch-mine: #e8f0ff; position: fixed; z-index: 99975; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); font: 15px/1.45 Inter, -apple-system, system-ui, sans-serif; color: var(--sch-ink); }
.sch--right { left: auto; right: 16px; }
.sch * { box-sizing: border-box; }
.sch__btn { position: relative; width: 60px; height: 60px; padding: 0; border: 0; border-radius: 50%; background: var(--sch-acc); color: #fff; cursor: pointer; box-shadow: 0 10px 28px rgba(0,0,0,.28); display: flex; align-items: center; justify-content: center; overflow: visible; -webkit-tap-highlight-color: transparent; transition: transform .2s; }
.sch__btn:hover { transform: scale(1.05); }
.sch__btn img, .sch__btn i { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; display: block; }
.sch__btn i { display: flex; align-items: center; justify-content: center; font: 700 24px/1 Inter, sans-serif; font-style: normal; background: var(--sch-acc); }
.sch__btn::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--sch-acc); opacity: 0; animation: schPulse 2.4s infinite; }
@keyframes schPulse { 0% { transform: scale(.9); opacity: .7; } 70% { transform: scale(1.25); opacity: 0; } 100% { opacity: 0; } }
.sch__dot { position: absolute; right: 2px; bottom: 4px; width: 14px; height: 14px; border-radius: 50%; background: #22c55e; border: 2px solid #fff; }
.sch__badge { position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: #ef4444; color: #fff; font: 700 12px/22px Inter, sans-serif; text-align: center; border: 2px solid #fff; display: none; }
.sch.has-unread .sch__badge { display: block; }
.sch__hint { position: absolute; left: 70px; bottom: 10px; white-space: nowrap; background: var(--sch-bg); color: var(--sch-ink); padding: 8px 12px; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.18); font-size: 13px; font-weight: 600; opacity: 0; transform: translateX(-6px); transition: opacity .3s, transform .3s; pointer-events: none; }
.sch--right .sch__hint { left: auto; right: 70px; transform: translateX(6px); }
.sch.show-hint .sch__hint { opacity: 1; transform: none; pointer-events: auto; }
.sch.is-open .sch__btn, .sch.is-open .sch__hint { display: none; }

.sch__win { display: none; width: min(380px, calc(100vw - 32px)); height: min(600px, calc(100vh - 40px - env(safe-area-inset-bottom, 0px))); background: var(--sch-bg); border-radius: 18px; box-shadow: 0 24px 60px rgba(0,0,0,.3); overflow: hidden; flex-direction: column; }
.sch.is-open .sch__win { display: flex; }
.sch__head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; background: var(--sch-ink); color: #fff; }
.sch__head img, .sch__head i { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.sch__head i { display: flex; align-items: center; justify-content: center; background: var(--sch-acc); font: 700 18px/1 Inter, sans-serif; font-style: normal; }
.sch__who { flex: 1; min-width: 0; }
.sch__who b { display: block; font-size: 15px; }
.sch__who span { display: block; font-size: 12px; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sch__x { width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 20px; cursor: pointer; flex: none; }
.sch__body { flex: 1; overflow-y: auto; padding: 14px; background: #fafafa; -webkit-overflow-scrolling: touch; }
.sch__m { margin: 0 0 8px; padding: 9px 13px; border-radius: 16px; max-width: 86%; white-space: pre-wrap; word-break: break-word; font-size: 14.5px; }
.sch__m--out { background: var(--sch-bubble); border-bottom-left-radius: 6px; }
.sch__m--in { background: var(--sch-mine); margin-left: auto; border-bottom-right-radius: 6px; }
.sch__m--sys { background: none; color: var(--sch-mute); font-size: 12.5px; text-align: center; max-width: none; padding: 4px 8px; }
.sch__m small { display: block; font-size: 11px; color: var(--sch-mute); margin-top: 3px; }
.sch__m--in small { text-align: right; }
.sch__note { font-size: 12.5px; color: var(--sch-mute); text-align: center; padding: 4px 10px 8px; }
.sch__form { padding: 4px 2px; }
.sch__form label { display: block; font-size: 13px; font-weight: 600; margin: 10px 0 4px; }
.sch__form input { width: 100%; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 10px; font: inherit; font-size: 15px; background: #fff; color: var(--sch-ink); }
.sch__form input:focus { outline: 2px solid var(--sch-acc); outline-offset: 0; border-color: transparent; }
.sch__form input.is-bad { border-color: #ef4444; }
.sch__err { color: #b91c1c; font-size: 12.5px; margin: 4px 0 0; min-height: 1em; }
.sch__consent { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--sch-mute); margin: 12px 0 10px; }
.sch__consent input { width: auto; margin: 2px 0 0; flex: none; }
.sch__consent a { color: inherit; }
.sch__go { width: 100%; padding: 12px; border: 0; border-radius: 12px; background: var(--sch-acc); color: #fff; font: 700 15px Inter, sans-serif; cursor: pointer; }
.sch__go[disabled] { opacity: .6; cursor: default; }
.sch__foot[hidden] { display: none; }
.sch__foot { display: flex; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid #e5e7eb; background: #fff; }
.sch__foot textarea { flex: 1; resize: none; max-height: 110px; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 12px; font: inherit; font-size: 15px; line-height: 1.35; color: var(--sch-ink); background: #fff; }
.sch__foot textarea:focus { outline: 2px solid var(--sch-acc); outline-offset: 0; border-color: transparent; }
.sch__send { width: 44px; height: 44px; align-self: flex-end; border: 0; border-radius: 50%; background: var(--sch-acc); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; flex: none; }
.sch__send svg { width: 20px; height: 20px; }
.sch__send[disabled] { opacity: .5; cursor: default; }
.sch__wa { font-size: 12.5px; text-align: center; padding: 0 10px 8px; color: var(--sch-mute); }
.sch__wa a { color: var(--sch-ink); font-weight: 600; }
.sch__typing { display: inline-block; margin: 0 0 8px; padding: 9px 13px; border-radius: 16px; background: var(--sch-bubble); }
.sch__typing i { display: inline-block; width: 6px; height: 6px; margin: 0 2px; border-radius: 50%; background: #9ca3af; animation: schDots 1.2s infinite; }
.sch__typing i:nth-child(2) { animation-delay: .2s; } .sch__typing i:nth-child(3) { animation-delay: .4s; }
@keyframes schDots { 0%, 80%, 100% { transform: translateY(0); } 40% { transform: translateY(-4px); } }

@media (max-width: 900px) {
	.sch { bottom: calc(126px + env(safe-area-inset-bottom, 0px)); } /* above the mobile tab bar and the "Ask Sam" tab */
	.sch__btn { width: 52px; height: 52px; }
	.sch__btn img, .sch__btn i { width: 48px; height: 48px; }
	.sch.is-open { left: 0; right: 0; bottom: 0; top: 0; }
	.sch__win { width: 100vw; height: 100%; height: 100dvh; border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) { .sch__btn::after, .sch__typing i { animation: none; } }
