/* ==========================================================================
   UN ChromaLab — Sort widget
   Replicates The7 product-sorting widget styling exactly. The7 scopes its
   rules under .elementor-widget-the7-product-sorting, so we re-author them
   here under .chromalab-sort to match visually.
   ========================================================================== */

.chromalab-sort {
	position: relative;
	display: block;
	font-size: 15px;
	line-height: 0;
	color: var(--un-black);
	margin: 0;
	max-width: 100%;
}

.chromalab-sort .chromalab-sort__select,
.chromalab-sort select.orderby {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	width: 100%;
	height: auto;
	min-height: 1.3em;
	margin: 0 !important;
	border: 0 solid;
	border-bottom: 1px solid var(--un-rose-divider);
	border-radius: var(--un-radius);
	background-color: transparent;
	background-image: none;
	box-shadow: none;
	padding: 16px 19px 16px 0;
	font: inherit;
	font-size: 15px;
	line-height: 1.3em;
	color: var(--un-black);
	text-overflow: ellipsis;
	transition: color 0.3s, border-color 0.3s, background-color 0.3s;
	cursor: pointer;
}

.chromalab-sort .chromalab-sort__select:focus,
.chromalab-sort select.orderby:focus {
	outline: 0;
	box-shadow: none;
}

/* Subtle on-brand default hover (rose border, matching link-hover). Only the
   sides that have a width show it (underline by default). The widget's Style-tab
   "Survol" controls override this when set. */
.chromalab-sort .chromalab-sort__select:hover,
.chromalab-sort select.orderby:hover {
	border-color: var(--un-rose);
}

.chromalab-sort > svg {
	position: absolute;
	top: 50%;
	right: 0;
	transform: translateY(-50%);
	width: 14px;
	height: 14px;
	color: inherit;
	pointer-events: none;
	box-sizing: content-box;
}

/* Leading category icon (sort / display), wrapped so it isn't matched by the
   `.chromalab-sort > svg` chevron rules. UN Pink brand accent. */
.chromalab-sort__icon {
	position: absolute;
	top: 50%;
	left: 0;
	transform: translateY(-50%);
	display: inline-flex;
	color: var(--un-rose);
	pointer-events: none;
}

.chromalab-sort__icon svg {
	width: 14px;
	height: 14px;
}

.chromalab-sort--icon .chromalab-sort__select,
.chromalab-sort--icon select.orderby {
	padding-left: 24px;
}

/* Fixed "face" label: the closed select always reads e.g. "Tri" / "Affichage"
   while the open list keeps the real option names. We hide the select's own
   collapsed text and overlay the face. The text-colour style control targets
   the face (not the hidden select), so styling stays coherent.

   The7 paints <select> glyphs via `-webkit-text-fill-color`, which overrides
   `color` — so hiding the collapsed text needs BOTH declarations, or the label
   bleeds through and overlaps the face. */
.chromalab-sort--faced .chromalab-sort__select,
.chromalab-sort--faced select.orderby {
	color: transparent;
	-webkit-text-fill-color: transparent;
}

/* Keep the dropdown list readable — options otherwise inherit the transparent
   colour AND text-fill from the select, which would render the open list blank.
   Text-primary (70%) to match the face + body copy. */
.chromalab-sort--faced .chromalab-sort__select option {
	color: var(--un-text);
	-webkit-text-fill-color: var(--un-text);
}

.chromalab-sort__face {
	position: absolute;
	top: 50%;
	left: 24px;
	right: 19px;
	transform: translateY(-50%);
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	font-size: 15px;
	line-height: 1.3em;
	color: var(--un-text);
	pointer-events: none;
}

@media (max-width: 767px) {
	.chromalab-sort {
		width: 100%;
	}
}
