.shiv-chat {
	--shiv-chat-bg: rgba(255, 255, 255, 0.94);
	--shiv-chat-surface: rgba(248, 250, 252, 0.9);
	--shiv-chat-border: rgba(148, 163, 184, 0.24);
	--shiv-chat-border-strong: rgba(24, 58, 107, 0.24);
	--shiv-chat-text: #0f172a;
	--shiv-chat-muted: #475569;
	--shiv-chat-muted-soft: #64748b;
	--shiv-chat-accent: #183a6b;
	--shiv-chat-accent-strong: #0f172a;
	--shiv-chat-gold: #c8a96a;
	--shiv-chat-soft: #eff6ff;
	--shiv-chat-success: #166534;
	--shiv-chat-error: #9a3412;
	--shiv-chat-heading: "Segoe UI", Tahoma, Arial, sans-serif;
	--shiv-chat-body: "Segoe UI", Tahoma, Arial, sans-serif;
	font-family: var(--shiv-chat-body);
	color: var(--shiv-chat-text);
}

.shiv-chat,
.shiv-chat * {
	box-sizing: border-box;
}

.shiv-chat [hidden],
.shiv-chat .is-hidden {
	display: none !important;
}

.shiv-chat__sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.shiv-chat--floating {
	position: fixed;
	right: 1rem;
	bottom: 1rem;
	z-index: 2147483000;
	pointer-events: auto;
	overflow: visible;
	isolation: isolate;
}

body.admin-bar .shiv-chat--floating {
	bottom: calc(1rem + 32px);
}

.shiv-chat--floating .shiv-chat__panel {
	position: fixed;
	right: 1rem;
	bottom: 4.85rem;
	z-index: 2147483001;
}

.shiv-chat--floating .shiv-chat__shell {
	min-height: 38rem;
	max-height: min(82vh, 48rem);
	overflow: auto;
}

.shiv-chat__launcher {
	all: unset;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 114px;
	height: 114px;
	padding: 0;
	border: 0 !important;
	border-radius: 0;
	background: transparent !important;
	box-shadow: none !important;
	color: #183a6b;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	touch-action: manipulation;
	transition: transform 160ms ease, filter 160ms ease, opacity 160ms ease;
	line-height: 0;
	min-width: 0;
	min-height: 0;
}

.shiv-chat__launcher:hover {
	transform: translateY(-1px);
	filter: drop-shadow(0 10px 18px rgba(15, 23, 42, 0.16));
	opacity: 0.94;
}

.shiv-chat__launcher:focus-visible {
	outline: 3px solid rgba(24, 58, 107, 0.16);
	outline-offset: 5px;
	border-radius: 10px;
}

.shiv-chat__launcher::before,
.shiv-chat__launcher::after {
	content: none !important;
}

.shiv-chat__launcher-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 98px;
	height: 98px;
	color: currentColor;
}

.shiv-chat__launcher-icon svg {
	display: block;
	width: 90px;
	height: 90px;
}

.shiv-chat__shell {
	width: min(100vw - 1.1rem, 28.5rem);
	max-width: 28.5rem;
	padding: 0;
	border: 1px solid rgba(148, 163, 184, 0.35);
	border-radius: 6px;
	background: #fff;
	box-shadow:
		0 18px 42px rgba(15, 23, 42, 0.16),
		0 1px 0 rgba(255, 255, 255, 0.92) inset;
	contain: layout paint;
	overflow: hidden;
}

.shiv-chat__panel-head {
	display: flex;
	gap: 0.75rem;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 0;
	padding: 0.8rem 0.95rem;
	background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
	border-bottom: 1px solid rgba(148, 163, 184, 0.3);
	color: var(--shiv-chat-text);
}

.shiv-chat__close {
	flex: 0 0 auto;
	width: 30px;
	height: 30px;
	border: 1px solid rgba(148, 163, 184, 0.28);
	border-radius: 4px;
	background: #ffffff;
	color: #334155;
	font-size: 1rem;
	line-height: 1;
	cursor: pointer;
	touch-action: manipulation;
	transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.shiv-chat__close:hover {
	border-color: rgba(100, 116, 139, 0.48);
	background: #f8fafc;
	color: #0f172a;
}

.shiv-chat__close:focus-visible {
	outline: 3px solid rgba(24, 58, 107, 0.16);
	outline-offset: 2px;
}

.shiv-chat__header {
	display: flex;
	align-items: center;
	gap: 0.8rem;
	min-width: 0;
	margin-bottom: 0;
	flex: 1 1 auto;
}

.shiv-chat__avatar {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 999px;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.98);
	box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.16) inset;
}

.shiv-chat__avatar-image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.shiv-chat__avatar-fallback {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: #183a6b;
	font-size: 0.8rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	background: linear-gradient(180deg, rgba(239, 246, 255, 1), rgba(255, 255, 255, 1));
}

.shiv-chat__header-copy {
	display: grid;
	gap: 0.15rem;
	min-width: 0;
	flex: 1 1 auto;
}

.shiv-chat__brand-name {
	margin: 0;
	color: #111827;
	font-size: 0.96rem;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0;
}

.shiv-chat__status-line {
	display: inline-flex;
	align-items: center;
	gap: 0.42rem;
	margin: 0;
	color: #64748b;
	font-size: 0.78rem;
	font-weight: 400;
	line-height: 1.2;
}

.shiv-chat__status-dot {
	display: inline-flex;
	flex: 0 0 auto;
	width: 7px;
	height: 7px;
	border-radius: 999px;
	background: #22c55e;
	box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.14);
}

.shiv-chat__brand-link {
	display: inline-flex;
	margin: 0;
	text-decoration: none;
	line-height: 0;
}

.shiv-chat__brand-link:hover {
	opacity: 0.95;
}

.shiv-chat__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	margin: 0 0 0.25rem;
	padding: 0.33rem 0.72rem;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.08);
	color: rgba(255, 255, 255, 0.84);
	font-size: 0.66rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	line-height: 1;
	text-transform: uppercase;
}

.shiv-chat__title {
	margin: 0;
	font-family: var(--shiv-chat-heading);
	font-size: 1.36rem;
	font-weight: 750;
	line-height: 1.05;
	letter-spacing: -0.04em;
	color: #111827;
}

.shiv-chat__copy {
	margin: 0.15rem 0 0;
	max-width: 24ch;
	color: #64748b;
	font-size: 0.9rem;
	line-height: 1.55;
}

.shiv-chat__form {
	display: grid;
	gap: 0;
	padding: 0.85rem;
	background: #ffffff;
}

.shiv-chat__thread {
	display: grid;
	gap: 0.72rem;
}

.shiv-chat__notice,
.shiv-chat__error,
.shiv-chat__success {
	margin: 0 1rem 0.9rem;
}

.shiv-chat__notice {
	display: flex;
	align-items: flex-start;
	gap: 0.65rem;
	padding: 0.72rem 0.82rem;
	border-radius: 4px;
	border: 1px solid rgba(148, 163, 184, 0.22);
	background: #f8fafc;
	box-shadow: none;
	color: var(--shiv-chat-muted);
}

.shiv-chat__notice--success {
	border-color: rgba(187, 247, 208, 0.95);
	background: linear-gradient(180deg, rgba(240, 253, 244, 1), rgba(236, 253, 245, 0.94));
	color: var(--shiv-chat-success);
}

.shiv-chat__notice--error {
	border-color: rgba(254, 215, 170, 0.95);
	background: linear-gradient(180deg, rgba(255, 247, 237, 1), rgba(255, 247, 237, 0.94));
	color: var(--shiv-chat-error);
}

.shiv-chat__success,
.shiv-chat__error {
	display: flex;
	align-items: flex-start;
	gap: 0.65rem;
	padding: 0.72rem 0.82rem;
	border-radius: 4px;
	border: 1px solid transparent;
	box-shadow: none;
}

.shiv-chat__success {
	background: linear-gradient(180deg, rgba(240, 253, 244, 1), rgba(236, 253, 245, 0.94));
	border-color: rgba(187, 247, 208, 0.95);
	color: var(--shiv-chat-success);
}

.shiv-chat__error {
	background: linear-gradient(180deg, rgba(255, 247, 237, 1), rgba(255, 247, 237, 0.94));
	border-color: rgba(254, 215, 170, 0.95);
	color: var(--shiv-chat-error);
}

.shiv-chat__status-icon {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.84);
	box-shadow: none;
}

.shiv-chat__status-icon svg {
	display: block;
	width: 16px;
	height: 16px;
}

.shiv-chat__status-copy {
	display: grid;
	gap: 0.1rem;
	padding-top: 0.04rem;
}

.shiv-chat__status-copy strong {
	font-size: 0.83rem;
	font-weight: 600;
	color: currentColor;
}

.shiv-chat__status-copy span {
	font-size: 0.8rem;
	line-height: 1.35;
	color: inherit;
	opacity: 0.92;
}

.shiv-chat__honeypot {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
	opacity: 0;
	pointer-events: none;
}

.shiv-chat__progress {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.shiv-chat__step {
	position: relative;
	display: grid;
	gap: 0.5rem;
	width: 100%;
	padding: 0;
}

.shiv-chat__step + .shiv-chat__step {
	margin-top: 0;
}

.shiv-chat__step[data-step="choice"] {
	width: 100%;
}

.shiv-chat__fieldset {
	margin: 0;
	padding: 0;
	border: 0;
}

.shiv-chat__legend,
.shiv-chat__label {
	display: block;
	margin-bottom: 0.2rem;
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: -0.02em;
	color: var(--shiv-chat-text);
}

.shiv-chat__legend {
	color: var(--shiv-chat-muted-soft);
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.shiv-chat__optional {
	font-weight: 500;
	color: var(--shiv-chat-muted);
}

.shiv-chat__choice-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.65rem;
	align-items: start;
}

.shiv-chat__choice {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 0.7rem 0.8rem;
	border: 1px solid rgba(148, 163, 184, 0.35);
	border-radius: 8px;
	background: #ffffff;
	color: #183a6b;
	font-size: 0.84rem;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	user-select: none;
	text-align: center;
	transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.shiv-chat__choice:hover {
	border-color: rgba(24, 58, 107, 0.45);
	background: #f8fbff;
	color: #0f172a;
	text-decoration: none;
	box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.shiv-chat__choice:focus-within {
	outline: 2px solid rgba(24, 58, 107, 0.22);
	outline-offset: 2px;
	border-radius: 8px;
}

.shiv-chat__choice:has(input:checked) {
	border-color: rgba(24, 58, 107, 0.55);
	background: #183a6b;
	box-shadow: 0 8px 20px rgba(24, 58, 107, 0.2);
	color: var(--shiv-chat-accent-strong);
	text-decoration: none;
}

.shiv-chat__choice:has(input:checked) span {
	color: #ffffff;
}

.shiv-chat__choice span {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1.3;
}

.shiv-chat__choice input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	clip-path: inset(50%);
	overflow: hidden;
	white-space: nowrap;
}

.shiv-chat__input,
.shiv-chat__textarea {
	width: 100%;
	min-height: 40px;
	border: 1px solid rgba(148, 163, 184, 0.3);
	border-radius: 4px;
	background: #ffffff;
	color: var(--shiv-chat-text);
	padding: 0.55rem 0.7rem;
	font: inherit;
	font-size: 0.88rem;
	line-height: 1.35;
	box-shadow: none;
	transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.shiv-chat__textarea {
	resize: vertical;
	min-height: 6.2rem;
}

.shiv-chat__input::placeholder,
.shiv-chat__textarea::placeholder {
	color: #94a3b8;
}

.shiv-chat__input:hover,
.shiv-chat__textarea:hover {
	border-color: rgba(148, 163, 184, 0.38);
}

.shiv-chat__input:focus-visible,
.shiv-chat__textarea:focus-visible {
	border-color: rgba(24, 58, 107, 0.52);
	box-shadow: 0 0 0 3px rgba(24, 58, 107, 0.08);
	outline: 0;
}

.shiv-chat__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	align-items: center;
	justify-content: space-between;
	padding-top: 0.08rem;
}

.shiv-chat__bubble {
	display: inline-flex;
	width: fit-content;
	max-width: 92%;
	padding: 0.45rem 0.6rem;
	font-size: 0.84rem;
	line-height: 1.35;
	letter-spacing: 0;
	box-shadow: none;
}

.shiv-chat__bubble--assistant {
	align-self: flex-start;
	border: 1px solid rgba(203, 213, 225, 0.8);
	border-radius: 4px 10px 10px 10px;
	background: #f1f5f9;
	color: #0f172a;
}

.shiv-chat__bubble--intro {
	display: block;
	max-width: 100%;
	padding: 0;
	margin: 0 0 0.6rem;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: #0f172a;
	font-size: 0.9rem;
	font-weight: 500;
	box-shadow: none;
}

.shiv-chat__bubble--user {
	align-self: flex-end;
	margin-left: auto;
	border: 1px solid rgba(24, 58, 107, 0.22);
	border-radius: 10px 4px 10px 10px;
	background: #dbeafe;
	color: #183a6b;
}

.shiv-chat__reply {
	display: grid;
	gap: 0.45rem;
	padding-left: 0;
}

.shiv-chat__step.is-complete .shiv-chat__reply {
	display: none;
}

.shiv-chat__step.is-complete .shiv-chat__bubble--user {
	display: inline-flex;
}

.shiv-chat__step.is-active .shiv-chat__bubble--assistant {
	display: inline-flex;
}

.shiv-chat__step.is-active .shiv-chat__bubble--user {
	display: none;
}

.shiv-chat__button {
	min-height: 34px;
	padding: 0.4rem 0.72rem;
	border: 1px solid rgba(148, 163, 184, 0.3);
	border-radius: 4px;
	background: #ffffff;
	color: var(--shiv-chat-text);
	font: inherit;
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	cursor: pointer;
	touch-action: manipulation;
	transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.shiv-chat__button:hover {
	border-color: rgba(100, 116, 139, 0.45);
	background: #f8fafc;
	box-shadow: none;
}

.shiv-chat__button:focus-visible {
	outline: 3px solid rgba(24, 58, 107, 0.16);
	outline-offset: 2px;
}

.shiv-chat__button--ghost {
	border-color: rgba(203, 213, 225, 0.5);
	background: #ffffff;
	color: var(--shiv-chat-muted);
	box-shadow: none;
}

.shiv-chat__button--ghost:hover {
	border-color: rgba(100, 116, 139, 0.4);
	background: #f8fafc;
	color: var(--shiv-chat-text);
	box-shadow: none;
}

.shiv-chat__button--primary {
	border-color: rgba(24, 58, 107, 0.4);
	background: #183a6b;
	color: #fff;
	box-shadow: none;
}

.shiv-chat__button--primary:hover {
	border-color: rgba(15, 23, 42, 0.55);
	background: #0f2f57;
	color: #fff;
	box-shadow: none;
}

.shiv-chat__button[disabled] {
	cursor: progress;
	opacity: 0.74;
	transform: none;
	box-shadow: none;
}

@media (max-width: 540px) {
	.shiv-chat--floating {
		right: max(0.5rem, env(safe-area-inset-right, 0px));
		left: auto;
		bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
	}

	body.admin-bar .shiv-chat--floating {
		bottom: calc(0.5rem + 46px + env(safe-area-inset-bottom, 0px));
	}

	.shiv-chat--floating .shiv-chat__panel {
		right: max(0.5rem, env(safe-area-inset-right, 0px));
		left: max(0.5rem, env(safe-area-inset-left, 0px));
		bottom: calc(4rem + env(safe-area-inset-bottom, 0px));
	}

	.shiv-chat__shell {
		width: min(100vw - 1rem, 100%);
		max-width: 100%;
		min-height: auto;
		border-radius: 6px;
		max-height: calc(100dvh - 5.5rem);
	}

	.shiv-chat__panel-head {
		padding: 0.9rem 0.9rem 0.95rem;
	}

	.shiv-chat__launcher {
		width: 90px;
		height: 90px;
	}

	.shiv-chat__launcher-icon {
		width: 78px;
		height: 78px;
	}

	.shiv-chat__launcher-icon svg {
		width: 72px;
		height: 72px;
	}

	.shiv-chat__logo {
		width: 92px;
		height: 30px;
		max-width: 92px;
	}

	.shiv-chat__form {
		padding: 0.82rem;
	}

	.shiv-chat__choice-grid {
		grid-template-columns: 1fr;
	}

	.shiv-chat__step {
		padding: 0;
	}

	.shiv-chat__choice {
		width: 100%;
	}

	.shiv-chat__actions {
		flex-direction: column;
		align-items: stretch;
	}

	.shiv-chat__button {
		width: 100%;
		min-height: 36px;
	}
}

@media (max-width: 390px) {
	.shiv-chat--floating {
		right: 0.4rem;
		bottom: calc(0.4rem + env(safe-area-inset-bottom, 0px));
	}

	body.admin-bar .shiv-chat--floating {
		bottom: calc(0.4rem + 46px + env(safe-area-inset-bottom, 0px));
	}

	.shiv-chat--floating .shiv-chat__panel {
		right: 0.4rem;
		left: 0.4rem;
		bottom: calc(3.8rem + env(safe-area-inset-bottom, 0px));
	}

	.shiv-chat__shell {
		width: calc(100vw - 0.8rem);
		border-radius: 6px;
	}

	.shiv-chat__title {
		font-size: 1.28rem;
	}

	.shiv-chat__copy {
		font-size: 0.9rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.shiv-chat__launcher,
	.shiv-chat__close,
	.shiv-chat__choice,
	.shiv-chat__input,
	.shiv-chat__textarea,
	.shiv-chat__button {
		transition: none;
	}

	.shiv-chat__launcher-icon svg,
	.shiv-chat__launcher::before,
	.shiv-chat__launcher::after {
		animation: none;
	}
}
