@font-face {
	font-family: "Gento";
	src: local("Gento");
	font-display: swap;
}

:root {
	--chat-background: #0a0d2e;
	--chat-text: #f8fafc;
	--chat-muted: #c4ccda;
	--chat-blue: #55a8ff;
	--chat-panel: rgba(9, 16, 39, 0.68);
	--chat-border: rgba(255, 255, 255, 0.16);
}

* {
	box-sizing: border-box;
}

html,
body {
	min-width: 320px;
	min-height: 100%;
	margin: 0;
}

body {
	position: relative;
	min-height: 100svh;
	overflow-x: hidden;
	color: var(--chat-text);
	background: var(--chat-background);
	font-family: "Gento", Inter, system-ui, sans-serif;
	-webkit-font-smoothing: antialiased;
}

button,
input {
	font: inherit;
}

.chat-background,
.chat-stars {
	position: fixed;
	inset: 0;
	pointer-events: none;
}

.chat-background {
	z-index: -4;
	background-color: var(--chat-background);
	background-repeat: no-repeat;
	background-position: center;
	background-size: cover;
}

.chat-background--part-two {
	background-image: url("../assets/images/BG_PART2.webp");
}

.chat-background--part-three {
	z-index: -3;
	opacity: 0.42;
	background-image: url("../assets/images/BG_PART3.webp");
	mix-blend-mode: screen;
}

.chat-stars {
	z-index: -2;
	background-repeat: no-repeat;
	background-position: center;
	background-size: cover;
	animation: chat-stars-twinkle 8s ease-in-out infinite;
}

.chat-stars--top {
	background-image: url("../assets/images/BG_STARS1.png");
}

.chat-stars--bottom {
	z-index: -1;
	background-image: url("../assets/images/BG_STARS2.png");
	animation-delay: -3s;
}

@keyframes chat-stars-twinkle {
	0%,
	100% { opacity: 0.11; }
	50% { opacity: 0.82; }
}

.chat-header {
	position: relative;
	z-index: 2;
	width: 100%;
	border-bottom: 1px solid var(--chat-border);
	background: rgba(7, 12, 39, 0.2);
	backdrop-filter: blur(18px);
}

.chat-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: min(100% - 40px, 1180px);
	min-height: 72px;
	margin: 0 auto;
}

.chat-brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	color: var(--chat-text);
	text-decoration: none;
}

.chat-brand__logo {
	width: 30px;
	height: 30px;
	object-fit: contain;
}

.chat-brand__name {
	display: inline-flex;
	align-items: center;
	font-size: 19px;
	font-weight: 700;
	letter-spacing: -0.02em;
}

.chat-brand__name strong {
	position: relative;
	top: 1px;
	margin-left: 2px;
	padding: 3px 5px;
	color: var(--chat-text);
	background: rgba(40, 119, 238, 0.92);
	border-radius: 6px;
	font-size: 0.86em;
	line-height: 1;
}

.chat-brand:focus-visible,
.profile-button:focus-visible,
.chat-composer button:focus-visible {
	outline: 3px solid rgba(147, 197, 253, 0.7);
	outline-offset: 4px;
}

.chat-header__actions {
	display: flex;
	align-items: center;
	gap: 18px;
}

.chat-header__status,
.chat-shell__match {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--chat-muted);
	font-size: 0.78rem;
	font-weight: 600;
}

.chat-header__status-dot,
.chat-shell__match span {
	width: 7px;
	height: 7px;
	background: #42d58d;
	border-radius: 50%;
	box-shadow: 0 0 0 4px rgba(66, 213, 141, 0.12);
}

.profile-button {
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	padding: 0;
	background: rgba(234, 243, 255, 0.1);
	border: 1px solid rgba(147, 197, 253, 0.3);
	border-radius: 50%;
	cursor: pointer;
	transition: background-color 180ms ease, transform 180ms ease;
}

.profile-button img {
	width: 30px;
	height: 30px;
}

.profile-button:hover {
	background: rgba(85, 168, 255, 0.2);
	transform: translateY(-1px);
}

.chat-main {
	position: relative;
	z-index: 1;
	display: grid;
	place-items: center;
	min-height: calc(100svh - 72px);
	padding: clamp(28px, 7vw, 88px) 20px;
}

.chat-shell {
	display: flex;
	flex-direction: column;
	width: min(100%, 780px);
	height: min(620px, calc(100svh - 150px));
	min-height: min(620px, calc(100svh - 150px));
	overflow: hidden;
	background: var(--chat-panel);
	border: 1px solid var(--chat-border);
	border-radius: 24px;
	box-shadow: 0 28px 90px rgba(1, 5, 25, 0.3), inset 0 1px rgba(255, 255, 255, 0.06);
	backdrop-filter: blur(24px);
	animation: chat-panel-in 650ms ease both;
}

@keyframes chat-panel-in {
	from { opacity: 0; transform: translateY(16px); }
	to { opacity: 1; transform: translateY(0); }
}

.chat-shell__topbar {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 20px;
	padding: clamp(22px, 4vw, 34px) clamp(20px, 5vw, 42px);
	border-bottom: 1px solid var(--chat-border);
}

.chat-shell__heading {
	min-width: 0;
}

.chat-shell__heading .chat-connection-card {
	justify-content: flex-start;
	margin-top: 14px;
}

.chat-shell__heading h1 {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.chat-connection-card {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
	min-height: 68px;
}

.chat-connection-card .chat-connected-state__profile {
	width: 58px;
	height: 58px;
	flex: 0 0 auto;
	margin: 0;
	background: rgba(255, 255, 255, 0.06);
	border-color: rgba(255, 255, 255, 0.16);
	box-shadow: none;
}

.chat-connection-card .chat-connected-state__profile img {
	width: 0;
	height: 0;
	opacity: 0;
}

.chat-connection-card .chat-connected-state__profile video {
	position: absolute;
	width: 0;
	height: 0;
	opacity: 0;
	border-radius: 50%;
	object-fit: cover;
	pointer-events: none;
}

.chat-connection-card__details {
	display: grid;
	gap: 5px;
	min-width: 0;
}

.chat-connection-card__details strong {
	max-width: 170px;
	overflow: hidden;
	color: var(--chat-text);
	font-size: 0.95rem;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.chat-connection-card__details > span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--chat-muted);
	font-size: 0.76rem;
	white-space: nowrap;
}

.chat-topbar-actions {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	justify-content: center;
	gap: 4px;
	flex: 0 0 auto;
}

.chat-topbar-actions .chat-next-button {
	margin-top: 0;
}

.chat-connection-card__details [id="matched-country-flag"] {
	font-size: 1rem;
}

.chat-connection-card.is-connected .chat-connected-state__profile img {
	width: 38px;
	height: 38px;
	opacity: 1;
}

.chat-connection-card .chat-connected-state__profile.is-typing img {
	width: 0;
	height: 0;
	opacity: 0;
}

.chat-connection-card .chat-connected-state__profile.is-typing video {
	position: static;
	width: 52px;
	height: 52px;
	opacity: 1;
}

.chat-connection-card.is-connected .chat-connected-state__profile {
	background: rgba(85, 168, 255, 0.1);
	border-color: rgba(85, 168, 255, 0.3);
	box-shadow: 0 0 0 6px rgba(85, 168, 255, 0.05);
}

.chat-shell__eyebrow {
	margin: 0 0 10px;
	color: var(--chat-blue);
	font-size: 0.67rem;
	font-weight: 800;
	letter-spacing: 0.15em;
}

.chat-shell h1 {
	max-width: 430px;
	margin: 0;
	font-size: clamp(1.4rem, 3vw, 2rem);
	letter-spacing: -0.03em;
	line-height: 1.1;
}

.chat-shell__match {
	flex: 0 0 auto;
	padding-top: 4px;
	white-space: nowrap;
}

.chat-empty-state {
	display: grid;
	place-items: center;
	align-content: center;
	flex: 1 1 auto;
	min-height: 0;
	height: auto;
	padding: 44px 20px;
	text-align: center;
}

.chat-empty-state__signal {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	width: 68px;
	height: 68px;
	margin-bottom: 24px;
	background: rgba(85, 168, 255, 0.1);
	border: 1px solid rgba(85, 168, 255, 0.22);
	border-radius: 50%;
}

.chat-empty-state__signal span {
	width: 5px;
	height: 5px;
	background: var(--chat-blue);
	border-radius: 50%;
	animation: signal-pulse 1.2s ease-in-out infinite;
}

.chat-empty-state__signal span:nth-child(2) { animation-delay: 160ms; }
.chat-empty-state__signal span:nth-child(3) { animation-delay: 320ms; }

@keyframes signal-pulse {
	0%, 100% { opacity: 0.35; transform: translateY(0); }
	50% { opacity: 1; transform: translateY(-5px); }
}

.chat-empty-state h2 {
	margin: 0;
	font-size: clamp(1.25rem, 3vw, 1.55rem);
	letter-spacing: -0.02em;
}

.chat-empty-state p {
	max-width: 320px;
	margin: 10px 0 20px;
	color: var(--chat-muted);
	font-size: 0.92rem;
	line-height: 1.55;
}

.chat-empty-state__loader {
	display: flex;
	gap: 6px;
}

.chat-empty-state__loader span {
	width: 5px;
	height: 5px;
	background: rgba(196, 204, 218, 0.5);
	border-radius: 50%;
}

.chat-empty-state.is-offline .chat-empty-state__loader {
	position: relative;
	width: 32px;
	height: 24px;
}

.chat-empty-state.is-offline .chat-empty-state__loader span {
	display: none;
}

.chat-empty-state.is-offline .chat-empty-state__loader::before {
	content: '';
	position: absolute;
	left: 1px;
	top: 1px;
	width: 24px;
	height: 18px;
	border: 3px solid rgba(196, 204, 218, 0.72);
	border-bottom: 0;
	border-radius: 24px 24px 0 0;
	transform: scaleX(0.72);
}

.chat-empty-state.is-offline .chat-empty-state__loader::after {
	content: '';
	position: absolute;
	right: 0;
	top: 1px;
	width: 24px;
	height: 3px;
	background: #ff7b72;
	box-shadow: 0 0 0 1px rgba(255, 123, 114, 0.12);
	transform: rotate(45deg);
	transform-origin: center;
}

.chat-connected-state {
	display: grid;
	place-items: center;
	align-content: center;
	gap: 10px;
	text-align: center;
}

.chat-connected-state__profile {
	display: grid;
	place-items: center;
	width: 82px;
	height: 82px;
	margin-bottom: 10px;
	background: rgba(85, 168, 255, 0.1);
	border: 1px solid rgba(85, 168, 255, 0.3);
	border-radius: 50%;
	box-shadow: 0 0 0 8px rgba(85, 168, 255, 0.06);
}

.chat-connected-state__profile img {
	width: 58px;
	height: 58px;
}

.chat-connected-state h2,
.chat-connected-state p {
	margin: 0;
}

.chat-connected-state h2 {
	font-size: clamp(1.3rem, 3vw, 1.65rem);
	letter-spacing: -0.025em;
}

.chat-connected-state p {
	color: var(--chat-muted);
	font-size: 0.9rem;
}

.chat-next-button {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 18px;
	min-height: 42px;
	margin-top: 12px;
	padding: 0 16px 0 18px;
	color: #ffffff;
	background: #2877ee;
	border: 1px solid rgba(133, 194, 255, 0.78);
	border-radius: 999px;
	box-shadow: 0 10px 24px rgba(31, 117, 238, 0.24);
	cursor: pointer;
	font-size: 0.82rem;
	font-weight: 800;
	transition: background-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.chat-next-button::after {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	width: max-content;
	max-width: 220px;
	padding: 7px 10px;
	color: var(--chat-text);
	background: rgba(7, 12, 39, 0.94);
	border: 1px solid rgba(147, 197, 253, 0.28);
	border-radius: 7px;
	box-shadow: 0 8px 20px rgba(1, 5, 25, 0.24);
	content: attr(data-tooltip);
	font-size: 0.68rem;
	font-weight: 600;
	line-height: 1.3;
	opacity: 0;
	pointer-events: none;
	transform: translateY(-4px);
	transition: opacity 180ms ease, transform 180ms ease;
	visibility: hidden;
}

.chat-next-button:hover::after,
.chat-next-button:focus-visible::after {
	opacity: 1;
	transform: translateY(0);
	visibility: visible;
}

.chat-next-button:hover,
.chat-next-button:focus-visible {
	background: #3f8dff;
	box-shadow: 0 14px 28px rgba(31, 117, 238, 0.32);
	transform: translateY(-2px);
}

.chat-next-button:focus-visible,
.chat-composer input:focus-visible,
.chat-composer button:focus-visible {
	outline: 3px solid rgba(147, 197, 253, 0.7);
	outline-offset: 3px;
}

.chat-shell.is-connected .chat-empty-state__signal,
.chat-shell.is-connected .chat-empty-state > h2,
.chat-shell.is-connected .chat-empty-state > p,
.chat-shell.is-connected .chat-empty-state__loader {
	display: none;
}

.chat-shell.is-connected .chat-empty-state {
	display: none;
}

.chat-shell.is-connected .chat-empty-state {
	padding-top: 20px;
	padding-bottom: 20px;
}

.chat-messages {
	display: grid;
	flex: 1 1 auto;
	align-content: start;
	gap: 8px;
	min-height: 0;
	max-height: none;
	padding: 0 clamp(20px, 5vw, 42px) 12px;
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
	touch-action: pan-y;
	outline: 0;
}

.chat-messages:hover,
.chat-messages:focus,
.chat-messages:focus-visible {
	border-color: transparent;
	outline: 0;
}

.chat-messages::-webkit-scrollbar {
	display: none;
}

.chat-shell:not(.is-connected) .chat-messages {
	display: none;
}

.chat-message {
	display: flex;
	align-items: flex-start;
	justify-self: start;
	gap: 9px;
	width: fit-content;
	max-width: min(78%, 560px);
	padding: 8px 12px 9px 8px;
	color: var(--chat-text);
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 10px 10px 10px 3px;
}

.chat-message--self {
	justify-self: end;
	padding-right: 8px;
	padding-left: 12px;
	background: rgba(40, 119, 238, 0.7);
	border-radius: 10px 10px 3px 10px;
}

.chat-message__avatar {
	width: 28px;
	height: 28px;
	flex: 0 0 28px;
	padding: 4px;
	background: rgba(85, 168, 255, 0.16);
	border: 1px solid rgba(147, 197, 253, 0.34);
	border-radius: 50%;
}

.chat-message__content {
	display: grid;
	min-width: 0;
	gap: 2px;
}

.chat-message__sender {
	color: #8fc7ff;
	font-size: 0.66rem;
	font-weight: 700;
	line-height: 1.2;
}

.chat-message__text {
	min-width: 0;
	color: var(--chat-text);
	font-size: 0.82rem;
	line-height: 1.4;
	white-space: pre-wrap;
	word-break: break-word;
}

.chat-composer {
	display: flex;
	gap: 10px;
	padding: 18px clamp(20px, 5vw, 42px) 22px;
	border-top: 1px solid var(--chat-border);
}

.chat-composer input {
	min-width: 0;
	flex: 1;
	min-height: 48px;
	padding: 0 16px;
	color: var(--chat-text);
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 12px;
}

.chat-composer input::placeholder {
	color: rgba(196, 204, 218, 0.56);
}

.chat-composer button {
	width: 48px;
	min-height: 48px;
	color: #ffffff;
	background: #2877ee;
	border: 0;
	border-radius: 12px;
	cursor: not-allowed;
	font-size: 1.25rem;
	opacity: 0.45;
}

.chat-composer input:not(:disabled) {
	cursor: text;
}

.chat-composer button:not(:disabled) {
	cursor: pointer;
	opacity: 1;
}

.profile-drawer {
	position: fixed;
	z-index: 10;
	inset: 0;
	visibility: hidden;
	opacity: 0;
	transition: visibility 260ms ease, opacity 260ms ease;
}

.profile-drawer.is-open {
	visibility: visible;
	opacity: 1;
}

.profile-drawer__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(3, 8, 28, 0.42);
	backdrop-filter: blur(8px);
}

.profile-drawer__panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	width: min(100%, 390px);
	padding: 34px 30px 28px;
	color: #101828;
	background: #f8fbff;
	border-left: 1px solid rgba(255, 255, 255, 0.72);
	box-shadow: -24px 0 70px rgba(0, 0, 0, 0.26);
	transform: translateX(100%);
	transition: transform 360ms cubic-bezier(.22, .75, .25, 1);
}

.profile-drawer.is-open .profile-drawer__panel {
	transform: translateX(0);
}

.profile-drawer__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 20px;
}

.profile-drawer__eyebrow {
	margin: 0 0 8px;
	color: #2877ee;
	font-size: 0.65rem;
	font-weight: 800;
	letter-spacing: 0.15em;
}

.profile-drawer__header h2 {
	margin: 0;
	font-size: 1.8rem;
	letter-spacing: -0.035em;
}

.profile-drawer__close {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	flex: 0 0 auto;
	padding: 0;
	color: #475467;
	background: #eaf1f8;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	font-size: 24px;
	line-height: 1;
	transition: background-color 180ms ease, transform 180ms ease;
}

.profile-drawer__close:hover,
.profile-drawer__close:focus-visible {
	background: #d9e8f8;
	transform: rotate(8deg);
}

.profile-summary {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-top: 34px;
	padding: 16px;
	background: #eef6ff;
	border: 1px solid #d9eaff;
	border-radius: 16px;
}

.profile-summary img {
	width: 48px;
	height: 48px;
}

.profile-summary div {
	display: grid;
	gap: 4px;
}

.profile-summary strong {
	color: #101828;
	font-size: 1rem;
}

.profile-summary span {
	color: #667085;
	font-size: 0.74rem;
}

.profile-details {
	display: grid;
	gap: 0;
	margin: 24px 0 0;
}

.profile-details > div {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 54px;
	border-bottom: 1px solid #e4e9ef;
}

.profile-details__wide {
	align-items: flex-start !important;
	padding: 14px 0;
}

.profile-details__wide dd {
	width: min(100%, 240px);
}

.profile-details dt {
	color: #667085;
	font-size: 0.78rem;
	font-weight: 700;
}

.profile-details dd {
	margin: 0;
	color: #101828;
	font-size: 0.9rem;
	font-weight: 700;
	text-align: right;
}

.profile-view {
	display: flex;
	flex: 1;
	flex-direction: column;
}

.profile-inline-input {
	display: none;
	min-width: 0;
	max-width: 190px;
	min-height: 34px;
	padding: 0 8px;
	color: #101828;
	background: #ffffff;
	border: 1px solid #d0d5dd;
	border-radius: 8px;
	font-size: 0.8rem;
	font-weight: 600;
	text-align: right;
}

.profile-view.is-editing .profile-inline-input {
	display: block;
}

.profile-view.is-editing .profile-details dd > span {
	display: none;
}

.profile-inline-input:focus {
	border-color: #55a8ff;
	box-shadow: 0 0 0 3px rgba(85, 168, 255, 0.13);
	outline: 0;
}

.profile-gender-options {
	display: none;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin: 0;
	padding: 0;
	border: 0;
}

.profile-view.is-editing .profile-gender-options {
	display: grid;
}

.profile-gender-option {
	position: relative;
	min-width: 0;
}

.profile-gender-option input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.profile-gender-option span,
.profile-country-picker__trigger {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	min-height: 42px;
	padding: 0 8px;
	color: #667085;
	background: #ffffff;
	border: 1px solid #d0d5dd;
	border-radius: 10px;
	cursor: pointer;
	font-size: 0.72rem;
	font-weight: 700;
	transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.profile-gender-option span:hover,
.profile-country-picker__trigger:hover {
	border-color: #98caff;
	transform: translateY(-1px);
}

.profile-gender-option input:checked + span {
	color: #18784f;
	background: #ecfdf3;
	border-color: #42c887;
	box-shadow: inset 0 0 0 1px #42c887;
}

.profile-gender-option input:focus-visible + span,
.profile-country-picker__trigger:focus-visible {
	outline: 3px solid rgba(85, 168, 255, 0.42);
	outline-offset: 3px;
}

.profile-gender-option img {
	width: 20px;
	height: 20px;
}

.profile-country-picker {
	display: none;
	position: relative;
}

.profile-view.is-editing .profile-country-picker {
	display: block;
}

.profile-country-picker__trigger {
	justify-content: space-between;
	width: 100%;
	text-align: left;
}

.profile-country-picker__selected {
	display: flex;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.profile-country-picker__placeholder,
.profile-country-picker__chevron {
	color: #98a2b3;
}

.profile-country-picker__menu {
	position: absolute;
	z-index: 2;
	top: calc(100% + 8px);
	right: 0;
	left: 0;
	padding: 8px;
	background: #ffffff;
	border: 1px solid #d0d5dd;
	border-radius: 12px;
	box-shadow: 0 18px 40px rgba(16, 24, 40, 0.16);
}

.profile-country-picker__search {
	width: 100%;
	min-height: 36px;
	padding: 0 10px;
	color: #101828;
	background: #ffffff;
	border: 1px solid #d0d5dd;
	border-radius: 8px;
	outline: 0;
}

.profile-country-picker__search:focus {
	border-color: #55a8ff;
	box-shadow: 0 0 0 3px rgba(85, 168, 255, 0.13);
}

.profile-country-picker__list {
	display: grid;
	gap: 2px;
	max-height: 160px;
	margin: 6px 0 0;
	padding: 0;
	overflow-y: auto;
	list-style: none;
}

.profile-country-option {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	min-height: 32px;
	padding: 5px 7px;
	color: #344054;
	background: transparent;
	border: 0;
	border-radius: 7px;
	cursor: pointer;
	font-size: 0.75rem;
	text-align: left;
}

.profile-country-option:hover,
.profile-country-option:focus-visible {
	color: #18784f;
	background: #ecfdf3;
	outline: 0;
}

.profile-country-option img {
	width: 20px;
	height: 14px;
}

.profile-country-picker__empty {
	margin: 10px 4px 4px;
	color: #98a2b3;
	font-size: 0.75rem;
}

.profile-auto-message-row dd {
	display: grid;
	gap: 10px;
	width: min(100%, 240px);
}

.profile-auto-message-summary {
	max-width: 240px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.profile-auto-message-editor {
	display: none;
	gap: 8px;
	text-align: left;
}

.profile-view.is-editing .profile-auto-message-summary {
	display: none;
}

.profile-view.is-editing .profile-auto-message-editor {
	display: grid;
}

.profile-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	color: #667085;
	cursor: pointer;
	font-size: 0.72rem;
	font-weight: 700;
}

.profile-toggle input {
	position: absolute;
	width: 1px;
	height: 1px;
	left: -9999px;
	top: -9999px;
	margin: 0;
	opacity: 0;
}

.profile-toggle__track {
	position: relative;
	display: inline-flex;
	align-items: center;
	width: 42px;
	height: 24px;
	padding: 3px;
	background: #d0d5dd;
	border-radius: 999px;
	transition: background-color 180ms ease;
}

.profile-toggle__track span {
	display: block;
	width: 18px;
	height: 18px;
	background: #ffffff;
	border-radius: 50%;
	box-shadow: 0 1px 3px rgba(16, 24, 40, 0.25);
	transition: transform 180ms ease;
}

.profile-toggle input:checked + .profile-toggle__track {
	background: #42c887;
}

.profile-toggle input:checked + .profile-toggle__track span {
	transform: translateX(18px);
}

.profile-toggle input:focus-visible + .profile-toggle__track {
	outline: 3px solid rgba(85, 168, 255, 0.42);
	outline-offset: 3px;
}

.profile-auto-message-editor textarea {
	width: 100%;
	min-height: 72px;
	padding: 9px 10px;
	resize: vertical;
	color: #101828;
	background: #ffffff;
	border: 1px solid #d0d5dd;
	border-radius: 8px;
	font-size: 0.78rem;
	font-weight: 600;
	line-height: 1.4;
	outline: 0;
}

.profile-auto-message-editor textarea:focus {
	border-color: #55a8ff;
	box-shadow: 0 0 0 3px rgba(85, 168, 255, 0.13);
}

.profile-auto-message-hint,
.profile-auto-message-error {
	margin: 0;
	font-size: 0.68rem;
	line-height: 1.35;
}

.profile-auto-message-hint {
	color: #98a2b3;
}

.profile-auto-message-error {
	color: #c0394b;
}

.profile-view__actions {
	display: grid;
	gap: 10px;
	margin-top: auto;
}

.profile-required-message {
	margin: 14px 0 0;
	color: #c0394b;
	font-size: 0.74rem;
	line-height: 1.4;
}

.profile-view.is-required .profile-view__actions {
	margin-top: 18px;
}

.profile-view.is-required .profile-drawer__primary:not(:disabled) {
	box-shadow: 0 10px 26px rgba(32, 164, 100, 0.3);
}

.profile-drawer__primary:disabled {
	cursor: not-allowed;
	opacity: 0.45;
}

.profile-view__actions .profile-drawer__primary {
	margin-top: 0;
}

.profile-drawer__primary,
.profile-drawer__secondary {
	min-height: 48px;
	border-radius: 11px;
	cursor: pointer;
	font-size: 0.84rem;
	font-weight: 800;
	transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.profile-drawer__primary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	margin-top: auto;
	padding: 0 16px 0 18px;
	color: #ffffff;
	background: #20a464;
	border: 1px solid #20a464;
}

.profile-drawer__primary:hover,
.profile-drawer__primary:focus-visible {
	background: #188a52;
	border-color: #188a52;
	transform: translateY(-1px);
}

.profile-edit {
	display: grid;
	gap: 14px;
	margin-top: 28px;
}

.profile-field {
	display: grid;
	gap: 7px;
	color: #344054;
	font-size: 0.78rem;
	font-weight: 700;
}

.profile-field input,
.profile-field select {
	width: 100%;
	min-height: 44px;
	padding: 0 12px;
	color: #101828;
	background: #ffffff;
	border: 1px solid #d0d5dd;
	border-radius: 10px;
	outline: 0;
}

.profile-field input:focus,
.profile-field select:focus {
	border-color: #55a8ff;
	box-shadow: 0 0 0 4px rgba(85, 168, 255, 0.13);
}

.profile-edit__message {
	min-height: 16px;
	margin: 0;
	color: #c0394b;
	font-size: 0.74rem;
}

.profile-edit__actions {
	display: grid;
	grid-template-columns: 1fr 1.4fr;
	gap: 10px;
	margin-top: auto;
}

.profile-edit__actions .profile-drawer__primary {
	margin-top: 0;
}

.profile-drawer__secondary {
	color: #344054;
	background: #ffffff;
	border: 1px solid #d0d5dd;
}

.profile-drawer__secondary:hover,
.profile-drawer__secondary:focus-visible {
	background: #eef4fa;
	border-color: #aebdca;
}

.profile-drawer__close:focus-visible,
.profile-drawer__primary:focus-visible,
.profile-drawer__secondary:focus-visible,
.profile-field input:focus-visible,
.profile-field select:focus-visible {
	outline: 3px solid rgba(85, 168, 255, 0.42);
	outline-offset: 3px;
}

body.profile-is-open {
	overflow: hidden;
}

@media screen and (min-width: 601px) {
	html,
	body {
		height: 100%;
		overflow: hidden;
	}

	.chat-main {
		height: calc(100svh - 72px);
		min-height: 0;
		padding: 20px;
		overflow: hidden;
	}

	.chat-shell {
		height: min(620px, calc(100svh - 112px));
		min-height: 0;
	}

	.chat-empty-state {
		min-height: 0;
	}

	.chat-connected-state {
		gap: 8px;
	}

	.profile-drawer__panel {
		padding-top: 26px;
		padding-bottom: 24px;
	}

	.profile-summary {
		margin-top: 24px;
		padding: 12px;
	}

	.profile-summary img {
		width: 42px;
		height: 42px;
	}

	.profile-details {
		margin-top: 16px;
	}

	.profile-details div {
		min-height: 46px;
	}

	.profile-edit {
		gap: 10px;
		margin-top: 20px;
	}
}

@media screen and (max-width: 600px) {
	html,
	body {
		height: 100%;
		overflow: hidden;
	}

	.chat-header__inner {
		width: min(100% - 32px, 1180px);
		min-height: 64px;
	}

	.chat-header__status {
		display: none;
	}

	.chat-main {
		height: calc(var(--chat-viewport-height, 100svh) - 64px);
		min-height: 0;
		padding: 20px 12px;
		overflow: hidden;
	}

	.chat-shell {
		height: calc(var(--chat-viewport-height, 100svh) - 104px);
		min-height: 0;
		border-radius: 20px;
	}

	.chat-shell__topbar {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		align-items: center;
		gap: 12px;
	}

	.chat-shell__match {
		margin-top: 16px;
	}

	.chat-connection-card {
		gap: 8px;
		min-height: 54px;
	}

	.chat-shell__heading .chat-connection-card {
		margin-top: 10px;
	}

	.chat-connection-card .chat-connected-state__profile {
		width: 48px;
		height: 48px;
	}

	.chat-connection-card__details strong {
		max-width: 120px;
		font-size: 0.84rem;
	}

	.chat-connection-card__details > span {
		font-size: 0.68rem;
	}

	.chat-next-button {
		min-height: 36px;
		gap: 8px;
		padding-right: 11px;
		padding-left: 13px;
		font-size: 0.72rem;
	}

	.chat-empty-state {
		min-height: 0;
	}

	.chat-composer {
		padding-right: 16px;
		padding-left: 16px;
	}

	.chat-messages {
		padding-right: 16px;
		padding-left: 16px;
	}

	.profile-drawer {
		align-items: end;
		display: flex;
	}

	.profile-drawer__panel {
		top: auto;
		width: 100%;
		max-height: 90svh;
		padding: 28px 20px 24px;
		border-top: 1px solid rgba(255, 255, 255, 0.72);
		border-left: 0;
		border-radius: 24px 24px 0 0;
		transform: translateY(100%);
	}

	.profile-drawer.is-open .profile-drawer__panel {
		transform: translateY(0);
	}

	.profile-summary {
		margin-top: 24px;
	}

	.profile-drawer__primary {
		margin-top: 24px;
	}

	.profile-edit__actions .profile-drawer__primary {
		margin-top: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.chat-stars,
	.chat-shell,
	.chat-empty-state__signal span {
		animation: none;
	}

	.profile-drawer,
	.profile-drawer__panel,
	.profile-drawer__close,
	.profile-drawer__primary,
	.profile-drawer__secondary,
	.chat-next-button::after {
		transition: none;
	}
}

@media screen and (max-width: 600px) {
	.chat-next-button::after {
		display: none;
	}
}
