/* Estimate Calculator & Quote Builder — front end. */
.rgt-ec {
	--rgt-ec-accent: #1f2937;      /* slate-800 — neutral, professional */
	--rgt-ec-accent-2: #111827;    /* slate-900 */
	--rgt-ec-focus: rgba(31, 41, 55, .14);
	--rgt-ec-border: #e5e7eb;
	--rgt-ec-ink: #111827;
	--rgt-ec-muted: #6b7280;
	max-width: 620px;
	margin: 1.75em 0;
	color: var(--rgt-ec-ink);
}
.rgt-ec__form {
	border: 1px solid var(--rgt-ec-border);
	border-radius: 16px;
	padding: 8px 24px 22px;
	background: #fff;
	box-shadow: 0 6px 20px rgba(16, 24, 40, .05);
}

/* Fields */
.rgt-ec__field { padding: 16px 0; border-bottom: 1px solid #f3f4f6; }
.rgt-ec__field:last-of-type { border-bottom: 0; }
.rgt-ec__label { display: block; font-weight: 600; font-size: .95rem; margin: 0 0 8px; color: var(--rgt-ec-ink); }

.rgt-ec__input,
.rgt-ec__qty input,
.rgt-ec select.rgt-ec__input {
	font: inherit; width: 100%; box-sizing: border-box;
	padding: .7em .8em; border: 1.5px solid var(--rgt-ec-border);
	border-radius: 10px; background: #fff; color: var(--rgt-ec-ink);
	transition: border-color .15s, box-shadow .15s;
}
.rgt-ec__input:focus,
.rgt-ec__qty input:focus {
	outline: 0; border-color: var(--rgt-ec-accent);
	box-shadow: 0 0 0 3px var(--rgt-ec-focus);
}

/* Select — custom chevron */
.rgt-ec select.rgt-ec__input {
	appearance: none; -webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right .8em center; padding-right: 2.4em;
}

/* Radio — pill buttons */
.rgt-ec__field--radio .rgt-ec__label { margin-bottom: 10px; }
.rgt-ec__radio {
	display: inline-flex; align-items: center; margin: 0 8px 8px 0;
	padding: .55em 1em; border: 1.5px solid var(--rgt-ec-border); border-radius: 999px;
	cursor: pointer; font-size: .92rem; transition: all .15s; background: #fff;
}
.rgt-ec__radio input { position: absolute; opacity: 0; width: 0; height: 0; }
.rgt-ec__radio:hover { border-color: #cbd5e1; }
.rgt-ec__radio:has(input:checked) {
	border-color: var(--rgt-ec-accent); background: #f3f4f6;
	color: var(--rgt-ec-accent); font-weight: 600;
}

/* Toggle — real switch, label left / switch right */
.rgt-ec__field--toggle { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.rgt-ec__field--toggle .rgt-ec__label { margin: 0; }
.rgt-ec__toggle { position: relative; display: inline-block; width: 46px; height: 26px; flex: 0 0 auto; cursor: pointer; }
.rgt-ec__toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.rgt-ec__toggle-track { position: absolute; inset: 0; background: #d1d5db; border-radius: 999px; transition: background .2s; }
.rgt-ec__toggle-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s; }
.rgt-ec__toggle input:checked + .rgt-ec__toggle-track { background: var(--rgt-ec-accent); }
.rgt-ec__toggle input:checked + .rgt-ec__toggle-track::after { transform: translateX(20px); }

/* Quantity stepper — one seamless segmented control */
.rgt-ec__qty {
	display: inline-flex; align-items: stretch; width: 160px;
	border: 1.5px solid var(--rgt-ec-border); border-radius: 10px; overflow: hidden; background: #fff;
	transition: border-color .15s, box-shadow .15s;
}
.rgt-ec__qty:focus-within { border-color: var(--rgt-ec-accent); box-shadow: 0 0 0 3px var(--rgt-ec-focus); }
.rgt-ec__qty input {
	flex: 1 1 auto; width: 100%; min-width: 0; text-align: center; font-weight: 600;
	border: 0 !important; border-radius: 0; padding: .6em 4px; background: transparent; box-shadow: none !important;
	-moz-appearance: textfield; appearance: textfield;
}
.rgt-ec__qty input::-webkit-outer-spin-button,
.rgt-ec__qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.rgt-ec__qty-btn {
	flex: 0 0 44px; font: inherit; font-size: 1.3rem; line-height: 1; cursor: pointer;
	border: 0; background: #f9fafb; color: var(--rgt-ec-muted); user-select: none;
}
.rgt-ec__qty-btn:hover { background: #f3f4f6; color: var(--rgt-ec-ink); }
.rgt-ec__qty-btn:first-child { border-right: 1.5px solid var(--rgt-ec-border); }
.rgt-ec__qty-btn:last-child { border-left: 1.5px solid var(--rgt-ec-border); }

/* Slider */
input[type="range"].rgt-ec__input {
	width: calc(100% - 3.2em); vertical-align: middle; padding: 0; border: 0; box-shadow: none;
	appearance: none; -webkit-appearance: none; height: 6px; border-radius: 999px; background: #e5e7eb;
}
input[type="range"].rgt-ec__input:focus { box-shadow: none; }
input[type="range"].rgt-ec__input::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--rgt-ec-accent); cursor: pointer; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
input[type="range"].rgt-ec__input::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--rgt-ec-accent); cursor: pointer; border: 3px solid #fff; }
.rgt-ec__slider-val { display: inline-block; min-width: 2.6em; text-align: right; font-weight: 700; color: var(--rgt-ec-ink); }

/* Result — understated neutral panel with a strong value */
.rgt-ec__result {
	display: flex; justify-content: space-between; align-items: center;
	margin: 20px 0 4px; padding: 18px 22px; border-radius: 12px;
	background: #f8fafc; border: 1px solid var(--rgt-ec-border); border-left: 4px solid var(--rgt-ec-accent);
	color: var(--rgt-ec-ink);
}
.rgt-ec__result-label { font-weight: 600; font-size: 1rem; color: var(--rgt-ec-muted); }
.rgt-ec__result-value { font-size: 1.85rem; font-weight: 800; letter-spacing: -.5px; color: var(--rgt-ec-ink); }

/* Lead capture */
.rgt-ec__lead { margin-top: 20px; padding-top: 20px; border-top: 1px dashed var(--rgt-ec-border); }
.rgt-ec__lead-intro { margin: 0 0 12px; font-size: .98rem; color: var(--rgt-ec-muted); }
.rgt-ec__lead input { font: inherit; width: 100%; box-sizing: border-box; padding: .75em .85em; margin-bottom: 10px; border: 1.5px solid var(--rgt-ec-border); border-radius: 10px; transition: border-color .15s, box-shadow .15s; }
.rgt-ec__lead input:focus { outline: 0; border-color: var(--rgt-ec-accent); box-shadow: 0 0 0 3px var(--rgt-ec-focus); }
.rgt-ec__hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.rgt-ec__submit {
	font: inherit; font-weight: 700; font-size: 1rem; cursor: pointer; width: 100%;
	padding: .85em 1em; border: 0; border-radius: 10px; margin-top: 4px; color: #fff;
	background: var(--rgt-ec-accent); transition: background .15s;
}
.rgt-ec__submit:hover { background: var(--rgt-ec-accent-2); }
.rgt-ec__submit:disabled { opacity: .55; cursor: default; }
.rgt-ec__msg { margin: .6em 0 0; font-size: .92rem; }
.rgt-ec__msg--ok { color: #0f766e; font-weight: 700; text-align: center; font-size: 1.05rem; padding: 8px 0; }
