.somch-widget,
.somch-modal {
	--somch-accent: #6f4cff;
	--somch-text: #182033;
	--somch-muted: #697386;
	--somch-border: #e6e9f0;
	--somch-surface: #ffffff;
	--somch-radius-lg: 20px;
	--somch-shadow: 0 18px 55px rgba(21, 31, 55, 0.18), 0 4px 14px rgba(21, 31, 55, 0.08);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.5;
	box-sizing: border-box;
}

.somch-widget *,
.somch-widget *::before,
.somch-widget *::after,
.somch-modal *,
.somch-modal *::before,
.somch-modal *::after {
	box-sizing: inherit;
}

.somch-widget {
	position: fixed;
	bottom: max(24px, env(safe-area-inset-bottom));
	z-index: 999970;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 14px;
	pointer-events: none;
}

.somch-widget--right {
	right: max(24px, env(safe-area-inset-right));
}

.somch-widget--left {
	left: max(24px, env(safe-area-inset-left));
	align-items: flex-start;
}

.somch-launcher,
.somch-options {
	pointer-events: auto;
}

.somch-launcher {
	appearance: none;
	border: 0;
	margin: 0;
	min-height: 58px;
	padding: 0 21px 0 16px;
	border-radius: 999px;
	background: var(--somch-accent);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 11px;
	font: inherit;
	font-weight: 750;
	letter-spacing: -0.01em;
	cursor: pointer;
	box-shadow: 0 12px 30px rgba(28, 36, 64, 0.25);
	transition: transform 180ms ease, filter 180ms ease, box-shadow 180ms ease;
	-webkit-tap-highlight-color: transparent;
}

.somch-launcher:hover {
	transform: translateY(-2px);
	filter: brightness(0.94);
	box-shadow: 0 16px 36px rgba(28, 36, 64, 0.3);
}

.somch-launcher:focus-visible,
.somch-option:focus-visible,
.somch-modal button:focus-visible,
.somch-form input:focus-visible,
.somch-form textarea:focus-visible {
	outline: 3px solid rgba(111, 76, 255, 0.25);
	outline-offset: 3px;
}

.somch-launcher__icon {
	width: 25px;
	height: 25px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
}

.somch-launcher__icon svg,
.somch-options svg,
.somch-modal svg {
	width: 100%;
	height: 100%;
	display: block;
}

.somch-launcher__icon--close {
	display: none;
}

.somch-widget.is-open .somch-launcher__icon--chat {
	display: none;
}

.somch-widget.is-open .somch-launcher__icon--close {
	display: inline-flex;
}

.somch-options {
	width: min(360px, calc(100vw - 32px));
	padding: 10px;
	border: 1px solid rgba(232, 235, 242, 0.95);
	border-radius: var(--somch-radius-lg);
	background: rgba(255, 255, 255, 0.98);
	box-shadow: var(--somch-shadow);
	opacity: 0;
	visibility: hidden;
	transform: translateY(12px) scale(0.97);
	transform-origin: bottom right;
	transition: opacity 170ms ease, visibility 170ms ease, transform 170ms ease;
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

.somch-widget--left .somch-options {
	transform-origin: bottom left;
}

.somch-widget.is-open .somch-options {
	opacity: 1;
	visibility: visible;
	transform: translateY(0) scale(1);
}

.somch-options__header {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 11px 15px;
	border-bottom: 1px solid var(--somch-border);
	margin-bottom: 6px;
}

.somch-options__icon {
	width: 42px;
	height: 42px;
	padding: 10px;
	border-radius: 13px;
	background: var(--somch-accent);
	color: #fff;
	box-shadow: 0 8px 18px rgba(28, 36, 64, 0.14);
	flex: 0 0 auto;
}

.somch-options__header span,
.somch-modal__heading > span {
	display: block;
	margin-bottom: 2px;
	color: var(--somch-accent);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.somch-options__header strong {
	display: block;
	color: var(--somch-text);
	font-size: 17px;
	line-height: 1.3;
}

.somch-option {
	width: 100%;
	min-height: 72px;
	padding: 11px 10px;
	border: 0;
	border-radius: 14px;
	background: transparent;
	color: var(--somch-text);
	display: grid;
	grid-template-columns: 42px minmax(0, 1fr) 18px;
	align-items: center;
	gap: 11px;
	text-decoration: none !important;
	text-align: left;
	font: inherit;
	cursor: pointer;
	transition: background-color 160ms ease, transform 160ms ease;
	-webkit-tap-highlight-color: transparent;
}

.somch-option:hover {
	background: #f6f7fa;
	transform: translateX(2px);
}

.somch-widget--left .somch-option:hover {
	transform: translateX(-2px);
}

.somch-option__icon {
	width: 42px;
	height: 42px;
	padding: 10px;
	border-radius: 13px;
	background: #f0edff;
	color: var(--somch-accent);
}

.somch-option--whatsapp .somch-option__icon {
	background: #e8f8ef;
	color: #168b50;
}

.somch-option strong,
.somch-option small {
	display: block;
}

.somch-option strong {
	font-size: 14px;
	font-weight: 750;
	line-height: 1.35;
}

.somch-option small {
	margin-top: 3px;
	color: var(--somch-muted);
	font-size: 12px;
	line-height: 1.35;
}

.somch-option__arrow {
	color: #9aa2b2;
	font-size: 26px;
	line-height: 1;
	text-align: center;
}

.somch-modal {
	position: fixed;
	inset: 0;
	z-index: 999980;
	display: grid;
	place-items: center;
	padding: 24px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 180ms ease, visibility 180ms ease;
}

.somch-modal.is-open {
	opacity: 1;
	visibility: visible;
}

.somch-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(10, 16, 29, 0.64);
	backdrop-filter: blur(5px);
	-webkit-backdrop-filter: blur(5px);
}

.somch-modal__dialog {
	position: relative;
	width: min(560px, 100%);
	max-height: min(760px, calc(100vh - 48px));
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 38px;
	border: 1px solid rgba(255, 255, 255, 0.7);
	border-radius: 24px;
	background: #fff;
	box-shadow: 0 28px 90px rgba(7, 13, 26, 0.34);
	transform: translateY(18px) scale(0.975);
	transition: transform 200ms ease;
	outline: none;
	-webkit-overflow-scrolling: touch;
}

.somch-modal.is-open .somch-modal__dialog {
	transform: translateY(0) scale(1);
}

.somch-modal__close {
	position: absolute;
	top: 17px;
	right: 17px;
	width: 40px;
	height: 40px;
	padding: 10px;
	border: 0;
	border-radius: 12px;
	background: #f1f3f7;
	color: #4f596c;
	cursor: pointer;
	transition: background-color 160ms ease, transform 160ms ease;
}

.somch-modal__close:hover {
	background: #e7eaf0;
	transform: rotate(4deg);
}

.somch-modal__brand {
	width: 52px;
	height: 52px;
	padding: 13px;
	border-radius: 16px;
	background: var(--somch-accent);
	color: #fff;
	box-shadow: 0 10px 24px rgba(28, 36, 64, 0.16);
}

.somch-modal__heading {
	margin: 18px 0 26px;
}

.somch-modal__heading h2 {
	margin: 4px 0 7px;
	color: var(--somch-text);
	font-size: clamp(25px, 4vw, 32px);
	line-height: 1.15;
	letter-spacing: -0.035em;
}

.somch-modal__heading p {
	margin: 0;
	color: var(--somch-muted);
	font-size: 14px;
	line-height: 1.6;
}

.somch-form {
	display: grid;
	gap: 18px;
}

.somch-form .somch-field label {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 7px;
	color: #30394b;
	font-size: 13px;
	font-weight: 700;
}

.somch-form .somch-field label > span {
	color: #d12f4d;
}

.somch-form .somch-field label small {
	color: #8991a0;
	font-size: 11px;
	font-weight: 600;
}

.somch-form input,
.somch-form textarea {
	appearance: none;
	width: 100%;
	min-height: 50px;
	margin: 0;
	padding: 12px 14px;
	border: 1px solid #dfe3ea;
	border-radius: 11px;
	background: #fff;
	color: var(--somch-text);
	font: inherit;
	font-size: 15px;
	line-height: 1.45;
	box-shadow: 0 1px 2px rgba(18, 28, 49, 0.03);
	transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.somch-form textarea {
	min-height: 118px;
	resize: vertical;
}

.somch-form input:hover,
.somch-form textarea:hover {
	border-color: #cbd1dc;
}

.somch-form input:focus,
.somch-form textarea:focus {
	border-color: var(--somch-accent);
	box-shadow: 0 0 0 4px rgba(111, 76, 255, 0.11);
	outline: none;
}

.somch-field.is-invalid input,
.somch-field.is-invalid textarea {
	border-color: #d63b59;
	background: #fffafb;
}

.somch-field__error {
	display: block;
	min-height: 0;
	margin-top: 6px;
	color: #c42544;
	font-size: 12px;
	font-weight: 650;
}

.somch-field__error:empty {
	display: none;
}

.somch-form__status {
	display: none;
	padding: 11px 13px;
	border-radius: 10px;
	font-size: 13px;
	line-height: 1.5;
}

.somch-form__status.is-error {
	display: block;
	border: 1px solid #f3c6cf;
	background: #fff3f5;
	color: #9d2139;
}

.somch-submit {
	appearance: none;
	width: 100%;
	min-height: 52px;
	padding: 13px 20px;
	border: 0;
	border-radius: 12px;
	background: var(--somch-accent);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	font: inherit;
	font-size: 15px;
	font-weight: 800;
	cursor: pointer;
	box-shadow: 0 10px 22px rgba(28, 36, 64, 0.16);
	transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

.somch-submit:hover:not(:disabled) {
	transform: translateY(-1px);
	filter: brightness(0.94);
	box-shadow: 0 13px 28px rgba(28, 36, 64, 0.2);
}

.somch-submit:disabled {
	cursor: wait;
	opacity: 0.78;
}

.somch-submit__spinner {
	display: none;
	width: 17px;
	height: 17px;
	border: 2px solid rgba(255, 255, 255, 0.4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: somch-spin 700ms linear infinite;
}

.somch-submit.is-loading .somch-submit__spinner {
	display: inline-block;
}

.somch-honeypot {
	position: absolute !important;
	left: -10000px !important;
	top: auto !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

.somch-success {
	padding: 34px 8px 14px;
	text-align: center;
}

.somch-success__icon {
	width: 76px;
	height: 76px;
	margin: 0 auto 20px;
	padding: 18px;
	border-radius: 50%;
	background: #eaf8ef;
	color: #159155;
	box-shadow: inset 0 0 0 1px #ccebd9;
}

.somch-success h3 {
	margin: 0 0 9px;
	color: var(--somch-text);
	font-size: 27px;
	line-height: 1.25;
	letter-spacing: -0.025em;
}

.somch-success p {
	max-width: 400px;
	margin: 0 auto 24px;
	color: var(--somch-muted);
	font-size: 15px;
	line-height: 1.65;
}

.somch-success__close {
	min-height: 46px;
	padding: 11px 22px;
	border: 0;
	border-radius: 11px;
	background: #eef1f5;
	color: #283247;
	font: inherit;
	font-weight: 750;
	cursor: pointer;
}

html.somch-modal-open,
html.somch-modal-open body {
	overflow: hidden !important;
}

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

@media (max-width: 600px) {
	.somch-widget {
		bottom: max(16px, env(safe-area-inset-bottom));
	}

	.somch-widget--right {
		right: max(14px, env(safe-area-inset-right));
	}

	.somch-widget--left {
		left: max(14px, env(safe-area-inset-left));
	}

	.somch-launcher {
		min-height: 54px;
		padding: 0 17px 0 14px;
	}

	.somch-options {
		width: min(348px, calc(100vw - 28px));
	}

	.somch-modal {
		align-items: end;
		padding: 0;
	}

	.somch-modal__dialog {
		width: 100%;
		max-height: calc(100dvh - 18px);
		padding: 28px 20px max(22px, env(safe-area-inset-bottom));
		border-radius: 24px 24px 0 0;
		transform: translateY(28px);
	}

	.somch-modal__close {
		top: 14px;
		right: 14px;
	}

	.somch-modal__brand {
		width: 48px;
		height: 48px;
	}

	.somch-modal__heading {
		margin-bottom: 22px;
	}
}

@media (max-width: 390px) {
	.somch-launcher__label {
		display: none;
	}

	.somch-launcher {
		width: 56px;
		padding: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.somch-widget *,
	.somch-modal * {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
