/**
 * Woo Frame Dimensions — frontend styles.
 *
 * Scoped under .wfd-* (plus body.wfd-active for native-price hiding).
 * Uses the theme's CSS variables (--primary, --radius, ...) with fallbacks.
 */

/* ---------------------------------------------------------------------
 * Per-linear-meter label on the native price (header + variation price).
 * ------------------------------------------------------------------- */
.wfd-per-ml {
	font-size: 0.72em;
	font-weight: 600;
	color: #6b6b6b;
	white-space: nowrap;
}

/* ---------------------------------------------------------------------
 * Dimensions block
 * ------------------------------------------------------------------- */
.wfd-dimensions {
	margin: 18px 0;
}

.wfd-dimensions__inner {
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: var(--radius, 10px);
	padding: 16px 16px 14px;
	background: #ffffff;
	box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
}

.wfd-dimensions__title {
	margin: 0 0 2px;
	font-size: 1.05em;
	font-weight: 700;
	color: #202020;
}

.wfd-dimensions__hint {
	margin: 0 0 12px;
	font-size: 0.82em;
	line-height: 1.45;
	color: #6b6b6b;
}

.wfd-dimensions__fields {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: end;
	gap: 10px;
}

.wfd-dimensions__sep {
	font-size: 1.15em;
	font-weight: 600;
	color: #9a9a9a;
	line-height: 42px;
	text-align: center;
}

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

.wfd-field__label {
	font-size: 0.82em;
	font-weight: 600;
	color: #202020;
}

.wfd-field__control {
	position: relative;
	display: flex;
	align-items: center;
}

.wfd-field__input {
	width: 100%;
	height: 42px;
	padding: 8px 44px 8px 12px;
	font-size: 1rem;
	border: 1px solid rgba(0, 0, 0, 0.18);
	border-radius: var(--radius, 8px);
	background: #fff;
	color: #202020;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wfd-field__input:focus {
	outline: none;
	border-color: var(--primary, #2bb4b8);
	box-shadow: 0 0 0 3px rgba(43, 180, 184, 0.15);
}

.wfd-field__input::placeholder {
	color: #b9b9b9;
}

.wfd-field__unit {
	position: absolute;
	right: 12px;
	font-size: 0.82em;
	font-weight: 600;
	color: #6b6b6b;
	pointer-events: none;
}

.wfd-dimensions__range {
	margin-top: 8px;
	font-size: 0.76em;
	color: #8a8a8a;
}

/* ---------------------------------------------------------------------
 * Error / summary
 * ------------------------------------------------------------------- */
.wfd-dimensions__error {
	margin: 10px 0 0;
	padding: 8px 12px;
	font-size: 0.84em;
	font-weight: 600;
	color: #b32d2e;
	background: rgba(179, 45, 46, 0.08);
	border-radius: var(--radius, 8px);
}

.wfd-dimensions.wfd-has-error .wfd-field__input {
	border-color: #b32d2e;
}

.wfd-summary {
	margin-top: 12px;
	border-top: 1px dashed rgba(0, 0, 0, 0.14);
	padding-top: 10px;
}

.wfd-summary__row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	padding: 3px 0;
	font-size: 0.88em;
}

.wfd-summary__label {
	color: #6b6b6b;
}

.wfd-summary__value {
	font-weight: 600;
	color: #202020;
	text-align: right;
}

.wfd-summary__row--total {
	margin-top: 4px;
	padding-top: 8px;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.wfd-summary__row--total .wfd-summary__label {
	font-weight: 700;
	color: #202020;
}

.wfd-summary__row--total .wfd-summary__value {
	font-size: 1.15em;
	font-weight: 800;
	color: var(--primary, #2bb4b8);
}

.wfd-summary__row--total .wfd-summary__value s {
	font-size: 0.78em;
	font-weight: 600;
	color: #9a9a9a;
	margin-right: 6px;
}

.wfd-summary__min-note {
	font-size: 0.72em;
	font-weight: 600;
	color: #8a8a8a;
}

/* Disabled CTA visual state (on top of WC's .disabled) */
.single_add_to_cart_button.wfd-disabled {
	opacity: 0.55;
	cursor: not-allowed;
	pointer-events: auto;
}

/* ---------------------------------------------------------------------
 * Mobile
 * ------------------------------------------------------------------- */
@media (max-width: 767px) {
	.wfd-dimensions__fields {
		grid-template-columns: 1fr 1fr;
	}

	.wfd-dimensions__sep {
		display: none;
	}

	.wfd-field__input {
		height: 48px;
		font-size: 1.125rem; /* 18px — prevents iOS zoom-on-focus */
		min-height: 48px;
	}

	.wfd-dimensions__inner {
		padding: 14px 12px 12px;
	}
}
