/* ===== Speedy classic checkout — delivery-type icon tabs (Speedy red) ===== */
/* Matches the Econt design: rounded cards, SVG icons recoloured via CSS mask, Speedy red
   (#d4002f) active state. Only the option labels inside the input wrapper are styled as tabs;
   the field's own label stays a heading. */

#speedy-title-text { display: none !important; }

/* Field label ("Shipping to") shown as a heading above the tabs. The theme floats form-row
   labels left, which would drop the tabs next to the label — force it onto its own line. */
#speedy_shipping_to_field > label {
	display: block;
	float: none;
	width: auto;
	margin-bottom: 6px;
}
#speedy_shipping_to_field .woocommerce-input-wrapper {
	clear: both;
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

#speedy_shipping_to_field .woocommerce-input-wrapper input[type="radio"] {
	display: none !important;
}

/* Each delivery-type tab */
#speedy_shipping_to_field .woocommerce-input-wrapper label {
	flex: 1 1 0;
	min-width: 96px;
	box-sizing: border-box;
	padding: 10px 8px;
	margin: 0 !important;
	background: #f7f7f7;
	border: 1.5px solid #ddd;
	border-radius: 10px;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	text-align: center;
	color: #d4002f;
	font-weight: 600;
	font-size: 13px;
	line-height: 1.2;
	transition: border-color .15s, background .15s, color .15s, box-shadow .15s;
}

#speedy_shipping_to_field .woocommerce-input-wrapper label:hover {
	border-color: #d4002f;
	background: #fdeef0;
}

/* Hide the required asterisk inside the tabs (the field itself is still required) */
#speedy_shipping_to_field .woocommerce-input-wrapper label .required,
#speedy_shipping_to_field .woocommerce-input-wrapper label abbr.required {
	display: none !important;
}

/* Per-type fixed-price badge inside the tab */
#speedy_shipping_to_field .woocommerce-input-wrapper label .speedy-type-price {
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
	opacity: .95;
}

/* Icon rendered as a mask so it inherits the tab colour (red → white when selected) */
#speedy_shipping_to_field .woocommerce-input-wrapper label:before {
	content: "";
	display: block;
	width: 26px;
	height: 26px;
	background-color: currentColor;
	-webkit-mask: no-repeat center / contain;
	mask: no-repeat center / contain;
}

#speedy_shipping_to_field .woocommerce-input-wrapper label[for="speedy_shipping_to_ADDRESS"]:before {
	-webkit-mask-image: url("images/speedy-door.svg");
	mask-image: url("images/speedy-door.svg");
}
#speedy_shipping_to_field .woocommerce-input-wrapper label[for="speedy_shipping_to_OFFICE"]:before {
	-webkit-mask-image: url("images/speedy-office.svg");
	mask-image: url("images/speedy-office.svg");
}
#speedy_shipping_to_field .woocommerce-input-wrapper label[for="speedy_shipping_to_APT"]:before {
	-webkit-mask-image: url("images/speedy-aps.svg");
	mask-image: url("images/speedy-aps.svg");
}

/* Selected tab: solid Speedy red with white text + icon */
#speedy_shipping_to_field .woocommerce-input-wrapper input:checked + label {
	background: #d4002f;
	border-color: #d4002f;
	color: #fff;
	box-shadow: 0 2px 6px rgba(212, 0, 47, .28);
}

.speedy_office_locator_map { width: auto; }

@media only screen and (max-width: 600px) {
	#speedy_shipping_to_field .woocommerce-input-wrapper label {
		min-width: 84px;
		font-size: 12px;
	}
}
