/**
 * Vera: immersive Verde concierge room.
 */

body.echelon-td-page {
	margin: 0;
	height: calc(100svh - var(--wp-admin--admin-bar--height, 0px));
	overflow: hidden;
	background: #24352e;
	color: #faf8f3;
}

body.echelon-td-page .echelon-footer {
	display: none;
}

body.echelon-td-page .echelon-header {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	background: transparent;
	border-bottom: 0;
}

body.echelon-td-page .echelon-header__brand,
body.echelon-td-page .echelon-header__menu a,
body.echelon-td-page .echelon-header__link,
body.echelon-td-page .echelon-header__toggle {
	color: #faf8f3;
}

body.echelon-td-page .echelon-header__brand:hover,
body.echelon-td-page .echelon-header__brand:focus-visible,
body.echelon-td-page .echelon-header__menu a:hover,
body.echelon-td-page .echelon-header__menu a:focus-visible {
	color: #faf8f3;
	opacity: 0.88;
}

body.echelon-td-page .echelon-header__button {
	background: transparent;
	color: #faf8f3;
	box-shadow: inset 0 0 0 1px rgba(250, 248, 243, 0.42);
}

body.echelon-td-page .echelon-header__button:hover,
body.echelon-td-page .echelon-header__button:focus-visible {
	background: rgba(250, 248, 243, 0.1);
	color: #faf8f3;
	opacity: 1;
}

.echelon-td {
	position: relative;
	height: 100%;
	min-height: 100%;
	overflow: hidden;
	background: #24352e;
}

.echelon-td__atmosphere {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: min(56vh, 560px);
	z-index: 0;
	pointer-events: none;
	transform-origin: 50% 18%;
}

.echelon-td__vista {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 38%;
	filter: brightness(0.58) saturate(0.68) contrast(1.04);
}

.echelon-td__veil {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(
			to bottom,
			rgba(36, 53, 46, 0.42) 0%,
			rgba(36, 53, 46, 0.28) 16%,
			rgba(36, 53, 46, 0.46) 40%,
			rgba(36, 53, 46, 0.84) 72%,
			#24352e 100%
		),
		linear-gradient(
			to right,
			rgba(36, 53, 46, 0.28) 0%,
			transparent 55%
		);
}

body.echelon-td-page:not(.echelon-td-page--settled) .echelon-td__atmosphere {
	opacity: 0;
	transform: scale(1.045);
}

body.echelon-td-page:not(.echelon-td-page--settled) .echelon-td__room {
	opacity: 0;
}

body.echelon-td-page--settled .echelon-td__atmosphere {
	opacity: 1;
	transform: scale(1);
	transition: opacity 1.4s ease, transform 2s ease;
}

body.echelon-td-page--settled .echelon-td__room {
	opacity: 1;
	transition: opacity 1.05s ease 0.28s;
}

.echelon-td__room {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	width: 100%;
	max-width: 44rem;
	height: 100%;
	min-height: 0;
	margin: 0 auto;
	padding: max(8.5rem, min(36vh, 20rem)) 24px 18px;
}

.echelon-td__thread {
	display: flex;
	flex-direction: column;
	gap: 28px;
	flex: 1 1 auto;
	min-height: 0;
	max-height: none;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 4px 2px 20px;
	scrollbar-width: thin;
	scrollbar-color: rgba(250, 248, 243, 0.22) transparent;
}

.echelon-td__msg {
	max-width: 38em;
}

.echelon-td__msg--assistant {
	align-self: flex-start;
}

.echelon-td__msg--user {
	align-self: flex-end;
	max-width: 28em;
}

.echelon-td__msg-label {
	margin: 0 0 8px;
	font-family: var(--echelon-font-display);
	font-style: italic;
	font-weight: 400;
	font-size: 1.05rem;
	letter-spacing: 0;
	text-transform: none;
	color: rgba(250, 248, 243, 0.62);
}

.echelon-td__msg--user .echelon-td__msg-label {
	font-family: var(--echelon-font-body);
	font-style: normal;
	font-size: 12px;
	font-weight: 500;
	text-align: right;
	color: rgba(250, 248, 243, 0.5);
}

.echelon-td__msg-body {
	margin: 0;
}

.echelon-td__msg--assistant .echelon-td__msg-body {
	font-family: var(--echelon-font-display);
	font-size: clamp(1.2rem, 2.2vw, 1.38rem);
	line-height: 1.48;
	color: #faf8f3;
}

.echelon-td__msg--assistant .echelon-td__msg-body p {
	margin: 0 0 0.85em;
}

.echelon-td__msg--assistant .echelon-td__msg-body p:last-child {
	margin-bottom: 0;
}

.echelon-td__msg--assistant .echelon-td__msg-body ul,
.echelon-td__msg--assistant .echelon-td__msg-body ol {
	margin: 0.4em 0 0.9em;
	padding-left: 1.2em;
}

.echelon-td__msg--assistant .echelon-td__msg-body li {
	margin: 0.2em 0;
}

.echelon-td__msg--assistant .echelon-td__msg-body strong {
	font-weight: 600;
}

.echelon-td__msg--assistant .echelon-td__msg-body em {
	font-style: italic;
}

.echelon-td__caret {
	display: inline-block;
	width: 0.08em;
	height: 0.9em;
	margin-left: 1px;
	background: #b8972a;
	vertical-align: -0.05em;
	animation: echelon-td-caret 1s steps(1) infinite;
}

.echelon-td__stream-text {
	display: contents;
}

.echelon-td__msg--streaming .echelon-td__msg-body {
	min-height: 1.4em;
}

.echelon-td__msg--user .echelon-td__msg-body {
	padding: 12px 16px 13px;
	border: 0;
	border-radius: 2px;
	background: rgba(250, 248, 243, 0.1);
	font-family: var(--echelon-font-body);
	font-size: 15px;
	line-height: 1.55;
	color: #faf8f3;
}

.echelon-td__msg--pending .echelon-td__msg-body {
	min-height: 1.4em;
}

.echelon-td__composing {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 1.2em;
}

.echelon-td__composing span {
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: rgba(250, 248, 243, 0.55);
	animation: echelon-td-pulse 1.4s ease-in-out infinite;
}

.echelon-td__composing span:nth-child(2) {
	animation-delay: 0.16s;
}

.echelon-td__composing span:nth-child(3) {
	animation-delay: 0.32s;
}

.echelon-td__msg--arrive {
	animation: echelon-td-speak 0.7s ease both;
}

.echelon-td__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 4px;
}

.echelon-td__composer {
	display: flex;
	align-items: flex-end;
	gap: 14px;
	margin-top: auto;
	padding: 22px 0 4px;
	border-top: 0;
	background: linear-gradient(to bottom, rgba(36, 53, 46, 0) 0%, #24352e 32%);
}

.echelon-td__input {
	flex: 1 1 auto;
	min-height: 52px;
	max-height: 160px;
	padding: 14px 16px;
	border: 1px solid rgba(250, 248, 243, 0.22);
	border-radius: 2px;
	background: rgba(250, 248, 243, 0.06);
	color: #faf8f3;
	font-family: var(--echelon-font-body);
	font-size: 15px;
	line-height: 1.5;
	resize: none;
}

.echelon-td__input::placeholder {
	color: rgba(250, 248, 243, 0.48);
}

.echelon-td__input:focus {
	outline: 2px solid rgba(184, 151, 42, 0.55);
	outline-offset: 1px;
	border-color: rgba(184, 151, 42, 0.7);
}

.echelon-td__send,
.echelon-td__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	padding: 14px 20px;
	border-radius: 2px;
	font-family: var(--echelon-font-body);
	font-weight: 500;
	font-size: 14px;
	letter-spacing: 0;
	text-transform: none;
	cursor: pointer;
}

.echelon-td__send {
	border: 0;
	background: transparent;
	color: #faf8f3;
	padding-left: 4px;
	padding-right: 4px;
	min-height: 44px;
	font-family: var(--echelon-font-display);
	font-size: 1.2rem;
	font-style: italic;
}

.echelon-td__send:hover,
.echelon-td__send:focus-visible {
	color: #b8972a;
	background: transparent;
	border-color: transparent;
}

.echelon-td__btn--primary {
	border: 1px solid #24352e;
	background: #24352e;
	color: #faf8f3;
}

.echelon-td__btn--primary:hover,
.echelon-td__btn--primary:focus-visible {
	background: #1c2923;
	border-color: #1c2923;
}

.echelon-td__btn--ghost {
	border: 1px solid #1a1a1a;
	background: transparent;
	color: #1a1a1a;
}

.echelon-td__btn--ghost:hover,
.echelon-td__btn--ghost:focus-visible {
	background: #1a1a1a;
	color: #faf8f3;
}

.echelon-td__send:disabled,
.echelon-td__input:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.echelon-td__error {
	margin: 10px 0 0;
	font-family: var(--echelon-font-body);
	font-size: 14px;
	color: #f0c7bc;
}

.echelon-td__error[hidden] {
	display: none;
}

.echelon-td__overlay {
	position: fixed;
	inset: 0;
	z-index: 1200;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(36, 53, 46, 0.72);
}

.echelon-td__overlay[hidden] {
	display: none;
}

.echelon-td__panel {
	width: min(36rem, 100%);
	max-height: min(90vh, 46rem);
	overflow-y: auto;
	padding: 32px 28px;
	border: 0.5px solid #e0d9ce;
	background: #faf8f3;
	color: #1a1a1a;
	box-shadow: 0 18px 40px rgba(26, 26, 26, 0.18);
}

.echelon-td__panel-title {
	margin: 0;
	font-family: var(--echelon-font-display);
	font-weight: 400;
	font-size: 1.7rem;
	line-height: 1.25;
	color: #1a1a1a;
}

.echelon-td__panel-copy {
	margin: 12px 0 0;
	font-family: var(--echelon-font-body);
	font-size: 15px;
	line-height: 1.6;
	color: #6b6b6b;
}

.echelon-td__field {
	margin-top: 18px;
}

.echelon-td__label {
	display: block;
	margin: 0 0 8px;
	font-family: var(--echelon-font-body);
	font-weight: 500;
	font-size: 13px;
	letter-spacing: 0;
	text-transform: none;
	color: #1a1a1a;
}

.echelon-td__field input[type="email"],
.echelon-td__field input[type="text"],
.echelon-td__field input[type="number"],
.echelon-td__field select,
.echelon-td__field textarea {
	width: 100%;
	min-height: 48px;
	padding: 12px 14px;
	border: 0.5px solid #e0d9ce;
	border-radius: 2px;
	background: #fff;
	font-family: var(--echelon-font-body);
	font-size: 15px;
	color: #1a1a1a;
}

.echelon-td__field textarea {
	min-height: 88px;
	resize: vertical;
}

.echelon-td__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 14px;
}

.echelon-td__check--tag {
	margin-top: 0;
	font-size: 13px;
}

.echelon-td__check {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-top: 16px;
	font-family: var(--echelon-font-body);
	font-size: 14px;
	line-height: 1.5;
	color: #1a1a1a;
}

.echelon-td__check input {
	margin-top: 3px;
}

.echelon-td__hp {
	position: absolute;
	left: -9999px;
	height: 0;
	overflow: hidden;
}

.echelon-td__advisors {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 18px 0 0;
}

.echelon-td__advisor {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	padding: 12px;
	border: 0.5px solid #e0d9ce;
	background: #f3efe6;
	text-align: left;
	cursor: pointer;
}

.echelon-td__advisor:hover,
.echelon-td__advisor:focus-visible {
	border-color: #24352e;
}

.echelon-td__advisor img {
	width: 44px;
	height: 44px;
	object-fit: cover;
	border-radius: 50%;
}

.echelon-td__advisor-name {
	margin: 0;
	font-family: var(--echelon-font-display);
	font-size: 1.1rem;
}

.echelon-td__advisor-meta {
	margin: 2px 0 0;
	font-family: var(--echelon-font-body);
	font-size: 12px;
	color: #6b6b6b;
}

@keyframes echelon-td-speak {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes echelon-td-pulse {
	0%,
	80%,
	100% {
		opacity: 0.28;
		transform: scale(0.85);
	}
	40% {
		opacity: 1;
		transform: scale(1);
	}
}

@keyframes echelon-td-caret {
	50% {
		opacity: 0;
	}
}

@media (max-width: 640px) {
	.echelon-td__atmosphere {
		height: min(42vh, 320px);
	}

	.echelon-td__room {
		padding-top: max(7.5rem, min(34vh, 16rem));
		padding-bottom: 20px;
	}

	.echelon-td__thread {
		gap: 22px;
	}

	.echelon-td__composer {
		flex-direction: row;
		align-items: flex-end;
	}

	.echelon-td__msg--assistant .echelon-td__msg-body {
		font-size: 1.18rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.echelon-td-page:not(.echelon-td-page--settled) .echelon-td__atmosphere,
	body.echelon-td-page:not(.echelon-td-page--settled) .echelon-td__room,
	body.echelon-td-page--settled .echelon-td__atmosphere,
	body.echelon-td-page--settled .echelon-td__room,
	.echelon-td__msg--arrive {
		opacity: 1;
		transform: none;
		transition: none;
		animation: none;
	}

	.echelon-td__caret,
	.echelon-td__composing span {
		animation: none;
	}
}
