/**
 * BlackSpace — Product Processing Time
 *
 * Two responsibilities, kept scoped by class prefix:
 *   .bs-processing-time-field*    -> editor UI (seller/admin)
 *   .bs-processing-time-display*  -> buyer-facing ship-by / delivery-by lines
 *
 * Email surface uses inline styles (HTML email client compatibility).
 */

/* =============================================================================
 * Editor field
 * ========================================================================== */

.bs-processing-time-field {
	margin: 16px 0;
	padding: 16px;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	background: #fafafa;
}

.bs-processing-time-field--shop {
	background: #fff;
	border-color: #d1d5db;
}

.bs-processing-time-field__heading {
	font-size: 16px;
	font-weight: 600;
	margin: 0 0 6px;
	color: #111827;
}

.bs-processing-time-field__label {
	display: block;
	font-weight: 600;
	color: #111827;
	margin-bottom: 4px;
}

.bs-processing-time-field__intro {
	margin: 0 0 12px;
	color: #6b7280;
	font-size: 13px;
	line-height: 1.45;
}

.bs-processing-time-field__use-shop-default {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 12px;
	font-size: 14px;
	color: #374151;
	cursor: pointer;
	user-select: none;
}

.bs-processing-time-field__use-shop-default input[type="checkbox"] {
	margin: 0;
}

.bs-processing-time-field__controls {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: flex-end;
}

.bs-processing-time-field__controls[hidden] {
	display: none;
}

.bs-processing-time-field__preset-row,
.bs-processing-time-field__range-row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 10px;
}

.bs-processing-time-field__sublabel {
	display: flex;
	flex-direction: column;
	font-size: 12px;
	color: #6b7280;
	font-weight: 500;
	gap: 4px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.bs-processing-time-field__preset {
	min-width: 140px;
	padding: 6px 8px;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	font-size: 14px;
	background: #fff;
	color: #111827;
}

.bs-processing-time-field__min,
.bs-processing-time-field__max {
	width: 80px;
	padding: 6px 8px;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	font-size: 14px;
	background: #fff;
	color: #111827;
	text-align: center;
}

.bs-processing-time-field__min:focus,
.bs-processing-time-field__max:focus,
.bs-processing-time-field__preset:focus {
	outline: 2px solid #2563eb;
	outline-offset: 1px;
	border-color: #2563eb;
}

.bs-processing-time-field__dash {
	color: #9ca3af;
	font-size: 14px;
	padding-bottom: 8px;
}

.bs-processing-time-field__hint {
	flex-basis: 100%;
	margin: 4px 0 0;
	font-size: 13px;
	color: #b91c1c;
}

/* WC admin General-tab compatibility — match the surrounding options_group rhythm. */
.bs-processing-time-admin-group .bs-processing-time-field {
	margin: 9px 12px;
}

/* =============================================================================
 * Display — buyer-facing ship-by / delivery-by lines
 * ========================================================================== */

.bs-processing-time-display {
	font-size: 14px;
	line-height: 1.4;
	color: #374151;
}

.bs-processing-time-display__label {
	color: #6b7280;
	font-weight: 500;
}

.bs-processing-time-display__date {
	color: #111827;
	font-weight: 600;
}

/* Product single page — place near the add-to-cart, give it a little breathing room. */
.bs-processing-time-display--product {
	margin: 10px 0 14px;
	padding: 8px 0;
	border-top: 1px solid #f3f4f6;
	border-bottom: 1px solid #f3f4f6;
	font-size: 15px;
}

/* Cart line — small annotation under product name. */
.bs-processing-time-display--cart-line {
	margin-top: 4px;
	font-size: 12px;
	color: #6b7280;
}

.bs-processing-time-display--cart-line .bs-processing-time-display__label {
	color: #6b7280;
}

.bs-processing-time-display--cart-line .bs-processing-time-display__date {
	color: #374151;
	font-weight: 500;
}

/* Checkout review — sits under the quantity, slightly smaller. */
.bs-processing-time-display--checkout-line {
	display: block;
	margin-top: 4px;
	font-size: 12px;
	color: #6b7280;
}

.bs-processing-time-display--checkout-line .bs-processing-time-display__label {
	color: #6b7280;
}

.bs-processing-time-display--checkout-line .bs-processing-time-display__date {
	color: #374151;
	font-weight: 500;
}

/* =============================================================================
 * WoodMart compatibility — checkout review consolidates into .wd-checkout-prod-cont
 * so the inserted line lives inside the same cell. No extra rules needed unless
 * we hit specific overflow; leaving room to add as discovered.
 * ========================================================================== */

/* =============================================================================
 * bs-shipping-rate-engine context — when rendered inside the Shipping Settings
 * tab, the SRE form already supplies a sectioned look. Strip our field's outer
 * chrome and let the SRE-style labels/inputs carry the visuals.
 * ========================================================================== */

.bs-processing-time-field--sre {
	margin: 0;
	padding: 0;
	border: none;
	background: transparent;
}

.bs-processing-time-field--sre [data-bs-processing-time-controls] {
	display: block;
}

.bs-processing-time-sre-section .bs-sre-field-half {
	display: inline-block;
	width: calc(50% - 12px);
	vertical-align: top;
}

.bs-processing-time-sre-section .bs-sre-field-half:first-of-type {
	margin-right: 20px;
}

.bs-processing-time-sre-section .bs-processing-time-error {
	color: #b91c1c;
	margin-top: 8px;
}

@media (max-width: 600px) {
	.bs-processing-time-sre-section .bs-sre-field-half {
		display: block;
		width: 100%;
	}

	.bs-processing-time-sre-section .bs-sre-field-half:first-of-type {
		margin-right: 0;
	}
}
