/* pb-dropdown — a vanilla custom listbox that replaces the OS-native open option
   list of selected <select>s on SERVER-RENDERED pages (report-reason modals, the
   shop "Sort by", dashboard cancel-reason + tracking-carrier). It is styled to
   EXACTLY match the react-select (.pb-rs) look used in the product editor
   (add-product-vinted.css, measured live 2026-06-03) so every dropdown on the
   site reads as one component instead of an OS-dark native list.

   The native <select> stays in the DOM as the form CARRIER: invisible + click-
   through + out of the tab order, but NOT display:none, so `required` validation
   and form submission still work (it overlays the trigger, so a validation bubble
   lands on the control). The open menu is portaled to <body> with position:fixed
   so it escapes a modal's overflow:hidden — the same approach as .pb-rs-portal.

   Values copied verbatim from .pb-rs:
     control 40px · 1px #cbd5e1 · radius 10 · white · 14px · placeholder #828282
     hover border #94a3b8 · focus/open border #2095b8 + 0 0 0 1px #2095b8 ring
     menu radius 4 · shadow 0 0 0 1px rgba(0,0,0,.1), 0 4px 11px rgba(0,0,0,.1)
     option 8px 12px · active/selected bg #efeaff text #461aca */

.pb-dropdown { position: relative; display: block; width: 100%; }
.pb-dropdown--inline { display: inline-block; width: auto; vertical-align: middle; }

/* native carrier — present (so it submits + validates) but invisible + click-through.
   Scoped under .pb-dropdown (0,2,0) so a single-class report/cancel select rule can
   never out-cascade it and make the carrier visible (review NIT #5). */
.pb-dropdown .pb-dropdown__native {
	position: absolute; inset: 0; width: 100%; height: 100%;
	margin: 0; padding: 0; border: 0; opacity: 0; pointer-events: none;
	-webkit-appearance: none; -moz-appearance: none; appearance: none;
}

/* trigger = the closed control */
.pb-dropdown__trigger {
	display: flex; align-items: center; justify-content: space-between; gap: 8px;
	box-sizing: border-box;
	/* !important throughout: the trigger is a <button>, and theme/modal button
	   rules (Motta's button{min-width:160px;line-height:60}, the report modal's
	   teal button fill) otherwise override the control's look. */
	width: 100% !important; min-width: 0 !important; min-height: 40px !important;
	height: auto !important; margin: 0 !important; padding: 2px 12px !important;
	background: #fff !important; border: 1px solid #cbd5e1 !important;
	border-radius: 10px !important; box-shadow: none !important;
	font-size: 14px !important; line-height: 1.3 !important; font-weight: 400 !important;
	color: #1e1e1e !important; text-align: left !important; text-transform: none !important;
	letter-spacing: normal !important; cursor: pointer;
	-webkit-appearance: none; -moz-appearance: none; appearance: none;
}
.pb-dropdown--inline .pb-dropdown__trigger { display: inline-flex; width: auto !important; }
.pb-dropdown__trigger:hover { border-color: #94a3b8 !important; }
.pb-dropdown.is-open .pb-dropdown__trigger,
.pb-dropdown__trigger:focus-visible {
	border-color: #2095b8 !important; box-shadow: 0 0 0 1px #2095b8 !important; outline: none;
}
.pb-dropdown__trigger:focus { outline: none; }
/* invalid `required` carrier surfaces here (native bubble is suppressed — it would
   anchor to the invisible carrier). */
.pb-dropdown--error .pb-dropdown__trigger {
	border-color: #dc2626 !important; box-shadow: 0 0 0 1px #dc2626 !important;
}
.pb-dropdown__label {
	overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
	color: #1e1e1e !important;
}
.pb-dropdown__trigger.is-placeholder .pb-dropdown__label { color: #828282 !important; }
.pb-dropdown__chevron {
	flex: 0 0 auto; display: inline-flex; width: 20px; height: 20px;
	color: #64748b !important; transition: transform .15s ease;
}
.pb-dropdown.is-open .pb-dropdown__chevron { transform: rotate(180deg); }

/* menu — portaled to <body>, position:fixed (left/top/width set inline by JS) */
.pb-dropdown__menu {
	position: fixed; z-index: 100000; margin: 0; padding: 4px 0;
	list-style: none; background: #fff; border-radius: 4px;
	box-shadow: 0 0 0 1px rgba(0,0,0,.1), 0 4px 11px rgba(0,0,0,.1);
	font-size: 14px; max-height: 280px; overflow-y: auto; box-sizing: border-box;
}
.pb-dropdown__option {
	padding: 8px 12px; cursor: pointer; color: #1e1e1e;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pb-dropdown__option.is-active,
.pb-dropdown__option[aria-selected="true"] {
	background-color: #efeaff; color: #461aca;
}
.pb-dropdown__option[aria-disabled="true"] {
	color: #b6bcc4; cursor: default; background: none;
}
