#adm-wa-root {
	--adm-wa-bg-page:         #0b0f1c;
	--adm-wa-bg-widget:       #0f1524;
	--adm-wa-bg-header:       #080c16;
	--adm-wa-bg-surface:      #151d2e;
	--adm-wa-bg-surface-alt:  #1a2237;
	--adm-wa-bg-input:        #0e1422;
	--adm-wa-border:          rgba(255, 255, 255, 0.08);
	--adm-wa-border-hover:    rgba(37, 211, 102, 0.5);
	--adm-wa-text:            #f0f2f5;
	--adm-wa-text-soft:       #b8c0cc;
	--adm-wa-text-muted:      #6b7a96;
	--adm-wa-accent:          #25d366;
	--adm-wa-accent-dark:     #1db954;
	--adm-wa-accent-glow:     rgba(37, 211, 102, 0.18);
	--adm-wa-shadow:          0 20px 64px rgba(0, 0, 0, 0.55), 0 4px 16px rgba(0, 0, 0, 0.3);
	--adm-wa-radius-xl:       20px;
	--adm-wa-radius-lg:       14px;
	--adm-wa-radius-md:       10px;
	--adm-wa-radius-sm:       8px;
	--adm-wa-speed:           0.2s;
	font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
	color: var(--adm-wa-text);
}

#adm-wa-root,
#adm-wa-root * {
	box-sizing: border-box;
}

/* ---- Overlay ---- */

.adm-wa-overlay {
	position: fixed;
	inset: 0;
	z-index: 99997;
	background: rgba(0, 0, 0, 0.45);
	opacity: 0;
	pointer-events: none;
	transition: opacity var(--adm-wa-speed) ease;
}

.adm-wa-overlay--visible {
	opacity: 1;
	pointer-events: auto;
}

/* ---- Trigger ---- */

.adm-wa-trigger {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 99998;
	width: 58px;
	height: 58px;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 0;
	background: transparent;
	cursor: pointer;
	transition: transform var(--adm-wa-speed) ease;
}

.adm-wa-trigger svg {
	width: 58px;
	height: 58px;
	display: block;
	filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.22));
}

.adm-wa-trigger:hover,
.adm-wa-trigger:focus-visible {
	transform: scale(1.1);
}

.adm-wa-trigger:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
	border-radius: 4px;
}

.adm-wa-trigger.adm-wa-trigger--open {
	transform: scale(0.94);
}

/* ---- Widget shell ---- */

.adm-wa-widget {
	position: fixed;
	right: 24px;
	bottom: 96px;
	z-index: 99999;
	width: min(420px, calc(100vw - 48px));
	max-height: min(88vh, 740px);
	display: flex;
	flex-direction: column;
	border: 1px solid var(--adm-wa-border);
	border-radius: var(--adm-wa-radius-xl);
	background: var(--adm-wa-bg-widget);
	box-shadow: var(--adm-wa-shadow);
	overflow: hidden;
	opacity: 0;
	transform: translateY(16px) scale(0.97);
	pointer-events: none;
	transition: opacity 0.24s ease, transform 0.24s ease;
}

.adm-wa-widget--open {
	opacity: 1;
	transform: translateY(0) scale(1);
	pointer-events: auto;
}

/* ---- Header ---- */

.adm-wa-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px;
	background: var(--adm-wa-bg-header);
	border-bottom: 1px solid var(--adm-wa-border);
	flex-shrink: 0;
}

.adm-wa-header-brand {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
	flex: 1;
}

.adm-wa-header-logo {
	width: 46px;
	height: 46px;
	padding: 5px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: var(--adm-wa-radius-sm);
	background: rgba(255, 255, 255, 0.04);
	object-fit: contain;
	flex-shrink: 0;
}

.adm-wa-header-info {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.adm-wa-header-name {
	font-size: 13.5px;
	font-weight: 700;
	letter-spacing: 0.03em;
	line-height: 1.2;
	color: var(--adm-wa-text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.adm-wa-header-subtitle {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 11.5px;
	line-height: 1.2;
	color: var(--adm-wa-text-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.adm-wa-header-subtitle::before {
	content: '';
	display: inline-block;
	flex-shrink: 0;
	width: 7px;
	height: 7px;
	background: var(--adm-wa-accent);
	border-radius: 50%;
	box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.3);
}

.adm-wa-close {
	width: 34px;
	height: 34px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--adm-wa-border);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.04);
	color: var(--adm-wa-text-muted);
	cursor: pointer;
	transition: background var(--adm-wa-speed) ease, border-color var(--adm-wa-speed) ease, color var(--adm-wa-speed) ease;
	flex-shrink: 0;
}

.adm-wa-close:hover,
.adm-wa-close:focus-visible {
	background: rgba(255, 255, 255, 0.1);
	border-color: rgba(255, 255, 255, 0.2);
	color: var(--adm-wa-text);
}

.adm-wa-close:focus-visible {
	outline: 2px solid rgba(255, 255, 255, 0.6);
	outline-offset: 2px;
}

/* ---- Stages ---- */

.adm-wa-stages-wrap {
	position: relative;
	flex: 1 1 auto;
	min-height: 360px;
	height: clamp(360px, 60vh, 560px);
	overflow: hidden;
}

.adm-wa-stage {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	transition: transform 0.24s ease, opacity 0.24s ease;
}

.adm-wa-stage--1 { transform: translateX(0);    opacity: 1; }
.adm-wa-stage--2 { transform: translateX(100%); opacity: 0; }

.adm-wa-stages-wrap.adm-wa--step2 .adm-wa-stage--1 { transform: translateX(-100%); opacity: 0; }
.adm-wa-stages-wrap.adm-wa--step2 .adm-wa-stage--2 { transform: translateX(0);     opacity: 1; }

/* ---- Body ---- */

.adm-wa-body {
	height: 100%;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	background: var(--adm-wa-bg-page);
	overflow-y: auto;
	overflow-x: hidden;
	scrollbar-width: thin;
	scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.adm-wa-body,
.adm-wa-body * {
	min-width: 0;
}

/* ---- Bubble ---- */

.adm-wa-bubble-wrap {
	padding-left: 4px;
}

.adm-wa-bubble {
	position: relative;
	padding: 12px 14px;
	border: 1px solid var(--adm-wa-border);
	border-radius: 4px var(--adm-wa-radius-lg) var(--adm-wa-radius-lg) var(--adm-wa-radius-lg);
	background: var(--adm-wa-bg-surface);
	color: var(--adm-wa-text-soft);
	font-size: 13.5px;
	line-height: 1.5;
	overflow-wrap: anywhere;
}

.adm-wa-bubble::before {
	content: "";
	position: absolute;
	top: 0;
	left: -1px;
	width: 0;
	height: 0;
	border-top: 10px solid var(--adm-wa-border);
	border-left: 10px solid transparent;
	transform: translateX(-9px);
}

.adm-wa-bubble::after {
	content: "";
	position: absolute;
	top: 1px;
	left: -1px;
	width: 0;
	height: 0;
	border-top: 9px solid var(--adm-wa-bg-surface);
	border-left: 9px solid transparent;
	transform: translateX(-8px);
}

/* ---- Labels ---- */

.adm-wa-select-label,
.adm-wa-preview-title,
.adm-wa-label {
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--adm-wa-text-muted);
	line-height: 1.2;
}

/* ---- Services grid ---- */

.adm-wa-services-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 8px;
}

.adm-wa-service-btn {
	width: 100%;
	min-height: 58px;
	padding: 12px 13px;
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 10px;
	border: 1px solid var(--adm-wa-border);
	border-radius: var(--adm-wa-radius-md);
	background: var(--adm-wa-bg-surface);
	text-align: left;
	cursor: pointer;
	transition:
		background     var(--adm-wa-speed) ease,
		border-color   var(--adm-wa-speed) ease,
		box-shadow     var(--adm-wa-speed) ease,
		transform      var(--adm-wa-speed) ease;
}

.adm-wa-service-btn:hover,
.adm-wa-service-btn:focus-visible {
	background: var(--adm-wa-bg-surface-alt);
	border-color: var(--adm-wa-border-hover);
	box-shadow: 0 0 0 1px rgba(37, 211, 102, 0.2), inset 0 1px 0 rgba(37, 211, 102, 0.08);
	transform: translateY(-1px);
}

.adm-wa-service-btn:focus-visible {
	outline: 2px solid var(--adm-wa-accent);
	outline-offset: 2px;
}

.adm-wa-service-btn:active {
	transform: translateY(0);
}

.adm-wa-service-emoji {
	font-size: 18px;
	line-height: 1;
	flex-shrink: 0;
}

.adm-wa-service-label {
	flex: 1;
	min-width: 0;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--adm-wa-text-soft);
	white-space: normal;
	overflow-wrap: anywhere;
	word-break: break-word;
}

/* ---- Badge ---- */

.adm-wa-badge-wrap {
	display: flex;
}

.adm-wa-badge {
	display: inline-flex;
	align-items: center;
	max-width: 100%;
	padding: 6px 12px;
	border: 1px solid rgba(37, 211, 102, 0.3);
	border-radius: 999px;
	background: rgba(37, 211, 102, 0.1);
	color: #6ee7a4;
	font-size: 11.5px;
	font-weight: 700;
	line-height: 1.25;
	white-space: normal;
	overflow-wrap: anywhere;
}

/* ---- Form ---- */

.adm-wa-form {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.adm-wa-form-row {
	display: grid;
	gap: 8px;
}

.adm-wa-form-row--two {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.adm-wa-form-row--three {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.adm-wa-field {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.adm-wa-input {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--adm-wa-border);
	border-radius: var(--adm-wa-radius-sm);
	background: var(--adm-wa-bg-input);
	color: var(--adm-wa-text);
	font-family: inherit;
	font-size: 13.5px;
	line-height: 1.3;
	transition: border-color var(--adm-wa-speed) ease, box-shadow var(--adm-wa-speed) ease;
	-moz-appearance: textfield;
}

.adm-wa-input::-webkit-outer-spin-button,
.adm-wa-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.adm-wa-input::placeholder {
	color: var(--adm-wa-text-muted);
}

.adm-wa-input:focus {
	outline: none;
	border-color: var(--adm-wa-accent);
	box-shadow: 0 0 0 3px var(--adm-wa-accent-glow);
}

/* ---- Preview ---- */

.adm-wa-preview-wrap {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.adm-wa-preview {
	min-height: 90px;
	padding: 11px 13px;
	border: 1px solid var(--adm-wa-border);
	border-radius: var(--adm-wa-radius-md);
	background: var(--adm-wa-bg-surface);
	color: var(--adm-wa-text-soft);
	font-size: 12.5px;
	line-height: 1.55;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
	word-break: break-word;
}

/* ---- Actions ---- */

.adm-wa-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: auto;
	padding-top: 2px;
}

.adm-wa-btn {
	min-height: 44px;
	padding: 10px 16px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 0;
	border: 2px solid transparent;
	font-family: "Unbounded", "Segoe UI", sans-serif;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0.02em;
	text-decoration: none;
	cursor: pointer;
	white-space: nowrap;
	transition:
		background     var(--adm-wa-speed) ease,
		border-color   var(--adm-wa-speed) ease,
		color          var(--adm-wa-speed) ease,
		box-shadow     var(--adm-wa-speed) ease,
		transform      var(--adm-wa-speed) ease,
		opacity        var(--adm-wa-speed) ease;
}

.adm-wa-btn--ghost {
	flex-shrink: 0;
	background: transparent;
	border-color: rgba(255, 255, 255, 0.2);
	color: var(--adm-wa-text-soft);
}

.adm-wa-btn--ghost:hover,
.adm-wa-btn--ghost:focus-visible {
	background: var(--adm-wa-bg-surface-alt);
	border-color: rgba(255, 255, 255, 0.35);
	color: var(--adm-wa-text);
}

.adm-wa-btn--send {
	flex: 1;
	background: var(--adm-wa-accent);
	color: #ffffff;
	border-color: var(--adm-wa-accent);
	box-shadow: 0 4px 16px rgba(37, 211, 102, 0.32);
}

.adm-wa-btn--send:hover:not([aria-disabled="true"]),
.adm-wa-btn--send:focus-visible:not([aria-disabled="true"]) {
	background: var(--adm-wa-accent-dark);
	border-color: var(--adm-wa-accent-dark);
	transform: translateY(-1px);
	box-shadow: 0 8px 24px rgba(37, 211, 102, 0.42);
}

.adm-wa-btn--send:active:not([aria-disabled="true"]) {
	transform: translateY(0);
}

.adm-wa-btn--send[aria-disabled="true"] {
	opacity: 0.45;
	cursor: not-allowed;
	pointer-events: none;
	box-shadow: none;
}

/* ---- Responsive ---- */

@media (max-width: 980px) {
	.adm-wa-trigger {
		right: 16px;
		bottom: 16px;
	}

	.adm-wa-widget {
		right: 16px;
		bottom: 86px;
		width: min(420px, calc(100vw - 32px));
	}
}

@media (max-width: 820px) {
	.adm-wa-widget {
		right: 12px;
		bottom: 82px;
		width: calc(100vw - 24px);
		max-height: calc(100dvh - 96px);
	}

	.adm-wa-stages-wrap {
		min-height: 340px;
		height: min(70dvh, 540px);
	}

	.adm-wa-form-row--three {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.adm-wa-form-row--three .adm-wa-field:last-child {
		grid-column: 1 / -1;
	}
}

@media (max-width: 640px) {
	.adm-wa-widget {
		right: 0;
		left: 0;
		bottom: 0;
		width: 100%;
		max-width: 100%;
		max-height: min(88dvh, 740px);
		border-radius: 20px 20px 0 0;
	}

	.adm-wa-header {
		padding: 12px 14px;
	}

	.adm-wa-body {
		padding: 14px;
		gap: 12px;
	}

	.adm-wa-services-grid {
		grid-template-columns: 1fr;
	}

	.adm-wa-form-row--two,
	.adm-wa-form-row--three {
		grid-template-columns: 1fr;
	}

	.adm-wa-service-btn {
		min-height: 52px;
	}

	.adm-wa-actions {
		flex-direction: column-reverse;
		align-items: stretch;
	}

	.adm-wa-btn--ghost,
	.adm-wa-btn--send {
		width: 100%;
	}
}

@media (max-width: 420px) {
	.adm-wa-trigger {
		right: 12px;
		bottom: 12px;
		width: 52px;
		height: 52px;
		padding: 0;
	}

	.adm-wa-trigger svg {
		width: 52px;
		height: 52px;
	}

	.adm-wa-header-logo {
		width: 40px;
		height: 40px;
	}

	.adm-wa-header-name {
		font-size: 13px;
	}

	.adm-wa-service-label {
		font-size: 11.5px;
	}

	.adm-wa-preview {
		font-size: 12px;
	}
}
