/* SLU WhatsApp Chat (rendered inside a shadow root) */
:host { all: initial; }
.sluwa { position: fixed; z-index: 2147483000; font-family: var(--sluwa-font, inherit); font-size: 14px; line-height: 1.4; color: #222; text-align: left; letter-spacing: normal; text-transform: none; -webkit-font-smoothing: antialiased; transition: opacity .3s ease, transform .3s ease, visibility .3s; }
.sluwa *, .sluwa *::before, .sluwa *::after { box-sizing: border-box; }
.sluwa.is-waiting { opacity: 0; visibility: hidden; transform: translateY(16px); pointer-events: none; }

.sluwa__launch {
	display: flex; align-items: center; gap: 8px; margin: 0;
	background: var(--sluwa-btn, #25D366); color: var(--sluwa-txt, #fff); border: 0; border-radius: 30px;
	padding: 12px 20px 12px 16px; font-family: var(--sluwa-font, inherit); font-size: 15px; font-weight: 700; line-height: 1; text-transform: none; letter-spacing: 0;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .22); cursor: pointer; transition: transform .2s ease, filter .2s ease;
}
.sluwa__launch:hover, .sluwa__launch:focus-visible { background: var(--sluwa-btn, #25D366); color: var(--sluwa-txt, #fff); filter: brightness(.94); transform: translateY(-2px); }
.sluwa__launch svg { width: 24px; height: 24px; flex: 0 0 24px; }
.sluwa__launch--icon { padding: 14px; border-radius: 50%; }
.sluwa__launch--icon svg { width: 28px; height: 28px; }

.sluwa__panel {
	position: absolute; right: 0; bottom: 64px; width: 360px; max-width: calc(100vw - 32px);
	background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
	opacity: 0; transform: translateY(14px) scale(.98); transform-origin: bottom right;
	pointer-events: none; visibility: hidden; transition: opacity .22s ease, transform .22s ease, visibility .22s;
}
.sluwa.is-open .sluwa__panel { opacity: 1; transform: none; pointer-events: auto; visibility: visible; }

.sluwa__head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--sluwa-head, #075E54); color: #fff; }
.sluwa__avatar { width: 46px; height: 46px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; flex: 0 0 46px; }
.sluwa__avatar img { width: 40px; height: 40px; object-fit: contain; margin: 0; }
.sluwa__who { display: flex; flex-direction: column; line-height: 1.3; flex: 1; min-width: 0; }
.sluwa__who strong { font-size: 16px; font-weight: 700; color: #fff; }
.sluwa__who span { font-size: 12px; opacity: .85; display: flex; align-items: center; gap: 6px; }
.sluwa__who i { width: 8px; height: 8px; border-radius: 50%; background: #25D366; display: inline-block; }
.sluwa__close { background: transparent; border: 0; color: #fff; font-size: 28px; line-height: 1; cursor: pointer; padding: 0 4px; margin: 0; min-height: 0; box-shadow: none; }
.sluwa__close:hover, .sluwa__close:focus { background: transparent; color: #fff; opacity: .8; }

.sluwa__body { padding: 16px; background: #ECE5DD; max-height: min(70vh, 560px); overflow-y: auto; }
.sluwa__bubble { position: relative; font-family: var(--sluwa-font, inherit); background: #fff; color: #222; border-radius: 0 10px 10px 10px; padding: 10px 12px 18px; font-size: 14px; line-height: 1.45; max-width: 92%; box-shadow: 0 1px 1px rgba(0, 0, 0, .1); margin-bottom: 14px; }
.sluwa__bubble time { position: absolute; right: 10px; bottom: 4px; font-size: 11px; color: #999; }

.sluwa__form { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.sluwa__row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sluwa__form input, .sluwa__form select, .sluwa__form textarea {
	width: 100%; max-width: none; height: auto; min-height: 0; border: 1px solid #d6d0c7; border-radius: 8px; background: #fff; color: #222;
	padding: 9px 11px; font-family: var(--sluwa-font, inherit); font-size: 14px; font-weight: 400; line-height: 1.35; letter-spacing: 0; margin: 0; box-shadow: none;
}
.sluwa__form textarea { resize: none; }
.sluwa__form input:focus, .sluwa__form select:focus, .sluwa__form textarea:focus { outline: 2px solid var(--sluwa-btn, #25D366); outline-offset: 0; border-color: var(--sluwa-btn, #25D366); }
.sluwa__form .is-invalid { border-color: #d63638; background: #fff6f6; }
.sluwa__hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.sluwa__go { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin: 0; background: var(--sluwa-btn, #25D366); color: var(--sluwa-txt, #fff); border: 0; border-radius: 24px; padding: 12px 16px; font-family: var(--sluwa-font, inherit); font-size: 15px; font-weight: 700; line-height: 1; letter-spacing: 0; text-transform: none; cursor: pointer; }
.sluwa__go:hover, .sluwa__go:focus { background: var(--sluwa-btn, #25D366); color: var(--sluwa-txt, #fff); filter: brightness(.94); }
.sluwa__go svg { width: 20px; height: 20px; }
.sluwa__note { margin: 2px 0 0; font-size: 11px; color: #6b6b6b; text-align: center; }

.sluwa__teaser {
	position: absolute; right: 0; bottom: 64px; width: 250px; background: #fff; color: #222; border-radius: 12px;
	padding: 12px 30px 12px 14px; font-size: 14px; line-height: 1.4; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); cursor: pointer;
}
.sluwa__teaser[hidden], .sluwa.is-open .sluwa__teaser { display: none; }
.sluwa__teaser-x { position: absolute; top: 4px; right: 6px; background: transparent; border: 0; color: #888; font-size: 18px; cursor: pointer; padding: 0 4px; margin: 0; min-height: 0; box-shadow: none; }
.sluwa__teaser-x:hover, .sluwa__teaser-x:focus { background: transparent; color: #333; }


/* ---------- Positions: desktop & tablet ---------- */
@media (min-width: 768px) {
	.sluwa--d-bottom-right { right: var(--sluwa-x); bottom: var(--sluwa-y); }
	.sluwa--d-bottom-left { left: var(--sluwa-x); bottom: var(--sluwa-y); }
	.sluwa--d-bottom-center { left: 0; right: 0; margin: 0 auto; width: max-content; bottom: var(--sluwa-y); }
	.sluwa--d-top-right { right: var(--sluwa-x); top: var(--sluwa-y); }
	.sluwa--d-top-left { left: var(--sluwa-x); top: var(--sluwa-y); }
	.sluwa--d-middle-right { right: var(--sluwa-x); top: calc(50% - 28px); }
	.sluwa--d-middle-left { left: var(--sluwa-x); top: calc(50% - 28px); }
	.sluwa--d-top-right.is-waiting, .sluwa--d-top-left.is-waiting { transform: translateY(-16px); }
	.sluwa--d-bottom-left .sluwa__panel, .sluwa--d-bottom-left .sluwa__teaser { right: auto; left: 0; transform-origin: bottom left; }
	.sluwa--d-bottom-center .sluwa__panel { right: auto; left: 50%; margin-left: -180px; transform-origin: bottom center; }
	.sluwa--d-bottom-center .sluwa__teaser { right: auto; left: 50%; margin-left: -125px; }
	.sluwa--d-top-right .sluwa__panel, .sluwa--d-top-right .sluwa__teaser, .sluwa--d-top-left .sluwa__panel, .sluwa--d-top-left .sluwa__teaser { bottom: auto; top: 64px; transform-origin: top right; }
	.sluwa--d-top-left .sluwa__panel, .sluwa--d-top-left .sluwa__teaser { right: auto; left: 0; transform-origin: top left; }
	.sluwa--d-top-right .sluwa__panel, .sluwa--d-top-left .sluwa__panel { transform: translateY(-14px) scale(.98); }
	.sluwa--d-middle-right .sluwa__panel, .sluwa--d-middle-right .sluwa__teaser { bottom: auto; top: 50%; right: calc(100% + 14px); transform-origin: center right; }
	.sluwa--d-middle-left .sluwa__panel, .sluwa--d-middle-left .sluwa__teaser { bottom: auto; top: 50%; right: auto; left: calc(100% + 14px); transform-origin: center left; }
	.sluwa--d-middle-right .sluwa__panel { transform: translate(14px, -50%) scale(.98); }
	.sluwa--d-middle-left .sluwa__panel { transform: translate(-14px, -50%) scale(.98); }
	.sluwa--d-middle-right .sluwa__teaser, .sluwa--d-middle-left .sluwa__teaser { transform: translateY(-50%); }
	.sluwa--d-middle-right.is-open .sluwa__panel, .sluwa--d-middle-left.is-open .sluwa__panel { transform: translateY(-50%); }
}

/* ---------- Positions: mobile ---------- */
@media (max-width: 767px) {
	.sluwa--m-bottom-right { right: var(--sluwa-mx); bottom: var(--sluwa-my); }
	.sluwa--m-bottom-left { left: var(--sluwa-mx); bottom: var(--sluwa-my); }
	.sluwa--m-bottom-center { left: 0; right: 0; margin: 0 auto; width: max-content; bottom: var(--sluwa-my); }
	.sluwa--m-top-right { right: var(--sluwa-mx); top: var(--sluwa-my); }
	.sluwa--m-top-left { left: var(--sluwa-mx); top: var(--sluwa-my); }
	.sluwa--m-middle-right { right: var(--sluwa-mx); top: calc(50% - 28px); }
	.sluwa--m-middle-left { left: var(--sluwa-mx); top: calc(50% - 28px); }
	.sluwa--m-top-right.is-waiting, .sluwa--m-top-left.is-waiting { transform: translateY(-16px); }
	/* The chat window opens nearly full-width on phones, whichever corner the button is in. */
	.sluwa .sluwa__panel { position: fixed; left: 10px; right: 10px; width: auto; max-width: none; margin: 0; top: auto; bottom: calc(var(--sluwa-my) + 66px); transform-origin: bottom center; }
	.sluwa--m-top-right .sluwa__panel, .sluwa--m-top-left .sluwa__panel { bottom: auto; top: calc(var(--sluwa-my) + 66px); transform: translateY(-14px) scale(.98); transform-origin: top center; }
	.sluwa--m-middle-right .sluwa__panel, .sluwa--m-middle-left .sluwa__panel { bottom: 10px; }
	.sluwa.is-open .sluwa__panel { transform: none; }
	.sluwa__body { max-height: min(62vh, 520px); }
	.sluwa .sluwa__teaser { width: min(250px, calc(100vw - 40px)); }
	.sluwa--m-bottom-left .sluwa__teaser, .sluwa--m-top-left .sluwa__teaser, .sluwa--m-middle-left .sluwa__teaser { right: auto; left: 0; }
	.sluwa--m-bottom-center .sluwa__teaser { right: auto; left: 50%; margin-left: -125px; }
	.sluwa--m-top-right .sluwa__teaser, .sluwa--m-top-left .sluwa__teaser { bottom: auto; top: 64px; }
}

.sluwa__admin-note { background: #fff8e5; border: 1px solid #f0c33c; color: #614a00; border-radius: 8px; padding: 8px 10px; font-size: 12px; margin-bottom: 12px; }
.sluwa__admin-note a { color: #614a00; text-decoration: underline; }

/* [slu_whatsapp_button] */
.sluwa-inline-btn { display: inline-flex; align-items: center; gap: 8px; background: #25D366; color: #fff !important; text-decoration: none !important; border-radius: 30px; padding: 12px 20px; font-weight: 700; }
.sluwa-inline-btn svg { width: 22px; height: 22px; }

@media (max-width: 480px) {
	.sluwa__launch span { display: none; }
	.sluwa__launch { padding: 14px; border-radius: 50%; }
	.sluwa__launch svg { width: 28px; height: 28px; }
	.sluwa__row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
	.sluwa, .sluwa__panel, .sluwa__launch { transition: none; }
}
