/* WooCommerce Delivery Areas — Checkout styles */

.wcda-area-wrap {
	margin: 1.5em 0;
	padding-top: 1em;
	border-top: 1px solid #e2e2e2;
}

.wcda-area-wrap h3 {
	margin-bottom: 0.5em;
}

#wcda_location_search {
	width: 100%;
}

/* --- Shared "option" markup ---
   Used in three places: the dropdown list rows, the closed dropdown's
   current selection, and the order-summary shipping line. Same class names
   everywhere on purpose, so one set of rules styles all three; each place
   only differs in which wrapping tag is valid (div in the open list, span
   wherever it sits inside a <button>/<label>). */
.wcda-option {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.4em 0.6em;
}

.wcda-option-title {
	font-weight: 600;
}

.wcda-option-price {
	color: #555;
}

.wcda-option-description {
	flex-basis: 100%;
	font-size: 0.85em;
	color: #777;
}

/* --- Dropdown widget --- */
.wcda-dropdown {
	position: relative;
}

.wcda-dropdown-toggle {
	display: block;
	width: 100%;
	text-align: left;
	padding: 0.6em 2em 0.6em 0.8em;
	background: #fff;
	border: 1px solid #ccc;
	border-radius: 4px;
	cursor: pointer;
	position: relative;
}

.wcda-dropdown-toggle::after {
	content: "";
	position: absolute;
	right: 0.9em;
	top: 50%;
	width: 0.5em;
	height: 0.5em;
	border-right: 2px solid #666;
	border-bottom: 2px solid #666;
	transform: translateY(-70%) rotate(45deg);
}

.wcda-dropdown-toggle .wcda-toggle-placeholder {
	color: #767676;
	display: block;
}

.wcda-dropdown-list {
	position: absolute;
	z-index: 100;
	top: 100%;
	left: 0;
	right: 0;
	max-height: 280px;
	overflow-y: auto;
	margin-top: 2px;
	background: #fff;
	border: 1px solid #ccc;
	border-radius: 4px;
	box-shadow: 0 4px 10px rgba( 0, 0, 0, 0.08 );
}

.wcda-dropdown-list .wcda-option {
	padding: 0.6em 0.8em;
	cursor: pointer;
	border-bottom: 1px solid #f0f0f0;
}

.wcda-dropdown-list .wcda-option:last-child {
	border-bottom: none;
}

.wcda-dropdown-list .wcda-option:hover,
.wcda-dropdown-list .wcda-option:focus {
	background: #f5f5f5;
	outline: none;
}

.wcda-dropdown-list .wcda-option--empty {
	color: #767676;
	cursor: default;
}

/* Applied via JS to the closed toggle whenever no Delivery Area is selected
   yet, so the "please select" prompt is impossible to miss. */
.wcda-dropdown-toggle.wcda-select--empty .wcda-option-title,
.wcda-dropdown-toggle.wcda-select--empty .wcda-toggle-placeholder {
	color: #b32d2e;
	font-weight: 600;
}

.wcda-inline-error {
	display: block;
	margin-top: 4px;
	color: #b32d2e;
	font-size: 0.85em;
}

/* Order-summary shipping line: keep it inline with WooCommerce's own totals
   row rather than the multi-line dropdown layout. */
.wcda-order-summary-option {
	display: inline;
}

.wcda-order-summary-option .wcda-option-description {
	display: block;
	margin-top: 2px;
}
