/* Device Pricer (ecoATM-style) — front-end styles
   Palette pulled from the reference screenshot: warm cream surfaces,
   deep teal headings/text, soft pill shapes, muted grey-green icon lines. */

.esp-wrap {
	--esp-bg: #ffffff;
	--esp-cream: #efece4;
	--esp-cream-soft: #f4f2ec;
	--esp-border: #e3ded3;
	--esp-teal: #1f3a3a;
	--esp-text-muted: #8a8a82;
	--esp-icon: #6f6c64;
	--esp-disabled-icon: #b9b6ac;
	--esp-cta: #e85100;
	--esp-cta-hover: #cf4900;
	--esp-cta-text: #ffffff;
	--esp-radius: 16px;
	--esp-radius-pill: 999px;

	max-width: 460px;
	margin: 0 auto;
	padding: 32px 20px 48px;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	color: var( --esp-teal );
	box-sizing: border-box;
}

.esp-wrap * {
	box-sizing: border-box;
}

.esp-title {
	text-align: center;
	font-size: 32px;
	font-weight: 500;
	letter-spacing: 0.2px;
	color: var( --esp-teal );
	margin: 0 0 28px;
}

.esp-visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect( 0 0 0 0 );
	white-space: nowrap;
}

/* ---- Fields shared shell ---- */

.esp-field {
	margin-bottom: 14px;
	position: relative;
}

.esp-input-shell {
	position: relative;
	display: flex;
	align-items: center;
}

.esp-combo-input {
	width: 100%;
	background: var( --esp-cream );
	border: 1px solid var( --esp-border );
	border-radius: var( --esp-radius-pill );
	padding: 18px 46px 18px 20px;
	font-size: 17px;
	color: var( --esp-teal );
	outline: none;
	transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.esp-combo-input::placeholder {
	color: #9a978d;
}

.esp-combo-input:focus {
	border-color: #b7d9d3;
	box-shadow: 0 0 0 3px rgba( 31, 58, 58, 0.08 );
}

.esp-icon {
	position: absolute;
	right: 18px;
	width: 18px;
	height: 18px;
	color: var( --esp-icon );
	pointer-events: none;
	display: inline-flex;
}

.esp-icon svg {
	width: 100%;
	height: 100%;
}

.esp-is-disabled .esp-combo-input,
.esp-is-disabled select {
	background: var( --esp-cream-soft );
	color: #b3b0a6;
	cursor: not-allowed;
}

.esp-is-disabled .esp-icon {
	color: var( --esp-disabled-icon );
}

/* ---- Combobox dropdown list ---- */

.esp-combo-list {
	position: absolute;
	z-index: 20;
	left: 0;
	right: 0;
	top: calc( 100% + 6px );
	margin: 0;
	padding: 6px;
	list-style: none;
	background: #fff;
	border: 1px solid var( --esp-border );
	border-radius: 14px;
	max-height: 280px;
	overflow-y: auto;
	box-shadow: 0 10px 30px rgba( 0, 0, 0, 0.08 );
}

.esp-combo-group-label {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var( --esp-text-muted );
	padding: 10px 12px 4px;
}

.esp-combo-option {
	padding: 10px 12px;
	border-radius: 8px;
	cursor: pointer;
	font-size: 15px;
}

.esp-combo-option:hover,
.esp-combo-option:focus {
	background: var( --esp-cream-soft );
	outline: none;
}

.esp-combo-empty {
	padding: 14px 12px;
	color: var( --esp-text-muted );
	font-size: 14px;
}

/* ---- Storage / Carrier row ---- */

.esp-row-2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
	margin-bottom: 22px;
}

.esp-select select {
	width: 100%;
	appearance: none;
	background: var( --esp-cream );
	border: 1px solid var( --esp-border );
	border-radius: var( --esp-radius-pill );
	padding: 16px 40px 16px 18px;
	font-size: 16px;
	color: var( --esp-teal );
	outline: none;
}

/* ---- Condition fieldsets ---- */

.esp-condition {
	border: 0;
	padding: 0;
	margin: 0 0 26px;
}

.esp-condition legend {
	padding: 0 0 10px;
	font-size: 16px;
	color: var( --esp-text-muted );
	font-weight: 500;
}

.esp-toggle-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

.esp-toggle-card {
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 14px;
	padding: 22px 10px;
	background: var( --esp-cream-soft );
	border: 1px solid var( --esp-border );
	border-radius: var( --esp-radius );
	cursor: pointer;
	font-size: 17px;
	font-weight: 500;
	color: #8d8a81;
	text-align: center;
	transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.esp-toggle-card:hover {
	background: #efebe1;
}

.esp-toggle-card.is-active {
	border-color: #1f3a3a;
	background: #ffffff;
	box-shadow: 0 0 0 1px #1f3a3a inset;
	color: var( --esp-teal );
}

.esp-toggle-icon {
	width: 28px;
	height: 48px;
	display: inline-flex !important;
	color: #a9a69c;
}

.esp-toggle-icon svg {
	width: 100%;
	height: 100%;
}

.esp-toggle-label {
	display: block !important;
	width: 100%;
	text-align: center;
}

.esp-toggle-card.is-active .esp-toggle-icon {
	color: #1f3a3a;
}

/* second condition's "No" icon is wider (two phone glyphs) */
.esp-condition[data-condition="screen_ok"] .esp-toggle-card[data-value="0"] .esp-toggle-icon {
	width: 40px;
}

/* ---- Submit button ---- */

.esp-submit-btn {
	display: block;
	width: 100%;
	padding: 19px 0;
	border: 0;
	border-radius: var( --esp-radius-pill );
	background: var( --esp-border );
	color: #9a978d;
	font-size: 18px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, transform 0.05s ease;
}

.esp-submit-btn.esp-is-ready {
	background: #000000;
	color: #ffffff;
	cursor: pointer;
}

.esp-submit-btn.esp-is-ready:hover {
	background: #222222;
}

.esp-submit-btn:disabled {
	cursor: not-allowed;
	opacity: 0.7;
}

.esp-submit-btn:not( :disabled ):active {
	transform: scale( 0.99 );
}

.esp-form-error {
	margin-top: 12px;
	color: #b3402f;
	font-size: 14px;
	text-align: center;
}

/* ---- Result panel ---- */

.esp-result {
	margin-top: 28px;
	padding-top: 22px;
	border-top: 1px solid var( --esp-border );
}

.esp-result-card {
	background: var( --esp-cream );
	border: 1px solid var( --esp-border );
	border-radius: var( --esp-radius );
	padding: 24px;
	text-align: center;
	margin-bottom: 18px;
}

.esp-result-eyebrow {
	margin: 0 0 6px;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var( --esp-text-muted );
}

.esp-result-price {
	margin: 0 0 6px;
	font-size: 30px;
	font-weight: 600;
	color: var( --esp-teal );
}

.esp-result-sub {
	margin: 0;
	font-size: 14px;
	color: var( --esp-text-muted );
}

.esp-phone-field label {
	display: block;
	font-size: 14px;
	color: var( --esp-text-muted );
	margin-bottom: 6px;
}

.esp-phone-field input[type="tel"] {
	width: 100%;
	background: var( --esp-cream-soft );
	border: 1px solid var( --esp-border );
	border-radius: var( --esp-radius-pill );
	padding: 16px 18px;
	font-size: 16px;
	color: var( --esp-teal );
	outline: none;
	margin-bottom: 16px;
}

.esp-phone-field input[type="tel"]:focus {
	border-color: #b7d9d3;
	box-shadow: 0 0 0 3px rgba( 31, 58, 58, 0.08 );
}

.esp-result-status {
	margin-top: 12px;
	text-align: center;
	font-size: 14px;
	color: var( --esp-teal );
	min-height: 1.2em;
}

.esp-result-message {
	margin: 0 0 16px;
	font-size: 26px;
	line-height: 1.3;
	font-weight: 600;
	color: var( --esp-teal );
}

.esp-result-contact {
	margin: 0;
	font-size: 16px;
	line-height: 1.8;
}

.esp-result-contact a {
	color: var( --esp-cta );
	text-decoration: none;
	font-weight: 600;
}

.esp-result-contact a:hover {
	text-decoration: underline;
}

@media ( max-width: 600px ) {
	.esp-toggle-card {
		flex-direction: column !important;
		align-items: center !important;
		text-align: center !important;
	}
}

@media ( max-width: 380px ) {
	.esp-title {
		font-size: 26px;
	}
	.esp-toggle-card {
		padding: 18px 8px;
	}
}
