/* Dubai Delivery Area Manager - storefront. */
.ddam-badge {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 4px;
	font-weight: 600;
	line-height: 1.8;
	background: #e5e5e5;
	color: #1d2327;
}

.ddam-badge--store_pickup {
	background: #d7e8f7;
	color: #0a3a66;
}

.ddam-badge--home_delivery {
	background: #d4edda;
	color: #14532d;
}

.ddam-order-fulfilment {
	margin: 0 0 2em;
}

.ddam-delivery-notice {
	margin: 0;
}

.ddam-delivery-area-field select {
	width: 100%;
	max-width: 100%;
}

@media (max-width: 768px) {
	.ddam-delivery-area-field select {
		font-size: 16px; /* Prevents iOS zoom on focus. */
	}
}

/* Checkout Block: the Store Pickup warning replaces WooCommerce's "No shipping options" banner. */
.ddam-pickup-only .wc-block-components-shipping-rates-control__no-results-notice {
	display: none;
}

/* Store Pickup confirmation popup (Classic and Blocks). */
body.ddam-modal-open {
	overflow: hidden;
}

.ddam-modal-overlay {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(0, 0, 0, 0.6);
	box-sizing: border-box;
}

.ddam-modal {
	box-sizing: border-box;
	width: 100%;
	max-width: 480px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	padding: 24px;
	border-radius: 8px;
	background: #fff;
	color: #1d2327;
	font-size: 15px;
	line-height: 1.5;
	text-align: left;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.ddam-modal .ddam-modal__title {
	margin: 0 0 12px;
	padding: 0;
	font-size: 20px;
	line-height: 1.3;
	color: inherit;
}

.ddam-modal .ddam-modal__text {
	margin: 0 0 16px;
}

.ddam-modal .ddam-modal__check {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0 0 12px;
	padding: 12px;
	border: 1px solid #c3c4c7;
	border-radius: 6px;
	background: #f6f7f7;
	cursor: pointer;
}

.ddam-modal .ddam-modal__check input {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	margin: 2px 0 0;
}

.ddam-modal .ddam-modal__error {
	margin: 0 0 12px;
	padding: 10px 12px;
	border-left: 4px solid #b32d2e;
	background: #fcf0f1;
	color: #8a1f20;
}

.ddam-modal .ddam-modal__error[hidden] {
	display: none;
}

.ddam-modal .ddam-modal__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin-top: 16px;
}

.ddam-modal .ddam-btn {
	margin: 0;
	padding: 11px 18px;
	border: 1px solid #000;
	border-radius: 4px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
}

.ddam-modal .ddam-btn--primary {
	background: #000;
	color: #fff;
}

.ddam-modal .ddam-btn--secondary {
	background: #fff;
	color: #000;
}

.ddam-modal .ddam-btn:disabled {
	opacity: 0.55;
	cursor: wait;
}

.ddam-modal .ddam-btn:focus-visible,
.ddam-modal .ddam-modal__check input:focus-visible {
	outline: 3px solid #2271b1;
	outline-offset: 2px;
}

@media (max-width: 480px) {
	.ddam-modal {
		padding: 18px;
	}

	.ddam-modal .ddam-modal__actions {
		flex-direction: column-reverse;
	}

	.ddam-modal .ddam-btn {
		width: 100%;
	}
}

.ddam-pickup-status-line {
	margin: 8px 0 0;
}

.ddam-pickup-status-line .ddam-pickup-status {
	margin-right: 8px;
	font-weight: 600;
}

.ddam-pickup-status-line .ddam-pickup-status.is-confirmed {
	color: #1e6b2e;
}

/* Delivery Area dropdown inside the Checkout Block's shipping options. */
.wc-block-components-shipping-rates-control {
	display: flex;
	flex-direction: column;
}

.ddam-block-area {
	order: -1;
	margin: 0 0 16px;
}

.ddam-block-area .ddam-block-area__label {
	display: block;
	margin: 0 0 6px;
	font-weight: 600;
}

.ddam-block-area .ddam-block-area__select {
	box-sizing: border-box;
	width: 100%;
	min-height: 48px;
	padding: 10px 12px;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	background: #fff;
	color: inherit;
	font: inherit;
}

.ddam-block-area .ddam-block-area__error {
	margin: 6px 0 0;
	color: #b32d2e;
}

.ddam-block-area .ddam-block-area__select{
	color: #000;
}

/* Classic checkout: the dropdown row in the order review. */
.woocommerce-checkout-review-order-table .ddam-area-row td {
	padding-bottom: 8px;
}

.woocommerce-checkout-review-order-table .ddam-delivery-area-field select {
	width: 100%;
}
