/**
 * Cyprus Discovery Chat — launcher + lightbox-style overlay (matches .cd-lightbox).
 */

/* Split floating bars: leading = left (theme), trailing = chat only (right). */
body .cd-floating-actions--leading {
	left: max(1rem, env(safe-area-inset-left)) !important;
	right: auto !important;
	justify-content: flex-start !important;
}

body .cd-floating-actions--trailing {
	left: auto !important;
	right: max(1rem, env(safe-area-inset-right)) !important;
	justify-content: flex-end !important;
}

body.cd-chat-open {
	overflow: hidden;
}

.cd-chat-agent-trigger {
	/* Larger than .cd-to-top / shared --cd-floating-control-height */
	--cd-chat-size: 3.875rem;
	position: relative;
	flex: 0 0 var(--cd-chat-size);
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--cd-chat-size);
	height: var(--cd-chat-size);
	margin: 0;
	padding: 0;
	border: 1px solid #fff;
	border-radius: 50%;
	background: var(--cd-accent, #13294b);
	color: #fff;
	box-shadow: 0 2px 8px rgb(11 32 72 / 34%);
	cursor: pointer;
	transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.cd-chat-agent-trigger:hover,
.cd-chat-agent-trigger:focus-visible {
	background: var(--cd-accent-hover, #1b4fb3);
	box-shadow: 0 3px 11px rgb(11 32 72 / 52%), 0 1px 3px rgb(11 32 72 / 40%);
	outline: none;
}

.cd-chat-agent-trigger:focus-visible {
	outline: 2px solid var(--cd-accent-hover, #1b4fb3);
	outline-offset: 3px;
}

.cd-chat-agent-trigger__icon {
	font-size: 1.65rem;
	line-height: 1;
}

/* Full-screen overlay — same idea as .cd-lightbox */
.cd-chat--overlay {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right))
		max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
	box-sizing: border-box;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.22s ease;
}

.cd-chat--overlay.is-open {
	pointer-events: auto;
	opacity: 1;
}

.cd-chat--overlay[hidden] {
	display: none !important;
}

.cd-chat__backdrop {
	position: absolute;
	inset: 0;
	margin: 0;
	padding: 0;
	border: 0;
	cursor: zoom-out;
	background: rgb(255 255 255 / 90%);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

.cd-chat__sheet {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: min(98vw, 800px);
	max-height: min(88vh, 800px);
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 12px 40px rgb(0 0 0 / 35%);
	font-family: var(--cd-font, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
	overflow: hidden;
	transform: scale(0.96) translateY(8px);
	opacity: 0;
	transition: transform 0.24s ease, opacity 0.24s ease;
	pointer-events: auto;
	--cd-chat-navy: #0b2048;
	--cd-chat-navy-muted: #3d5585;
}

.cd-chat--overlay.is-open .cd-chat__sheet {
	transform: scale(1) translateY(0);
	opacity: 1;
}

.cd-chat--overlay.cd-chat--busy .cd-chat__sheet {
	box-shadow: 0 12px 40px rgb(0 0 0 / 35%), 0 0 0 2px rgb(19 41 75 / 18%);
}

@keyframes cd-chat-pulse-ring {
	0% {
		box-shadow: 0 2px 8px rgb(11 32 72 / 34%), 0 0 0 0 rgb(19 41 75 / 35%);
	}
	70% {
		box-shadow: 0 2px 8px rgb(11 32 72 / 34%), 0 0 0 10px rgb(19 41 75 / 0%);
	}
	100% {
		box-shadow: 0 2px 8px rgb(11 32 72 / 34%), 0 0 0 0 rgb(19 41 75 / 0%);
	}
}

.cd-chat-agent-trigger.is-busy {
	animation: cd-chat-pulse-ring 1.4s ease-out infinite;
}

.cd-chat__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	padding: 0.85rem 1rem;
	background: var(--cd-chat-navy, #0b2048);
	color: #fff;
	flex-shrink: 0;
}

.cd-chat__title {
	margin: 0;
	font-size: clamp(0.9rem, 2.8vw, 1.05rem);
	font-weight: 600;
	line-height: 1.25;
	font-family: var(--cd-font-titles, inherit);
	flex: 1 1 auto;
	min-width: 0;
}

.cd-chat__head-tools {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	flex-shrink: 0;
}

.cd-chat__tool {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	margin: 0;
	padding: 0;
	border: 1px solid rgb(255 255 255 / 45%);
	border-radius: var(--cd-btn-radius, 8px);
	background: rgb(255 255 255 / 12%);
	color: #fff;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.cd-chat__tool .ph {
	font-size: 1.05rem;
	line-height: 1;
}

.cd-chat__tool:hover,
.cd-chat__tool:focus-visible {
	background: rgb(255 255 255 / 22%);
	border-color: rgb(255 255 255 / 65%);
	outline: none;
}

.cd-chat__tool:focus-visible {
	box-shadow: 0 0 0 2px rgb(255 255 255 / 55%);
}

.cd-chat__tool:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.cd-chat__close {
	pointer-events: auto;
	width: 2.75rem;
	height: 2.75rem;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: var(--cd-btn-radius, 8px);
	background: rgb(255 255 255 / 94%);
	color: var(--cd-accent, #13294b);
	font: inherit;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 2px 8px rgb(11 32 72 / 28%);
	transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.cd-chat__close:hover,
.cd-chat__close:focus-visible {
	background: #fff;
	color: var(--cd-accent-hover, #1b4fb3);
	box-shadow: 0 3px 12px rgb(11 32 72 / 46%), 0 1px 4px rgb(11 32 72 / 32%);
	outline: 2px solid var(--cd-accent-hover, #1b4fb3);
	outline-offset: 2px;
}

.cd-chat__status-row {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	padding: 0.45rem 1rem;
	flex-shrink: 0;
	min-height: 2.5rem;
	background: var(--cd-chat-navy-muted, #3d5585);
	border-bottom: 1px solid rgb(255 255 255 / 14%);
	transition: background 0.2s ease;
}

.cd-chat__status-row.is-busy {
	background: #4a6394;
}

.cd-chat__status {
	flex: 1 1 auto;
	min-width: 0;
	font-size: 0.8rem;
	line-height: 1.35;
	color: rgb(255 255 255 / 88%);
	transition: color 0.2s ease, font-weight 0.2s ease;
}

.cd-chat__status-row.is-busy .cd-chat__status {
	color: #fff;
	font-weight: 600;
}

.cd-chat__voice-toggle {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0.3rem;
	flex-shrink: 0;
}

.cd-chat__messages {
	flex: 1 1 auto;
	overflow-y: auto;
	min-height: 500px;
	padding: 0.75rem 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	background: var(--cd-chat-navy, #0b2048);
}

.cd-chat__msg {
	max-width: 92%;
	padding: 0.55rem 0.75rem;
	border-radius: 12px;
	font-size: 0.92rem;
	line-height: 1.45;
	white-space: pre-wrap;
	word-break: break-word;
}

.cd-chat__msg--user {
	align-self: flex-end;
	background: #fff;
	color: #212529;
	border: 1px solid #e9ecef;
	border-bottom-right-radius: 4px;
	box-shadow: 0 1px 2px rgb(0 0 0 / 8%);
}

.cd-chat__msg--assistant {
	align-self: flex-start;
	background: #fff;
	color: #212529;
	border: 1px solid #e9ecef;
	border-bottom-left-radius: 4px;
	white-space: normal;
}

.cd-chat__msg-body {
	font-size: inherit;
	line-height: 1.55;
	word-break: break-word;
}

.cd-chat__msg-body--streaming {
	white-space: pre-wrap;
}

.cd-chat__msg-body p {
	margin: 0 0 0.65em;
}

.cd-chat__msg-body p:last-child {
	margin-bottom: 0;
}

.cd-chat__msg-body h1,
.cd-chat__msg-body h2,
.cd-chat__msg-body h3,
.cd-chat__msg-body h4 {
	margin: 0.85em 0 0.4em;
	font-family: var(--cd-font-titles, inherit);
	font-weight: 600;
	line-height: 1.25;
	color: #13294b;
}

.cd-chat__msg-body h1:first-child,
.cd-chat__msg-body h2:first-child,
.cd-chat__msg-body h3:first-child,
.cd-chat__msg-body h4:first-child {
	margin-top: 0;
}

.cd-chat__msg-body h3 {
	font-size: 1.05em;
}

.cd-chat__msg-body h4 {
	font-size: 1em;
}

.cd-chat__msg-body ul,
.cd-chat__msg-body ol {
	margin: 0.35em 0 0.65em;
	padding-left: 1.35em;
}

.cd-chat__msg-body li {
	margin: 0.25em 0;
}

.cd-chat__msg-body blockquote {
	margin: 0.5em 0;
	padding: 0.4em 0.75em 0.4em 0.85em;
	border-left: 3px solid var(--cd-accent, #13294b);
	color: #495057;
	background: rgb(19 41 75 / 4%);
	border-radius: 0 6px 6px 0;
}

.cd-chat__msg-body pre {
	margin: 0.65em 0;
	padding: 0.75rem;
	background: #f4f4f6;
	border-radius: 8px;
	overflow-x: auto;
	font-size: 0.84em;
	line-height: 1.45;
}

.cd-chat__msg-body code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 0.9em;
	background: rgb(19 41 75 / 7%);
	padding: 0.12em 0.35em;
	border-radius: 4px;
}

.cd-chat__msg-body pre code {
	padding: 0;
	background: none;
	font-size: inherit;
}

.cd-chat__msg-body hr {
	border: 0;
	border-top: 1px solid #dee2e6;
	margin: 0.85em 0;
}

.cd-chat__msg-body strong {
	font-weight: 600;
}

.cd-chat__msg-plain {
	margin: 0;
	white-space: pre-wrap;
}

.cd-chat__msg--assistant a {
	color: var(--cd-accent, #13294b);
	text-decoration: underline;
}

/* Route map message (Leaflet + Leaflet Routing Machine) */
.cd-chat__msg--map {
	align-self: stretch;
	max-width: 100%;
	width: 100%;
	padding: 0;
	background: transparent;
	border: none;
	box-shadow: none;
}

.cd-chat__route-map-wrap {
	width: 100%;
	box-sizing: border-box;
}

.cd-chat__route-map {
	width: 100%;
	height: min(42vh, 320px);
	min-height: 220px;
	border-radius: 12px;
	overflow: hidden;
	border: 1px solid #e9ecef;
	background: #dee2e6;
	box-sizing: border-box;
}

.cd-chat__route-map-caption {
	margin: 0.5rem 0 0;
	font-size: 0.8rem;
	line-height: 1.35;
	color: rgb(255 255 255 / 82%);
}

.cd-chat__route-map-zoom-hint {
	margin-top: 0.25rem;
	font-size: 0.72rem;
	line-height: 1.35;
	color: rgb(255 255 255 / 62%);
}

/* Hide turn-by-turn itinerary; route line and map chrome only. */
.cd-chat__route-map .leaflet-routing-container,
.cd-chat__route-map-wrap .leaflet-routing-container {
	display: none !important;
}

/* Article markers use default Leaflet icons; popups use theme posts-map.css (.cd-map-popup*). */

.cd-chat__msg-body a {
	color: var(--cd-accent, #13294b);
	text-decoration: underline;
	word-break: break-word;
}

.cd-chat__typing {
	align-self: flex-start;
	display: none;
	align-items: center;
	gap: 5px;
	box-sizing: border-box;
	min-height: calc(0.92rem * 1.45 + 1.1rem);
	padding: 0.55rem 0.75rem;
	background: #fff;
	border: 1px solid #e9ecef;
	border-radius: 12px;
	border-bottom-left-radius: 4px;
}

.cd-chat__typing.is-visible {
	display: inline-flex;
}

/* Assistant / text-mode typing — left bubble (dark dots on white bubble) */
.cd-chat__typing.cd-chat__typing--assistant span,
.cd-chat__typing:not(.cd-chat__typing--user) span {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #212529;
	opacity: 0.55;
	will-change: transform, opacity;
	animation: cd-chat-typing-dot-assistant 1.35s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

.cd-chat__typing.cd-chat__typing--assistant span:nth-child(2),
.cd-chat__typing:not(.cd-chat__typing--user) span:nth-child(2) {
	animation-delay: 0.12s;
}

.cd-chat__typing.cd-chat__typing--assistant span:nth-child(3),
.cd-chat__typing:not(.cd-chat__typing--user) span:nth-child(3) {
	animation-delay: 0.24s;
}

/* Voice: “processing your speech” dots align with user bubbles (right). */
.cd-chat__typing.cd-chat__typing--user {
	align-self: flex-end;
	background: #fff;
	border: 1px solid #e9ecef;
	/* Match .cd-chat__msg--user: small corner by the edge, full radius opposite bottom corner. */
	border-radius: 12px;
	border-bottom-right-radius: 4px;
	border-bottom-left-radius: 12px;
	box-shadow: 0 1px 2px rgb(0 0 0 / 8%);
}

.cd-chat__typing.cd-chat__typing--user span {
	background: #212529;
	opacity: 0.55;
	animation: cd-chat-typing-dot-user 1.35s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

.cd-chat__typing.cd-chat__typing--user span:nth-child(2) {
	animation-delay: 0.12s;
}

.cd-chat__typing.cd-chat__typing--user span:nth-child(3) {
	animation-delay: 0.24s;
}

@keyframes cd-chat-typing-dot-user {
	0%,
	100% {
		opacity: 0.45;
		transform: translate3d(0, 0, 0) scale(1);
	}
	50% {
		opacity: 1;
		transform: translate3d(0, -1.5px, 0) scale(1.06);
	}
}

@keyframes cd-chat-typing-dot-assistant {
	0%,
	100% {
		opacity: 0.45;
		transform: translate3d(0, 0, 0) scale(1);
	}
	50% {
		opacity: 1;
		transform: translate3d(0, -1.5px, 0) scale(1.07);
	}
}

.cd-chat__send.is-loading {
	position: relative;
	pointer-events: none;
	opacity: 0.85;
}

.cd-chat__send.is-loading::after {
	content: "";
	position: absolute;
	inset: 0;
	margin: auto;
	width: 1rem;
	height: 1rem;
	border: 2px solid rgb(255 255 255 / 35%);
	border-top-color: #fff;
	border-radius: 50%;
	animation: cd-chat-spin 0.7s linear infinite;
}

@keyframes cd-chat-spin {
	to {
		transform: rotate(360deg);
	}
}

.cd-chat__msg--error {
	align-self: stretch;
	background: #fff5f5;
	color: #842029;
	border: 1px solid #f5c2c7;
}

/* Text Chat [switch] Voice Chat — compact, inline with status hint */
.cd-chat__mode-label {
	font-size: 0.6875rem;
	font-weight: 600;
	line-height: 1.15;
	color: rgb(255 255 255 / 52%);
	transition: color 0.2s ease, opacity 0.2s ease;
	user-select: none;
	white-space: nowrap;
}

.cd-chat__mode-label.is-active {
	color: #fff;
}

.cd-chat__mode-label.is-muted {
	opacity: 0.45;
}

.cd-chat__switch {
	position: relative;
	width: 2.25rem;
	height: 1.375rem;
	flex-shrink: 0;
	padding: 0;
	border: none;
	border-radius: 1.375rem;
	background: #e9e9ea;
	cursor: pointer;
	transition: background 0.25s ease;
	box-shadow: inset 0 0 0 1px rgb(0 0 0 / 6%);
}

.cd-chat__switch::after {
	content: "";
	position: absolute;
	top: 3.5px;
	left: 3.5px;
	width: 1.0625rem;
	height: 1.0625rem;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 2px 6px rgb(0 0 0 / 14%), 0 1px 2px rgb(0 0 0 / 8%);
	transition: transform 0.28s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.cd-chat__switch[aria-checked="true"] {
	background: #34c759;
	box-shadow: inset 0 0 0 1px rgb(0 0 0 / 8%);
}

.cd-chat__switch[aria-checked="true"]::after {
	transform: translateX(0.84rem);
}

.cd-chat__switch:hover:not(:disabled),
.cd-chat__switch:focus-visible {
	outline: none;
}

.cd-chat__switch:focus-visible {
	box-shadow: 0 0 0 3px rgb(52 199 89 / 35%);
}

.cd-chat__switch:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.cd-chat__foot {
	--cd-chat-control-height: 2.5rem;
	display: flex;
	gap: 0.5rem;
	padding: 0.65rem 0.75rem;
	border-top: 1px solid rgb(255 255 255 / 12%);
	background: var(--cd-chat-navy, #0b2048);
	flex-shrink: 0;
	align-items: center;
}

.cd-chat__field-stack {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0;
}

.cd-chat__text-compose {
	flex: 1 1 auto;
	min-width: 0;
}

.cd-chat__voice-enter {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--cd-chat-control-height);
	height: var(--cd-chat-control-height);
	margin: 0;
	padding: 0;
	border: 1px solid rgb(255 255 255 / 35%);
	border-radius: 50%;
	background: rgb(255 255 255 / 10%);
	color: #fff;
	cursor: pointer;
	box-sizing: border-box;
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.cd-chat__voice-enter .ph {
	font-size: 1.15rem;
	line-height: 1;
}

.cd-chat__voice-enter:hover,
.cd-chat__voice-enter:focus-visible {
	background: rgb(255 255 255 / 18%);
	border-color: rgb(255 255 255 / 55%);
	outline: none;
}

.cd-chat__voice-enter:focus-visible {
	box-shadow: 0 0 0 3px rgb(255 255 255 / 25%);
}

.cd-chat__voice-enter:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.cd-chat__input-wrap {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
	width: 100%;
}

/* Voice live: only waveform + stop (text compose, dictate, send hidden). */
.cd-chat__foot--voice-live {
	gap: 0.65rem;
	width: 100%;
	box-sizing: border-box;
}

.cd-chat__foot--voice-live .cd-chat__voice-enter[hidden],
.cd-chat__foot--voice-live .cd-chat__send[hidden] {
	display: none !important;
}

.cd-chat__foot--voice-live .cd-chat__text-compose[hidden],
.cd-chat__foot--voice-live .cd-chat__dictate[hidden],
.cd-chat__foot--voice-live .cd-chat__input[hidden] {
	display: none !important;
}

.cd-chat__foot--voice-live .cd-chat__voice-live-ui {
	flex: 1 1 auto;
	align-self: stretch;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	box-sizing: border-box;
}

.cd-chat__voice-live-ui.is-connecting .cd-chat__waveform {
	opacity: 0.85;
}

.cd-chat__input {
	display: block;
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
	padding: 0.55rem 2.65rem 0.55rem 0.85rem;
	border: 1px solid rgb(255 255 255 / 22%);
	border-radius: 999px;
	font-size: 0.95rem;
	background: #fff;
	color: #212529;
}

.cd-chat__input::placeholder {
	color: #868e96;
}

.cd-chat__input:focus {
	outline: 2px solid rgb(255 255 255 / 65%);
	outline-offset: 0;
	border-color: transparent;
}

.cd-chat__dictate {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--cd-chat-control-height);
	height: var(--cd-chat-control-height);
	padding: 0;
	border: 1px solid #ced4da;
	border-radius: 50%;
	background: #fff;
	color: var(--cd-accent, #13294b);
	cursor: pointer;
	box-sizing: border-box;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.cd-chat__dictate .ph {
	font-size: 1.2rem;
	line-height: 1;
}

.cd-chat__dictate:hover,
.cd-chat__dictate:focus-visible {
	background: rgb(19 41 75 / 6%);
	border-color: var(--cd-accent, #13294b);
	outline: none;
}

.cd-chat__dictate:focus-visible {
	box-shadow: 0 0 0 3px rgb(19 41 75 / 22%);
}

.cd-chat__dictate:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.cd-chat__dictate.is-recording {
	background: #fff0f0;
	border-color: #e03131;
	color: #c92a2a;
	animation: cd-chat-dictate-pulse 1.2s ease-in-out infinite;
}

/* Dictation control sits inside the pill input (right). */
.cd-chat__dictate--inner {
	position: absolute;
	top: 50%;
	right: 4px;
	transform: translateY(-50%);
	width: calc(var(--cd-chat-control-height) - 6px);
	height: calc(var(--cd-chat-control-height) - 6px);
	border: none;
	border-radius: 50%;
	background: rgb(11 32 72 / 8%);
	color: var(--cd-chat-navy, #0b2048);
}

.cd-chat__dictate--inner:hover,
.cd-chat__dictate--inner:focus-visible {
	background: rgb(11 32 72 / 14%);
	border: none;
}

.cd-chat__dictate--inner:focus-visible {
	box-shadow: 0 0 0 3px rgb(255 255 255 / 45%);
}

.cd-chat__dictate--inner.is-recording {
	background: #fff0f0;
	color: #c92a2a;
	animation: cd-chat-dictate-pulse 1.2s ease-in-out infinite;
}

@keyframes cd-chat-dictate-pulse {
	0%,
	100% {
		box-shadow: 0 0 0 0 rgb(224 49 49 / 35%);
	}
	50% {
		box-shadow: 0 0 0 6px rgb(224 49 49 / 0%);
	}
}

.cd-chat__voice-live-ui {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	flex: 1 1 auto;
	min-width: 0;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.cd-chat__voice-live-ui[hidden] {
	display: none !important;
}

.cd-chat__waveform {
	display: flex;
	align-items: flex-end;
	justify-content: flex-start;
	gap: 2px;
	flex: 1 1 0;
	width: 100%;
	min-width: 0;
	height: var(--cd-chat-control-height);
	padding: 0 0.5rem;
	box-sizing: border-box;
	border-radius: 999px;
	border: 1px solid rgb(255 255 255 / 22%);
	background: linear-gradient(180deg, rgb(255 255 255 / 12%), rgb(255 255 255 / 6%));
}

.cd-chat__wavebar {
	display: block;
	flex: 1 1 0;
	width: 0;
	min-width: 2px;
	max-width: 5%;
	min-height: 4px;
	height: 4px;
	align-self: flex-end;
	border-radius: 2px;
	background: #fff;
	opacity: 0.45;
	will-change: height, opacity;
	transition: height 0.05s linear, opacity 0.05s linear;
}

.cd-chat__msg--user.cd-chat__msg--draft {
	opacity: 0.85;
	font-style: italic;
}

.cd-chat__voice-stop {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--cd-chat-control-height);
	height: var(--cd-chat-control-height);
	padding: 0;
	border: 1px solid rgb(255 255 255 / 35%);
	border-radius: 50%;
	background: rgb(255 255 255 / 12%);
	color: #ffb4b4;
	cursor: pointer;
	box-sizing: border-box;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.cd-chat__voice-stop .ph {
	font-size: 1.15rem;
	line-height: 1;
}

.cd-chat__voice-stop:hover,
.cd-chat__voice-stop:focus-visible {
	background: #fff5f5;
	border-color: #c92a2a;
	outline: none;
}

.cd-chat__voice-stop:focus-visible {
	box-shadow: 0 0 0 3px rgb(201 42 42 / 28%);
}

.cd-chat__send {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: var(--cd-chat-control-height);
	height: var(--cd-chat-control-height);
	margin: 0;
	padding: 0 1rem;
	border: 1px solid rgb(255 255 255 / 35%);
	border-radius: 999px;
	background: rgb(255 255 255 / 10%);
	color: #fff;
	font-weight: 600;
	font-size: 0.875rem;
	line-height: 1.25;
	box-sizing: border-box;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.cd-chat__send:hover,
.cd-chat__send:focus-visible {
	background: rgb(255 255 255 / 18%);
	border-color: rgb(255 255 255 / 55%);
	outline: none;
}

.cd-chat__send:focus-visible {
	box-shadow: 0 0 0 3px rgb(255 255 255 / 25%);
}

.cd-chat__send:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

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