/**
 * Parametre „Zvýšte si parametre:“ (ticket 05).
 * Hodnoty podľa React ProductParameters + chakra-react-select (DropdownSelect defaultStyles + constants.ts
 * parameterDropdownStyles), zmerané z computed štýlov React verzie. 1rem = 10px, 1em = 16px.
 */
.wa-pa__parameters {
	margin-top: 2.4rem;
	font-size: 16px;
	line-height: 1.3;
	color: #000;
}

/* React: <Text as="strong" fontSize="1.8rem"> (inline) */
.wa-pa__parameters-title {
	font-size: 1.8rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--wa-pa-gray-900, #292929);
}

.wa-pa__parameters-list {
	display: flex;
	flex-direction: column;
	gap: 0.8rem;
	margin-top: 0.85rem;
}

/* container */
.wa-pa__select {
	position: relative;
	width: 100%;
	color: var(--wa-pa-gray-900, #292929);
	background: #fff;
	pointer-events: auto;
}

/* control */
.wa-pa__select-control {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 2.5em;
	min-height: 2em;
	overflow: hidden;
	font-size: inherit;
	background: #fff;
	border: 0.1em solid #D7D7D7;
	border-radius: 0.25em;
	box-shadow: none;
	cursor: default;
	transition: opacity 0.2s;
}

.wa-pa__select--open .wa-pa__select-control {
	z-index: 1;
}

/* valueContainer (+ dummy input → tu samotný combobox) */
.wa-pa__select-value {
	flex: 1 1 0%;
	display: flex;
	align-items: center;
	align-self: stretch;
	min-width: 0;
	padding: 0.25em 0.75em;
	overflow: hidden;
	outline: none;
	cursor: default;
	-webkit-tap-highlight-color: transparent;
}

/* React nemá viditeľný fokus (boxShadow none) — tu len pri klávesnici, kvôli prístupnosti */
.wa-pa__select-value:focus-visible {
	outline: none;
}

.wa-pa__select-control:has(.wa-pa__select-value:focus-visible) {
	border-color: var(--secondary, #00AEEF);
}

.wa-pa__select-placeholder,
.wa-pa__select-single {
	margin: 0 1.25px;
	min-width: 0;
}

.wa-pa__select-placeholder {
	color: #B2B2B2;
	line-height: 1.3;
}

/*
 * React-select positions the single value absolutely (max-width 100% - 5px of the value container),
 * so a long label is cut by the container edge without a visible ellipsis. Same here: no shrinking,
 * the value container (overflow: hidden) clips it.
 */
.wa-pa__select-single {
	flex-shrink: 0;
	line-height: 1;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: clip;
}

.wa-pa__select-placeholder[hidden],
.wa-pa__select-single[hidden],
.wa-pa__select-clear[hidden],
.wa-pa__select-menu[hidden] {
	display: none !important;
}

/* indicatorsContainer */
.wa-pa__select-indicators {
	display: flex;
	align-items: center;
	align-self: stretch;
	flex-shrink: 0;
}

.wa-pa .wa-pa__select-clear {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	margin: 0 3px;
	padding: 0;
	font-size: 12px;
	line-height: 1;
	color: inherit;
	background: transparent;
	border: 0;
	border-radius: 4.5px;
	box-shadow: none;
	cursor: pointer;
	min-height: 0;
	min-width: 0;
	text-transform: none;
	transition: background-color 0.2s;
}

.wa-pa .wa-pa__select-clear:hover {
	background: transparent;
	color: inherit;
}

.wa-pa .wa-pa__select-clear:focus {
	outline: none;
}

.wa-pa .wa-pa__select-clear:focus-visible {
	outline: 2px solid var(--secondary, #00AEEF);
	outline-offset: -2px;
}

.wa-pa__select-clear svg {
	display: block;
	width: 1em;
	height: 1em;
	flex-shrink: 0;
}

.wa-pa__select-separator {
	align-self: stretch;
	width: 0;
	border-left: 0.1em solid #D7D7D7;
}

.wa-pa__select-arrow {
	display: flex;
	align-items: center;
	justify-content: center;
	align-self: stretch;
	padding: 0.25em;
	font-size: 20px;
	line-height: 1.3;
	background: transparent;
	cursor: pointer;
}

.wa-pa__select-arrow svg {
	display: block;
	width: 1em;
	height: 1em;
}

/* menu */
.wa-pa__select-menu {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 1;
	width: 100%;
	margin: 8px 0;
	padding: 0;
	box-shadow: none;
}

/* menuList */
.wa-pa .wa-pa__select-list {
	position: relative;
	max-height: 300px;
	margin: 0;
	padding: 0;
	overflow-y: auto;
	list-style: none;
	background: #fff;
	border: 0.1em solid #D7D7D7;
	border-radius: 0.25em;
	box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
	outline: none;
}

.wa-pa__select-list::-webkit-scrollbar {
	width: 5px;
	border-radius: 5px;
	background: var(--shade-light);
}

.wa-pa__select-list::-webkit-scrollbar-thumb {
	background: var(--primary);
	border-radius: var(--radius-m);
}

/* option */
.wa-pa .wa-pa__select-option {
	display: flex;
	align-items: center;
	margin: 0;
	padding: 0.25em 0.75em;
	font-size: inherit;
	line-height: 1.3;
	background: transparent;
	cursor: pointer;
	user-select: none;
	list-style: none;
}

/* Hover (React gray.50) — rovnako aj fokus z klávesnice (aria-activedescendant), React ho nezvýrazní */
.wa-pa .wa-pa__select-option:hover,
.wa-pa .wa-pa__select-option.is-active {
	background: #FAFAFA;
}

.wa-pa .wa-pa__select-option[aria-selected="true"],
.wa-pa .wa-pa__select-option[aria-selected="true"]:hover {
	background: #00AEEF;
	color: #fff;
}

/* noOptionsMessage */
.wa-pa .wa-pa__select-empty {
	margin: 0;
	padding: 0.5rem 1rem;
	color: #959595;
	text-align: center;
	list-style: none;
}

/* Počas pridávania do košíka (React isDisabled → Chakra _disabled) */
.wa-pa__select--disabled .wa-pa__select-control {
	opacity: 0.4;
}

.wa-pa__select--disabled .wa-pa__select-control,
.wa-pa__select--disabled .wa-pa__select-value,
.wa-pa__select--disabled .wa-pa__select-arrow,
.wa-pa .wa-pa__select--disabled .wa-pa__select-clear {
	cursor: not-allowed;
}
