/* Custom variation dropdown (product page and Quick View popup) in the theme's colors. */

/* The native select stays in the DOM for the variation logic, only hidden. */
.lm-dd-native.pdt-custom-select,
.lm-dd-native.pdt-mdl-select {
	position: absolute;
	width: 1px;
	height: 1px;
	min-height: 0;
	padding: 0;
	border: 0;
	opacity: 0;
	pointer-events: none;
}

.lm-dd ~ .pdt-mdl-select-arrow {
	display: none;
}

.lm-dd {
	position: relative;
	width: 100%;
}

.lm-dd-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	height: 40px;
	padding: 0 16px;
	background: var(--color-white);
	border: 1px solid var(--colorDDDEDE);
	border-radius: 10px;
	color: var(--color-main);
	font-family: 'Inter', sans-serif;
	font-size: 16px;
	text-align: left;
	cursor: pointer;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pdt-mdl-select-wrap .lm-dd-toggle {
	min-height: 56px;
	border-radius: 11px;
	font-size: 14px;
	font-weight: 600;
}

.lm-dd-toggle:hover,
.lm-dd.is-open .lm-dd-toggle {
	border-color: var(--color-yellow-hover);
}

.lm-dd-toggle:focus-visible {
	outline: none;
	border-color: var(--color-yellow-hover);
	box-shadow: 0 0 0 1px var(--color-yellow-hover);
}

.lm-dd-arrow {
	flex: none;
	transition: transform 0.2s ease;
}

.lm-dd.is-open .lm-dd-arrow {
	transform: rotate(180deg);
}

.lm-dd-list {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	right: 0;
	z-index: 30;
	max-height: 260px;
	margin: 0;
	padding: 6px;
	overflow-y: auto;
	scrollbar-width: thin;
	list-style: none;
	background: var(--color-white);
	border: 1px solid var(--colorDDDEDE);
	border-radius: 12px;
	box-shadow: 0 8px 24px rgba(15, 17, 17, 0.12);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-4px);
	transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

.lm-dd.is-open .lm-dd-list {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.lm-dd.lm-dd-up .lm-dd-list {
	top: auto;
	bottom: calc(100% + 6px);
}

.lm-dd-option {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 0;
	padding: 12px 16px;
	border-radius: 10px;
	color: var(--color-dark);
	font-family: 'Inter', sans-serif;
	font-size: 15px;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.lm-dd-option:hover,
.lm-dd-option.is-active {
	background: var(--colorF8F9FA);
}

.lm-dd-option.is-selected {
	background: var(--colorF8F9FA);
	font-weight: 700;
}

/* Unavailable options are struck through and cannot be chosen. */
.lm-dd-option.is-disabled {
	color: #8a8a8a;
	text-decoration: line-through;
	cursor: not-allowed;
}

.lm-dd-radio {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	border: 1.5px solid var(--color-dark);
	border-radius: 50%;
}

.lm-dd-option.is-selected .lm-dd-radio::after {
	content: '';
	width: 10px;
	height: 10px;
	background: var(--color-dark);
	border-radius: 50%;
}

.lm-dd-option.is-disabled .lm-dd-radio {
	border-color: #b5b5b5;
}

/*
 * Quick View popup: the list is a scrollable panel, placed by JS from the right column's left edge to its content's right edge, as tall as the left column.
 * While it is open the rest of the right column is hidden, so nothing shows beside the panel.
 */
.pdt-mdl-right-col {
	position: relative;
}

.pdt-mdl-right-col.lm-dd-open {
	visibility: hidden;
}

.pdt-mdl-right-col.lm-dd-open .lm-dd.is-open .lm-dd-list {
	visibility: visible;
}

.pdt-mdl-select-wrap,
.pdt-mdl-select-wrap .lm-dd {
	position: static;
}

.pdt-mdl-select-wrap .lm-dd-list {
	inset: 0;
	max-height: none;
	padding: 0;
	border: 0;
	border-radius: 5px; /* Same as the popup's image slider. */
	box-shadow: 0 4px 20px rgba(15, 17, 17, 0.12);
}

.pdt-mdl-select-wrap .lm-dd-option {
	min-height: 48px;
	gap: 14px;
	padding: 0 12px;
	border-radius: 0;
	font-size: 14px;
	line-height: 1.2;
}

.pdt-mdl-select-wrap .lm-dd-option.is-selected {
	background: #f4f4f4;
}

.pdt-mdl-select-wrap .lm-dd-radio {
	width: 18px;
	height: 18px;
}

.pdt-mdl-select-wrap .lm-dd-option.is-selected .lm-dd-radio::after {
	width: 8px;
	height: 8px;
}

.lm-dd-list::-webkit-scrollbar {
	width: 8px;
}

.lm-dd-list::-webkit-scrollbar-thumb {
	background: #c9c9c9;
	border-radius: 8px;
}

.lm-dd-list::-webkit-scrollbar-thumb:hover {
	background: #a8a8a8;
}

/* Move the popup close button right, so the open panel does not touch it. */
#productPreviewModal:has(.lm-dd) .pdt-mdl-close-btn {
	right: 12px;
}

/* Mobile: larger rows, text and radios, easier to tap and read. */
@media (max-width: 767px) {
	.pdt-mdl-select-wrap .lm-dd-option {
		min-height: 58px;
		gap: 16px;
		padding: 0 22px;
		font-size: 17px;
	}

	.pdt-mdl-select-wrap .lm-dd-radio {
		width: 26px;
		height: 26px;
	}

	.pdt-mdl-select-wrap .lm-dd-option.is-selected .lm-dd-radio::after {
		width: 11px;
		height: 11px;
	}
}
