/* BudChampion Dropship Manager — delivery country control
 * Visual chrome aligned with budchampion-localisation language switcher. */

.bcdm-delivery-country {
	--bcdm-cc-gap: 0.4em;
	--bcdm-cc-radius: 6px;
	--bcdm-cc-border: rgba(0, 0, 0, 0.12);
	--bcdm-cc-bg: #fff;
	--bcdm-cc-text: #222;
	--bcdm-cc-hover: rgba(0, 0, 0, 0.06);
	--bcdm-cc-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	position: relative;
	display: inline-block;
	vertical-align: middle;
	z-index: 10050;
	font-size: 12px;
	line-height: 1.4;
	color: var(--bcdm-cc-text);
	margin: 0;
	margin-top: -3px;
}

.bcdm-delivery-country__toggle {
	display: flex;
	align-items: center;
	gap: var(--bcdm-cc-gap);
	background: transparent;
	border: 0;
	padding: 0;
	margin: 0;
	cursor: pointer;
	list-style: none;
	user-select: none;
	white-space: nowrap;
	color: #ffffff;
	font: inherit;
	text-align: start;
}

/* Dark text variant for light backgrounds (Deliver to / label / caret). */
.bcdm-delivery-country--dark .bcdm-delivery-country__toggle,
.bcdm-delivery-country--dark .bcdm-delivery-country__label,
.bcdm-delivery-country--dark .bcdm-delivery-country__value,
.bcdm-delivery-country--dark .bcdm-delivery-country__caret {
	color: #666666;
}

.bcdm-delivery-country--dark .bcdm-delivery-country__label {
	opacity: 1;
}

.bcdm-delivery-country__toggle:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.bcdm-delivery-country__flag {
	font-size: 1.1em;
	line-height: 1;
}

.bcdm-delivery-country__label {
	opacity: 0.85;
	font-weight: 400;
	color: inherit;
}

.bcdm-delivery-country__value {
	font-weight: 400;
	text-decoration: none;
	color: inherit;
}

.bcdm-delivery-country__caret {
	width: 0;
	height: 0;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 5px solid currentColor;
	transition: transform 0.15s ease;
	flex-shrink: 0;
}

.bcdm-delivery-country__toggle[aria-expanded="true"] .bcdm-delivery-country__caret {
	transform: rotate(180deg);
}

.bcdm-delivery-country__list {
	position: absolute;
	top: calc(100% + 6px);
	inset-inline-start: auto;
	inset-inline-end: 0;
	z-index: 10060;
	min-width: max-content;
	max-height: 280px;
	overflow: auto;
	margin: 0;
	padding: 0.35em 0;
	list-style: none;
	background: var(--bcdm-cc-bg);
	color: var(--bcdm-cc-text);
	border: 1px solid var(--bcdm-cc-border);
	border-radius: var(--bcdm-cc-radius);
	box-shadow: var(--bcdm-cc-shadow);
}

.bcdm-delivery-country__list[hidden] {
	display: none !important;
}

.bcdm-delivery-country__list li {
	margin: 0;
	padding: 0;
}

.bcdm-delivery-country__option {
	display: flex;
	align-items: center;
	gap: var(--bcdm-cc-gap);
	width: 100%;
	margin: 0;
	padding: 0.45em 1em;
	border: 0;
	background: transparent;
	font: inherit;
	text-align: start;
	cursor: pointer;
	color: #222 !important;
	white-space: nowrap;
}

.bcdm-delivery-country__list li:hover .bcdm-delivery-country__option,
.bcdm-delivery-country__list li:focus .bcdm-delivery-country__option,
.bcdm-delivery-country__option:hover,
.bcdm-delivery-country__option:focus-visible {
	background: var(--bcdm-cc-hover);
	color: #222 !important;
	outline: none;
}

.bcdm-delivery-country__list li[aria-selected="true"] .bcdm-delivery-country__option {
	font-weight: 700;
	color: #222 !important;
}

.bcdm-pdp-availability {
	margin: 0 0 1rem;
	font-size: 0.95rem;
	font-weight: 600;
}

.bcdm-pdp-availability.is-oos {
	color: #8a2424;
}

body.bcdm-country-oos .single_add_to_cart_button.disabled {
	opacity: 0.5;
	pointer-events: none;
}

.product.bcdm-unavailable,
li.product.bcdm-unavailable {
	opacity: 0.55;
}

@media (max-width: 782px) {
	.bcdm-delivery-country__list {
		min-width: min(90vw, 280px);
	}
}
