/**
 * Front-end styles: checkout field, Elementor calculator and rate table.
 */

/* Checkout ------------------------------------------------------------- */
.hog-delivery-location-field .hog-delivery-location-select {
	width: 100%;
}

/* Searchable town / location dropdown ------------------------------------ */
/* The selectWoo search box is blank by default — hint text for names and aliases. */
.select2-dropdown.hogd-location-search .select2-search--dropdown {
	padding: 8px;
}

.select2-dropdown.hogd-location-search .select2-search--dropdown .select2-search__field {
	width: 100%;
	box-sizing: border-box;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	padding: 9px 10px;
	background-color: #fff;
	font-size: 14px;
	line-height: 1.4;
}

.select2-dropdown.hogd-location-search .select2-search--dropdown .select2-search__field::placeholder {
	color: #646970;
	opacity: 1;
}

.select2-dropdown.hogd-location-search .select2-search--dropdown .select2-search__field:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
	outline: none;
}

.hog-delivery-quote {
	display: block;
	margin-top: 6px;
	font-size: 0.9em;
	line-height: 1.5;
	color: #555;
}

.hog-delivery-quote.is-loading {
	opacity: 0.5;
}

.hogd-quote__sep {
	margin: 0 6px;
	opacity: 0.5;
}

.hogd-quote__total {
	color: #111;
}

.hogd-quote__note {
	display: block;
	font-size: 0.9em;
	opacity: 0.85;
}

.hogd-order-location {
	margin-top: 8px;
}

/* "Your order" review table delivery row ------------------------------- */
.woocommerce-checkout-review-order-table tr.shipping,
.woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals,
#order_review tr.shipping,
#order_review tr.woocommerce-shipping-totals {
	display: table-row !important;
}

.woocommerce-checkout-review-order-table tr.shipping th,
.woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals th,
#order_review tr.shipping th,
#order_review tr.woocommerce-shipping-totals th {
	vertical-align: middle;
}

.woocommerce-checkout-review-order-table tr.shipping td,
.woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals td,
#order_review tr.shipping td,
#order_review tr.woocommerce-shipping-totals td {
	vertical-align: middle;
	text-align: right;
}

.woocommerce-checkout-review-order-table ul#shipping_method,
#order_review ul#shipping_method {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

.woocommerce-checkout-review-order-table ul#shipping_method li,
#order_review ul#shipping_method li {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

.woocommerce-checkout-review-order-table ul#shipping_method label,
#order_review ul#shipping_method label {
	margin: 0;
	font-weight: inherit;
}

/* Calculator widget ---------------------------------------------------- */
.hogd-calc {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

.hogd-calc--empty {
	display: block;
	padding: 14px;
	border: 1px dashed #ccc;
	color: #666;
}

.hogd-calc__field {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.hogd-calc__label {
	display: block;
	margin-bottom: 6px;
	font-size: 0.9em;
	font-weight: 600;
}

.hogd-calc__control {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	background: #fff;
	color: inherit;
	font: inherit;
	box-sizing: border-box;
}

.hogd-calc__control:focus {
	outline: 1px solid #999;
	outline-offset: 0;
}

.hogd-calc__result {
	grid-column: 1 / -1;
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 16px;
	border-radius: 6px;
	background: #f6f6f6;
}

.hogd-calc__result-label {
	font-size: 0.85em;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	opacity: 0.7;
}

.hogd-calc__result-value {
	font-size: 1.6em;
	font-weight: 700;
	line-height: 1.2;
}

.hogd-calc__result-note {
	font-size: 0.85em;
	color: #666;
}

/* Rate table widget ---------------------------------------------------- */
.hogd-table-wrap {
	width: 100%;
	overflow-x: auto;
}

.hogd-table {
	width: 100%;
	border-collapse: collapse;
	text-align: left;
}

.hogd-table th,
.hogd-table td {
	padding: 10px 12px;
	border: 1px solid #e5e5e5;
	vertical-align: middle;
}

.hogd-table th {
	background: #111;
	color: #fff;
	font-weight: 600;
}

.hogd-table-empty {
	padding: 12px 0;
	color: #666;
}

@media (max-width: 600px) {
	.hogd-calc {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* v1.0 — prompt shown until a town / location is selected */
.hogd-select-location-prompt {
	display: inline-block;
	color: #b45309;
	font-size: 0.92em;
	font-weight: 500;
}
