/* Website assistant chat window */
.sd-as-launch {
	position: fixed; right: 20px; bottom: 20px; z-index: 70;
	display: inline-flex; align-items: center; gap: 9px;
	padding: 14px 22px 14px 16px; border: 0; border-radius: 999px;
	background: var(--sd-ink); color: #fff; font: 800 16px/1.2 var(--sd-font);
	/* A soft yellow halo so it stands out even when nothing is moving. */
	box-shadow: 0 0 0 3px rgba(242, 183, 5, 0.45), 0 12px 30px rgba(36, 19, 20, 0.3);
	cursor: pointer;
	transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.sd-as-launch:hover { background: #3a2223; transform: translateY(-1px); box-shadow: 0 0 0 4px rgba(242, 183, 5, 0.7), 0 14px 32px rgba(36, 19, 20, 0.34); }

/* A short "glow" to catch the eye: a yellow ring ripples out and a light
   sweeps across the button. Runs for under 5 seconds, a few times a visit,
   and never for people who have reduced motion switched on (see assistant.js). */
.sd-as-launch::before {
	content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
	box-shadow: 0 0 0 0 rgba(242, 183, 5, 0.65);
}
.sd-as-launch__shine {
	position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none;
}
.sd-as-launch__shine::after {
	content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 45%;
	background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
	transform: skewX(-18deg); opacity: 0;
}
@media (prefers-reduced-motion: no-preference) {
	.sd-as-launch.is-glowing::before { animation: sd-as-ripple 1.5s ease-out 3; }
	.sd-as-launch.is-glowing .sd-as-launch__shine::after { animation: sd-as-shine 1.3s ease-in-out 0.2s 2; }
}
@keyframes sd-as-ripple {
	0% { box-shadow: 0 0 0 0 rgba(242, 183, 5, 0.65); }
	100% { box-shadow: 0 0 0 16px rgba(242, 183, 5, 0); }
}
@keyframes sd-as-shine {
	0% { transform: translateX(0) skewX(-18deg); opacity: 0; }
	15% { opacity: 1; }
	100% { transform: translateX(400%) skewX(-18deg); opacity: 0; }
}
.sd-as-launch:focus-visible { outline: 3px solid var(--sd-yellow); outline-offset: 3px; }
.sd-as-launch svg { flex: none; color: var(--sd-yellow); }

.sd-as {
	position: fixed; right: 20px; bottom: 84px; z-index: 80;
	width: min(390px, calc(100vw - 40px));
	height: min(620px, calc(100vh - 120px));
	display: flex; flex-direction: column;
	background: #fff; color: var(--sd-text); border-radius: 18px;
	box-shadow: 0 24px 60px rgba(36, 19, 20, 0.28); overflow: hidden;
	font: 15px/1.5 var(--sd-font);
}
.sd-as[hidden] { display: none; }

.sd-as__head {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 14px 14px 14px 18px; background: var(--sd-ink); color: #fff;
}
.sd-as__title { display: flex; flex-direction: column; gap: 2px; }
.sd-as__title strong { font-size: 16px; }
.sd-as__badge { font-size: 12px; color: var(--sd-yellow); font-weight: 700; letter-spacing: 0.02em; }
.sd-as__close {
	flex: none; width: 36px; height: 36px; border: 0; border-radius: 50%;
	background: rgba(255, 255, 255, 0.1); color: #fff; cursor: pointer;
	display: inline-flex; align-items: center; justify-content: center;
}
.sd-as__close:hover { background: rgba(255, 255, 255, 0.2); }

.sd-as__log { flex: 1; overflow-y: auto; padding: 16px; background: var(--sd-cream); display: flex; flex-direction: column; gap: 10px; }
.sd-as__msg { max-width: 88%; padding: 10px 14px; border-radius: 16px; word-wrap: break-word; }
.sd-as__msg p { margin: 0 0 8px; }
.sd-as__msg p:last-child { margin-bottom: 0; }
.sd-as__msg ul { margin: 0 0 8px; padding-left: 18px; }
.sd-as__msg li { margin-bottom: 3px; }
.sd-as__msg a { color: var(--sd-red); font-weight: 700; }
.sd-as__msg--assistant { align-self: flex-start; background: #fff; border: 1px solid var(--sd-line); border-bottom-left-radius: 6px; }
.sd-as__msg--user { align-self: flex-end; background: var(--sd-red-deep); color: #fff; border-bottom-right-radius: 6px; white-space: pre-wrap; }

.sd-as__actions { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.sd-as__btn {
	display: block; text-align: center; padding: 10px 14px; border-radius: 999px;
	background: var(--sd-brand); color: #fff !important; text-decoration: none; font-weight: 800; font-size: 14px;
}
.sd-as__btn:hover { background: var(--sd-red); }
.sd-as__btn--call { background: #fff; color: var(--sd-red) !important; border: 2px solid var(--sd-brand); }

.sd-as__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sd-as__chip {
	border: 1px solid var(--sd-line-strong); background: #fff; color: var(--sd-ink);
	border-radius: 999px; padding: 7px 12px; font: 600 13px/1.3 var(--sd-font); cursor: pointer; text-align: left;
}
.sd-as__chip:hover { border-color: var(--sd-brand); color: var(--sd-red); }

.sd-as__dots { display: inline-flex; gap: 4px; padding: 4px 0; }
.sd-as__dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--sd-muted); animation: sd-as-dot 1.2s infinite ease-in-out; }
.sd-as__dots i:nth-child(2) { animation-delay: 0.15s; }
.sd-as__dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes sd-as-dot { 0%, 80%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .sd-as__dots i { animation: none; opacity: 0.6; } }

.sd-as__form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--sd-line); background: #fff; }
.sd-as__input {
	flex: 1; resize: none; min-height: 44px; max-height: 120px; padding: 11px 14px;
	border: 1px solid var(--sd-line-strong); border-radius: 22px; font: 15px/1.4 var(--sd-font); color: var(--sd-ink);
}
.sd-as__input:focus { outline: none; border-color: var(--sd-brand); box-shadow: 0 0 0 3px rgba(225, 26, 34, 0.15); }
.sd-as__send {
	flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%;
	background: var(--sd-brand); color: #fff; cursor: pointer;
	display: inline-flex; align-items: center; justify-content: center;
}
.sd-as__send:disabled { opacity: 0.5; cursor: default; }
.sd-as__foot { margin: 0; padding: 0 14px 10px; background: #fff; font-size: 11.5px; line-height: 1.4; color: var(--sd-muted); }
.sd-as__foot a { color: var(--sd-muted); }
.sd-as__debug { font-size: 12px; color: #8a6d00; background: var(--sd-yellow-soft); padding: 6px 8px; border-radius: 8px; }

/* "Ask me" bubble next to the button (computers only) */
.sd-as-teaser {
	position: fixed; right: 20px; bottom: 84px; z-index: 69; max-width: 260px;
	display: flex; align-items: flex-start; gap: 4px;
	padding: 12px 8px 12px 16px; border-radius: 16px 16px 4px 16px;
	background: #fff; box-shadow: 0 12px 32px rgba(36, 19, 20, 0.2); border: 1px solid var(--sd-line);
	animation: sd-as-in 0.3s ease-out;
}
.sd-as-teaser__text { border: 0; background: none; padding: 0; text-align: left; cursor: pointer; font: 700 14px/1.4 var(--sd-font); color: var(--sd-ink); }
.sd-as-teaser__text:hover { color: var(--sd-red); }
.sd-as-teaser__close { flex: none; width: 26px; height: 26px; margin-top: -4px; border: 0; border-radius: 50%; background: none; color: var(--sd-muted); font-size: 20px; line-height: 1; cursor: pointer; }
.sd-as-teaser__close:hover { background: var(--sd-blush); }
@keyframes sd-as-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .sd-as-teaser { animation: none; } }
html.sd-as-open .sd-as-teaser { display: none; }

/* Phones: sit above the call/book bar; open full screen */
@media (max-width: 700px) {
	.sd-as-launch { right: 12px; bottom: calc(86px + env(safe-area-inset-bottom)); padding: 14px; }
	.sd-as-launch__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	.sd-as { inset: 0; width: 100%; height: 100%; max-height: none; border-radius: 0; }
	.sd-as__foot { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
	html.sd-as-open, html.sd-as-open body { overflow: hidden; }
}

@media (max-width: 700px) { .sd-as-teaser { display: none; } }
@media print { .sd-as-launch, .sd-as, .sd-as-teaser { display: none !important; } }
