/* GWR Live Chat — black / white / #EE652E, editorial (square) */
#gwrc {
	--gwrc-a: #EE652E; --gwrc-k: #0A0A0A; --gwrc-w: #FFFFFF; --gwrc-mute: #6B6B6B; --gwrc-soft: #F3F2EF; --gwrc-line: rgba(10,10,10,.12);
	--gwrc-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
	position: fixed; z-index: 100001; bottom: 24px; right: 24px;
	font-family: inherit; font-size: 15px; line-height: 1.45; color: var(--gwrc-k);
	-webkit-font-smoothing: antialiased;
}
#gwrc.gwrc--left { right: auto; left: 24px; }
#gwrc *, #gwrc *::before, #gwrc *::after { box-sizing: border-box; }
#gwrc [hidden] { display: none !important; }
#gwrc button { text-transform: none; letter-spacing: normal; box-shadow: none; min-height: 0; }
#gwrc svg { width: 20px; height: 20px; display: block; flex: none; }

/* Launcher */
#gwrc .gwrc-launch {
	position: relative; display: inline-flex !important; align-items: center; gap: 10px; height: 56px; padding: 0 22px 0 18px; margin: 0;
	background: var(--gwrc-k); color: var(--gwrc-w); border: 0; border-radius: 0; cursor: pointer;
	font-family: inherit; font-size: 15px; font-weight: 600; line-height: 1; letter-spacing: -.01em;
	box-shadow: 0 10px 30px rgba(0,0,0,.22); transition: background-color .25s, transform .25s;
}
#gwrc .gwrc-launch::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--gwrc-a); transform: scaleX(.25); transform-origin: left; transition: transform .35s cubic-bezier(.2,.7,.2,1); }
#gwrc .gwrc-launch:hover::after, #gwrc .gwrc-launch:focus-visible::after, #gwrc.is-open .gwrc-launch::after { transform: scaleX(1); }
#gwrc .gwrc-launch:hover, #gwrc .gwrc-launch:focus { background: var(--gwrc-k); color: var(--gwrc-w); border: 0; }
#gwrc .gwrc-launch:hover { transform: translateY(-2px); }
#gwrc .gwrc-launch:focus-visible { outline: 2px solid var(--gwrc-a); outline-offset: 3px; }
#gwrc .gwrc-launch__ic { display: grid; place-items: center; color: var(--gwrc-a); }
#gwrc.is-open .gwrc-launch__ic svg { transform: scale(.9); }
#gwrc .gwrc-badge {
	position: absolute; top: -8px; right: -8px; min-width: 22px; height: 22px; padding: 0 6px; display: grid; place-items: center;
	background: var(--gwrc-a); color: var(--gwrc-w); font: 600 12px/1 var(--gwrc-mono); border: 2px solid var(--gwrc-w);
}

/* Panel */
#gwrc .gwrc-panel {
	position: absolute; bottom: 72px; right: 0; width: 380px; height: min(600px, calc(100vh - 120px)); height: min(600px, calc(100dvh - 120px));
	display: flex; flex-direction: column; background: var(--gwrc-w); border: 1px solid var(--gwrc-k);
	box-shadow: 0 24px 60px rgba(0,0,0,.24); overflow: hidden;
	animation: gwrc-in .3s cubic-bezier(.2,.7,.2,1) both;
}
#gwrc.gwrc--left .gwrc-panel { right: auto; left: 0; }
@keyframes gwrc-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

#gwrc .gwrc-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; background: var(--gwrc-k); color: var(--gwrc-w); border-bottom: 3px solid var(--gwrc-a); flex: none; }
#gwrc .gwrc-av { width: 40px; height: 40px; object-fit: cover; object-position: center top; flex: none; border-radius: 0; background: #222; }
#gwrc .gwrc-who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
#gwrc .gwrc-name { font-size: 15px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--gwrc-w); }
#gwrc .gwrc-status { display: flex; align-items: center; gap: 7px; font: 400 11px/1.3 var(--gwrc-mono); letter-spacing: .03em; text-transform: uppercase; color: rgba(255,255,255,.66); }
#gwrc .gwrc-dot { width: 7px; height: 7px; flex: none; background: rgba(255,255,255,.35); }
#gwrc .gwrc-dot.is-on { background: var(--gwrc-a); box-shadow: 0 0 0 3px rgba(238,101,46,.25); }
#gwrc .gwrc-close { width: 36px; height: 36px; display: grid; place-items: center; padding: 0; margin: 0; background: transparent; color: var(--gwrc-w); border: 1px solid rgba(255,255,255,.2); border-radius: 0; cursor: pointer; transition: background-color .2s, border-color .2s; }
#gwrc .gwrc-close:hover, #gwrc .gwrc-close:focus-visible { background: var(--gwrc-a); border-color: var(--gwrc-a); outline: none; }
#gwrc .gwrc-close svg { width: 18px; height: 18px; }

#gwrc .gwrc-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 18px 16px 8px; background: var(--gwrc-w); }
#gwrc .gwrc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
#gwrc .gwrc-m { display: flex; flex-direction: column; max-width: 84%; margin: 0; padding: 0; }
#gwrc .gwrc-m::before { display: none; }
#gwrc .gwrc-m__t { margin: 0; padding: 10px 13px; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; font-size: 14.5px; line-height: 1.45; }
#gwrc .gwrc-m__time { margin-top: 4px; font: 400 10.5px/1 var(--gwrc-mono); letter-spacing: .03em; color: var(--gwrc-mute); }
#gwrc .gwrc-m--owner { align-self: flex-start; }
#gwrc .gwrc-m--owner .gwrc-m__t { background: var(--gwrc-soft); color: var(--gwrc-k); border-left: 3px solid var(--gwrc-a); }
#gwrc .gwrc-m--visitor { align-self: flex-end; align-items: flex-end; }
#gwrc .gwrc-m--visitor .gwrc-m__t { background: var(--gwrc-k); color: var(--gwrc-w); }
#gwrc .gwrc-m--system { align-self: center; max-width: 100%; }
#gwrc .gwrc-m--system .gwrc-m__t { background: transparent; color: var(--gwrc-mute); font: 400 11px/1.4 var(--gwrc-mono); text-align: center; padding: 2px 0; }
#gwrc .gwrc-m--welcome .gwrc-m__time { display: none; }
#gwrc .gwrc-m.is-sending { opacity: .55; }

/* Form */
#gwrc .gwrc-form { flex: none; margin: 0; padding: 10px 12px 12px; border-top: 1px solid var(--gwrc-line); background: var(--gwrc-w); display: flex; flex-direction: column; gap: 8px; }
#gwrc .gwrc-intro { display: grid; gap: 8px; }
#gwrc .gwrc-in, #gwrc .gwrc-ta {
	width: 100%; margin: 0; padding: 10px 12px; min-height: 0;
	font-family: inherit; font-size: 14.5px; font-weight: 400; line-height: 1.4; color: var(--gwrc-k);
	background: var(--gwrc-w); border: 1px solid var(--gwrc-line); border-radius: 0; box-shadow: none; outline: none;
	transition: border-color .2s;
}
#gwrc .gwrc-in:focus, #gwrc .gwrc-ta:focus { border-color: var(--gwrc-k); box-shadow: inset 0 -2px 0 var(--gwrc-a); }
#gwrc .gwrc-in::placeholder, #gwrc .gwrc-ta::placeholder { color: #8d8d8d; opacity: 1; }
#gwrc .gwrc-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
#gwrc .gwrc-compose { display: flex; align-items: flex-end; gap: 8px; }
#gwrc .gwrc-ta { flex: 1; resize: none; height: 44px; max-height: 132px; overflow-y: hidden; }
#gwrc .gwrc-send { width: 44px; height: 44px; flex: none; display: grid; place-items: center; padding: 0; margin: 0; background: var(--gwrc-a); color: var(--gwrc-w); border: 0; border-radius: 0; cursor: pointer; transition: background-color .2s; }
#gwrc .gwrc-send:hover, #gwrc .gwrc-send:focus-visible { background: var(--gwrc-k); outline: none; }
#gwrc .gwrc-send:disabled { opacity: .5; cursor: default; }
#gwrc .gwrc-send:focus:not(:hover):not(:focus-visible) { background: var(--gwrc-a); color: var(--gwrc-w); }
#gwrc .gwrc-close:focus:not(:hover):not(:focus-visible) { background: transparent; color: var(--gwrc-w); border-color: rgba(255,255,255,.2); }
#gwrc .gwrc-err { margin: 0; font-size: 12.5px; color: #b42318; }

#gwrc .gwrc-alt { flex: none; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 9px 12px; border-top: 1px solid var(--gwrc-line); background: var(--gwrc-soft); font: 400 10.5px/1 var(--gwrc-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--gwrc-mute); }
#gwrc .gwrc-alt > span { margin-right: 2px; }
#gwrc .gwrc-alt__l { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; color: var(--gwrc-k) !important; text-decoration: none !important; border: 1px solid var(--gwrc-line); background: var(--gwrc-w); transition: border-color .2s, color .2s; }
#gwrc .gwrc-alt__l svg { width: 14px; height: 14px; }
#gwrc .gwrc-alt__l:hover, #gwrc .gwrc-alt__l:focus-visible { border-color: var(--gwrc-a); color: var(--gwrc-a) !important; outline: none; }

/* Mobile: full-screen sheet, icon-only launcher */
@media (max-width: 520px) {
	#gwrc { bottom: 16px; right: 16px; }
	#gwrc.gwrc--left { left: 16px; }
	#gwrc .gwrc-launch { width: 56px; padding: 0; justify-content: center; }
	#gwrc .gwrc-launch__t { display: none; }
	#gwrc.is-open .gwrc-launch { display: none !important; }
	#gwrc .gwrc-panel { position: fixed; inset: 0; width: auto; height: 100%; height: 100dvh; bottom: auto; right: auto; border: 0; box-shadow: none; }
	#gwrc .gwrc-head { padding-top: max(14px, env(safe-area-inset-top)); }
	#gwrc .gwrc-alt, #gwrc .gwrc-form:last-child { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
	#gwrc .gwrc-in, #gwrc .gwrc-ta { font-size: 16px; } /* no iOS zoom */
}
@media (prefers-reduced-motion: reduce) {
	#gwrc .gwrc-panel { animation: none; }
	#gwrc .gwrc-launch, #gwrc .gwrc-launch::after { transition: none; }
}
@media print { .gwrc { display: none !important; } }
