/*
 * Wrap Cost Calculator — theme v2
 *
 * Identity: a body-shop quote counter, not a generic web form.
 * Dark "garage" header band (charcoal, like a service-bay wall) holds
 * the title and the icon-led panel rail. A thin hazard-stripe accent
 * along the top nods to shop signage/warning tape without leaning on
 * cliché AI-orange-on-cream. Body stays light and legible — this is a
 * quote tool people need to read carefully, not a poster.
 *
 * Centering: the whole card is a centered block (margin: 0 auto) so it
 * sits mid-column wherever the shortcode is dropped, regardless of the
 * host theme's container width.
 */

.wcc-calculator-root {
	--wcc-ink: #14171a;
	--wcc-muted: #6b7280;
	--wcc-panel: #ffffff;
	--wcc-header-bg: #1b1e22;
	--wcc-header-bg-2: #24282e;
	--wcc-header-ink: #f4f5f7;
	--wcc-line: #e5e7eb;
	--wcc-accent: #ff5a1f;
	--wcc-accent-ink: #ffffff;
	--wcc-accent-soft: #fff1ea;
	--wcc-chrome-a: #eef0f3;
	--wcc-chrome-b: #9aa0aa;
	--wcc-warning-bg: #fff8ec;
	--wcc-warning-border: #e69a1f;
	--wcc-error-bg: #fdf0ef;
	--wcc-error-border: #d63638;
	--wcc-radius: 12px;

	max-width: 620px;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var( --wcc-ink );
	background: var( --wcc-panel );
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 1px 2px rgba( 16, 20, 24, 0.04 ), 0 12px 32px rgba( 16, 20, 24, 0.12 );
	border: 1px solid var( --wcc-line );
}

.wcc-calculator-root * {
	box-sizing: border-box;
}

/* Defensive reset: many WordPress themes apply their own `button { color:
   ...; background: ...; border: ...; font: ... }` rules globally. Because
   most of this widget's interactive controls are real <button> elements
   (for accessibility), those host-theme rules can silently override our
   colors — this is what was making swatch labels invisible. Neutralizing
   the classic offenders here, before our own component rules apply,
   fixes that regardless of which theme this is embedded in. */
.wcc-calculator-root button {
	background: none;
	border: 0;
	font: inherit;
	color: inherit;
	text-align: inherit;
	margin: 0;
}

/* ---------------------------------------------------------------
   HAZARD-STRIPE ACCENT + HEADER BAND
--------------------------------------------------------------- */

.wcc-hazard-strip {
	height: 5px;
	background: repeating-linear-gradient(
		-45deg,
		var( --wcc-accent ) 0,
		var( --wcc-accent ) 12px,
		#1b1e22 12px,
		#1b1e22 24px
	);
}

.wcc-header {
	background: linear-gradient( 155deg, var( --wcc-header-bg ), var( --wcc-header-bg-2 ) );
	color: var( --wcc-header-ink );
	padding: 22px 24px 20px;
}

.wcc-header-top {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 4px;
}

.wcc-header-icon {
	width: 26px;
	height: 26px;
	flex: none;
	color: var( --wcc-accent );
}

.wcc-header-title {
	font-size: 1.15rem;
	font-weight: 800;
	letter-spacing: -0.01em;
	margin: 0;
}

.wcc-header-subtitle {
	font-size: 0.85rem;
	color: #b7bcc4;
	margin: 2px 0 18px 36px;
}

/* ---------------------------------------------------------------
   PROGRESS RAIL — signature element, icon-led
--------------------------------------------------------------- */

.wcc-rail {
	display: flex;
	gap: 4px;
}

.wcc-calculator-root .wcc-rail-panel {
	flex: 1;
	position: relative;
	min-height: 52px;
	background: rgba( 255, 255, 255, 0.04 );
	border: 1px solid rgba( 255, 255, 255, 0.12 );
	clip-path: polygon( 14% 0, 100% 0, 86% 100%, 0 100% );
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	padding: 6px 2px;
	cursor: default; /* passive indicator only — not a nav control */
	transition: background 0.25s ease, border-color 0.25s ease;
}

.wcc-rail-panel:first-child {
	clip-path: polygon( 0 0, 100% 0, 86% 100%, 0 100% );
}

.wcc-rail-panel:last-child {
	clip-path: polygon( 14% 0, 100% 0, 100% 100%, 0 100% );
}

.wcc-rail-icon {
	width: 16px;
	height: 16px;
	color: #7b818b;
	transition: color 0.25s ease;
}

.wcc-rail-panel.is-complete {
	background: linear-gradient( 135deg, var( --wcc-chrome-a ), var( --wcc-chrome-b ) );
	border-color: var( --wcc-chrome-b );
}

.wcc-rail-panel.is-complete .wcc-rail-icon {
	color: #24272c;
}

.wcc-rail-panel.is-current {
	background: rgba( 255, 90, 31, 0.14 );
	border-color: var( --wcc-accent );
}

.wcc-rail-panel.is-current .wcc-rail-icon {
	color: var( --wcc-accent );
}

.wcc-rail-label {
	font-size: 0.62rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #9aa0aa;
}

.wcc-rail-panel.is-complete .wcc-rail-label {
	color: #24272c;
}

.wcc-rail-panel.is-current .wcc-rail-label {
	color: var( --wcc-accent );
}

.wcc-rail-current-label {
	margin: 8px 2px 0;
	font-size: 0.78rem;
	color: #9aa0aa;
}

.wcc-rail-current-label strong {
	color: var( --wcc-accent );
	font-weight: 800;
}

/* ---------------------------------------------------------------
   BODY
--------------------------------------------------------------- */

.wcc-body {
	padding: 22px 24px 26px;
}

.wcc-form {
	display: block;
}

/* ---------------------------------------------------------------
   STEP CARDS
--------------------------------------------------------------- */

.wcc-field {
	background: #fafbfc;
	border: 1px solid var( --wcc-line );
	border-radius: var( --wcc-radius );
	padding: 16px 18px;
	margin-bottom: 14px;
	box-shadow: 0 1px 2px rgba( 20, 23, 26, 0.03 );
	transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.wcc-field:focus-within {
	border-color: var( --wcc-accent );
	box-shadow: 0 0 0 3px var( --wcc-accent-soft );
}

.wcc-field legend {
	font-weight: 800;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 0 4px;
	color: var( --wcc-ink );
	display: flex;
	align-items: center;
	gap: 6px;
}

.wcc-field legend svg {
	width: 15px;
	height: 15px;
	color: var( --wcc-accent );
}

.wcc-radio {
	display: block;
	margin: 8px 0;
	cursor: pointer;
	font-size: 0.94rem;
}

.wcc-radio input {
	margin-right: 8px;
	accent-color: var( --wcc-accent );
}

select.wcc-vehicle-select,
select.wcc-class-select {
	width: 100%;
	max-width: 360px;
	padding: 11px 40px 11px 12px;
	border: 1px solid var( --wcc-line );
	border-radius: 8px;
	font-size: 1rem;
	background-color: var( --wcc-panel );
	color: var( --wcc-ink );
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	/* Explicit custom arrow: some themes reset native select styling
	   (appearance:none) globally without supplying their own arrow for
	   classes they don't target, which left this dropdown with no arrow
	   at all. Forcing our own here guarantees one shows regardless. */
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6270' stroke-width='2' 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 12px center;
	background-size: 16px 16px;
}

input.wcc-coverage-custom {
	width: 100%;
	max-width: 360px;
	padding: 11px 12px;
	border: 1px solid var( --wcc-line );
	border-radius: 8px;
	font-size: 1rem;
	background: var( --wcc-panel );
	color: var( --wcc-ink );
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

select.wcc-vehicle-select:hover,
select.wcc-class-select:hover {
	border-color: var( --wcc-accent );
}

.wcc-calculator-root .wcc-link-btn {
	background: none;
	border: none;
	color: var( --wcc-accent );
	text-decoration: underline;
	cursor: pointer;
	padding: 10px 0 6px;
	font-size: 0.87rem;
	display: block;
	font-weight: 600;
}

.wcc-link-btn:focus-visible,
select:focus-visible,
input:focus-visible,
button:focus-visible,
.wcc-chip:focus-visible {
	outline: 2px solid var( --wcc-accent );
	outline-offset: 2px;
}

.wcc-disclosure {
	font-size: 0.82rem;
	color: var( --wcc-muted );
	margin-top: 10px;
	line-height: 1.5;
}

/* ---------------------------------------------------------------
   CHIP BUTTONS
--------------------------------------------------------------- */

.wcc-chip-row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 12px;
}

.wcc-calculator-root .wcc-chip {
	border: 1px solid var( --wcc-line );
	background: var( --wcc-panel );
	color: var( --wcc-ink );
	padding: 9px 15px;
	border-radius: 999px;
	font-size: 0.87rem;
	font-weight: 700;
	cursor: pointer;
	transition: transform 0.12s ease, border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.wcc-chip:hover {
	border-color: var( --wcc-accent );
	background: var( --wcc-accent-soft );
	transform: translateY( -1px );
}

.wcc-chip.is-selected {
	background: var( --wcc-accent );
	border-color: var( --wcc-accent );
	color: var( --wcc-accent-ink );
}

.wcc-gauge-track {
	height: 10px;
	background: var( --wcc-line );
	border-radius: 999px;
	overflow: hidden;
	margin-top: 6px;
}

.wcc-gauge-fill {
	height: 100%;
	background: linear-gradient( 90deg, var( --wcc-accent ), #ff8a4c );
	border-radius: 999px;
	transition: width 0.25s ease;
	width: 100%;
}

.wcc-gauge-label {
	font-size: 0.8rem;
	color: var( --wcc-muted );
	margin-top: 8px;
	font-weight: 600;
}

/* ---------------------------------------------------------------
   MATERIAL / FINISH SWATCHES
--------------------------------------------------------------- */

.wcc-swatch-grid {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 128px, 1fr ) );
	gap: 10px;
}

.wcc-calculator-root .wcc-swatch-chip {
	display: block;
	width: 100%;
	border: 2px solid var( --wcc-line );
	border-radius: 10px;
	padding: 9px;
	cursor: pointer;
	text-align: left;
	background: var( --wcc-panel );
	color: var( --wcc-ink );
	transition: border-color 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.wcc-swatch-chip:hover {
	transform: translateY( -2px );
	border-color: var( --wcc-accent );
	background: var( --wcc-accent-soft );
	box-shadow: 0 6px 14px rgba( 20, 23, 26, 0.1 );
}

.wcc-swatch-chip.is-selected {
	border-color: var( --wcc-accent );
	box-shadow: 0 0 0 1px var( --wcc-accent ), 0 6px 14px rgba( 255, 90, 31, 0.18 );
	position: relative;
}

.wcc-swatch-chip.is-selected::after {
	content: "";
	position: absolute;
	top: 7px;
	right: 7px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var( --wcc-accent );
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5l5 5L20 6.5'/%3E%3C/svg%3E");
	background-size: 10px 10px;
	background-repeat: no-repeat;
	background-position: center;
	box-shadow: 0 0 0 2px var( --wcc-panel );
}

.wcc-swatch-preview {
	display: block; /* was missing — a <span> with a fixed height does
	                   nothing until it's block-level, which is why the
	                   finish swatches were rendering as empty boxes. */
	height: 38px;
	border-radius: 6px;
	margin-bottom: 7px;
	position: relative;
	overflow: hidden;
	box-shadow: inset 0 0 0 1px rgba( 0, 0, 0, 0.06 );
}

.wcc-swatch-name {
	font-size: 0.76rem;
	font-weight: 700;
	line-height: 1.3;
	display: block;
	color: var( --wcc-ink ); /* explicit — do not rely on inherited button color */
}

.wcc-swatch-quote-tag {
	display: inline-block;
	margin-top: 4px;
	font-size: 0.66rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var( --wcc-warning-border );
}

.wcc-swatch-gloss { background: linear-gradient( 135deg, #2c2f36, #4c515c 45%, #b9bec7 55%, #2c2f36 ); }
.wcc-swatch-satin { background: linear-gradient( 135deg, #3a3f47, #6a6f78 ); }
.wcc-swatch-matte { background: #4a4d52; }
.wcc-swatch-chrome { background: linear-gradient( 100deg, #e4e7eb, #9aa0aa 30%, #f5f6f8 50%, #7d838d 70%, #e4e7eb ); }
.wcc-swatch-carbon {
	background-color: #1c1e21;
	background-image: repeating-linear-gradient( 45deg, #2a2d31 0, #2a2d31 4px, #1c1e21 4px, #1c1e21 8px );
}
.wcc-swatch-colorshift { background: linear-gradient( 100deg, #6a5acd, #20b2aa, #ff6f91 ); }
.wcc-swatch-brushed {
	background-color: #b7bcc4;
	background-image: repeating-linear-gradient( 90deg, rgba(255,255,255,0.4) 0, rgba(255,255,255,0.4) 1px, transparent 1px, transparent 3px );
}
.wcc-swatch-default { background: linear-gradient( 135deg, #d5d8dd, #9aa0aa ); }

/* ---------------------------------------------------------------
   SUBMIT
--------------------------------------------------------------- */

.wcc-calculator-root .wcc-submit {
	background: var( --wcc-accent );
	color: var( --wcc-accent-ink );
	border: none;
	border-radius: 10px;
	padding: 15px 22px;
	font-size: 1.02rem;
	font-weight: 800;
	letter-spacing: 0.01em;
	cursor: pointer;
	width: 100%;
	transition: transform 0.1s ease, box-shadow 0.15s ease, background 0.15s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.wcc-submit svg {
	width: 17px;
	height: 17px;
}

.wcc-submit:hover {
	transform: translateY( -1px );
	box-shadow: 0 6px 18px rgba( 255, 90, 31, 0.38 );
	background: #ff6b32;
}

.wcc-submit:active {
	transform: translateY( 0 );
}

/* ---------------------------------------------------------------
   RESULT PANEL
--------------------------------------------------------------- */

.wcc-result {
	margin-top: 16px;
}

@keyframes wcc-peel-reveal {
	from {
		clip-path: polygon( 0 0, 0 0, 0 100%, 0 100% );
		opacity: 0.4;
	}
	to {
		clip-path: polygon( 0 0, 100% 0, 100% 100%, 0 100% );
		opacity: 1;
	}
}

.wcc-result-panel {
	border: 1px solid var( --wcc-line );
	border-radius: var( --wcc-radius );
	padding: 22px;
	background: linear-gradient( 180deg, #fafbfc, #ffffff 40% );
	animation: wcc-peel-reveal 0.55s cubic-bezier( 0.22, 1, 0.36, 1 );
}

.wcc-headline-range {
	font-size: 2.1rem;
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -0.01em;
}

.wcc-evidence-badge {
	display: inline-block;
	margin-top: 10px;
	padding: 5px 12px;
	border-radius: 999px;
	background: linear-gradient( 135deg, var( --wcc-chrome-a ), var( --wcc-chrome-b ) );
	color: #24272c;
	font-weight: 800;
	font-size: 0.76rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.wcc-evidence-subtext {
	color: var( --wcc-muted );
	font-size: 0.9rem;
	margin: 10px 0 18px;
	line-height: 1.5;
}

table.wcc-breakdown {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 10px;
}

table.wcc-breakdown td {
	padding: 9px 0;
	border-bottom: 1px solid var( --wcc-line );
}

table.wcc-breakdown td:last-child {
	text-align: right;
	font-variant-numeric: tabular-nums;
	font-weight: 700;
}

.wcc-rounding-note,
.wcc-labor-disclosure,
.wcc-graphics-disclosure,
.wcc-data-freshness {
	font-size: 0.81rem;
	color: var( --wcc-muted );
	margin: 8px 0;
	line-height: 1.5;
}

.wcc-standing-disclaimer {
	font-weight: 700;
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px dashed var( --wcc-line );
}

.wcc-roll-estimate {
	margin-top: 16px;
	padding: 14px 16px;
	background: var( --wcc-accent-soft );
	border: 1px solid var( --wcc-accent );
	border-radius: var( --wcc-radius );
}

.wcc-roll-count {
	font-weight: 800;
	font-size: 1.05rem;
	color: var( --wcc-accent );
}

.wcc-roll-note {
	font-size: 0.8rem;
	color: var( --wcc-muted );
	margin: 6px 0 0;
	line-height: 1.5;
}

.wcc-panel-breakdown {
	margin-top: 18px;
	padding-top: 16px;
	border-top: 1px solid var( --wcc-line );
}

.wcc-panel-heading {
	font-size: 0.85rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	margin: 0 0 10px;
}

table.wcc-panel-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.86rem;
}

table.wcc-panel-table th {
	text-align: left;
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var( --wcc-muted );
	padding: 4px 6px 6px 0;
	border-bottom: 1px solid var( --wcc-line );
}

table.wcc-panel-table td {
	padding: 6px 6px 6px 0;
	border-bottom: 1px solid var( --wcc-line );
}

table.wcc-panel-table th:not( :first-child ),
table.wcc-panel-table td:not( :first-child ) {
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.wcc-panel-note {
	font-size: 0.78rem;
	color: var( --wcc-muted );
	margin: 10px 0 0;
	line-height: 1.5;
}

.wcc-quote-required {
	border: 1px solid var( --wcc-warning-border );
	background: var( --wcc-warning-bg );
	border-radius: var( --wcc-radius );
	padding: 22px;
	animation: wcc-peel-reveal 0.5s cubic-bezier( 0.22, 1, 0.36, 1 );
	display: flex;
	gap: 14px;
	align-items: flex-start;
}

.wcc-quote-icon {
	flex: none;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var( --wcc-warning-border );
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
}

.wcc-quote-icon svg {
	width: 18px;
	height: 18px;
}

.wcc-quote-heading {
	font-weight: 800;
	margin-bottom: 5px;
	font-size: 1rem;
	color: #8a5a10;
}

.wcc-quote-body p {
	margin: 0;
	color: #6b5230;
	font-size: 0.92rem;
	line-height: 1.5;
}

.wcc-error {
	border: 1px solid var( --wcc-error-border );
	background: var( --wcc-error-bg );
	color: var( --wcc-error-border );
	border-radius: var( --wcc-radius );
	padding: 12px 16px;
}

.wcc-loading {
	color: var( --wcc-muted );
	padding: 12px 0;
	display: flex;
	align-items: center;
	gap: 8px;
}

.wcc-loading::before {
	content: "";
	width: 14px;
	height: 14px;
	border: 2px solid var( --wcc-line );
	border-top-color: var( --wcc-accent );
	border-radius: 50%;
	animation: wcc-spin 0.7s linear infinite;
}

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

/* ---------------------------------------------------------------
   MOTION PREFERENCE
--------------------------------------------------------------- */

@media ( prefers-reduced-motion: reduce ) {
	.wcc-result-panel,
	.wcc-quote-required {
		animation: none;
	}
	.wcc-chip,
	.wcc-submit,
	.wcc-swatch-chip {
		transition: none;
	}
	.wcc-loading::before {
		animation: none;
	}
}

/* ---------------------------------------------------------------
   RESPONSIVE
--------------------------------------------------------------- */

@media ( max-width: 480px ) {
	.wcc-rail-label {
		font-size: 0.52rem;
	}
	.wcc-rail-panel {
		min-height: 44px;
	}
	.wcc-header-subtitle {
		margin-left: 0;
	}
	.wcc-headline-range {
		font-size: 1.7rem;
	}
	.wcc-body {
		padding: 18px;
	}
}
