/* The browser select remains available until JavaScript enhances this control. */
.results-tools .sort-control.sort-enhanced{position:relative;width:270px;max-width:100%;min-width:0}
.sort-control.sort-enhanced>label{position:absolute}
.sort-control.sort-enhanced>span{display:none}
.sort-trigger{display:flex;align-items:center;gap:8px;width:100%;min-width:0;min-height:48px;padding:11px 13px;border:1px solid var(--line);border-radius:6px;background:#fff;text-align:left;transition:border-color .15s,box-shadow .15s}
.sort-trigger:hover{border-color:#b5c7e2}
.sort-trigger[aria-expanded=true]{border-color:#87a8dc;box-shadow:0 0 0 3px #edf3fc}
.sort-trigger-caption{flex-shrink:0;color:var(--muted);font-size:.75rem;font-weight:400;line-height:24px}
.sort-trigger-value{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--ink);font-size:.8125rem;font-weight:500;line-height:24px}
.sort-trigger-chevron{width:16px;height:16px;margin-left:auto;color:#536278;stroke-width:1.8;transition:transform .15s}
.sort-trigger[aria-expanded=true] .sort-trigger-chevron{transform:rotate(180deg)}
.sort-trigger:disabled{cursor:default;color:var(--muted);background:#f6f8fb}
.sort-options{position:absolute;z-index:35;right:0;top:calc(100% + 8px);width:min(350px,calc(100vw - 24px));max-height:min(440px,calc(100dvh - 32px));overflow-y:auto;overscroll-behavior:contain;padding:6px;border:1px solid #dfe6f0;border-radius:10px;background:#fff;box-shadow:0 12px 35px #182d4c1f;scrollbar-width:thin;scrollbar-color:#c9d4e5 transparent;animation:sort-menu-in .12s ease-out;transform-origin:top right}
.sort-opens-up .sort-options{top:auto;bottom:calc(100% + 8px);transform-origin:bottom right}
.sort-option{display:flex;align-items:center;gap:14px;min-height:44px;padding:11px 12px;border-radius:5px;color:var(--ink);font-size:.8125rem;line-height:1.4;cursor:pointer}
.sort-option-copy{min-width:0;flex:1}
.sort-option-copy>span{display:block}
.sort-option-copy small{display:block;margin-top:3px;font-size:.6875rem;font-weight:400;color:var(--muted);line-height:1.5}
.sort-option-check{width:18px;height:18px;opacity:0;stroke-width:2;color:var(--green)}
.sort-option[aria-selected=true]{color:var(--green);font-weight:600;background:#f0f5fd}
.sort-option[aria-selected=true] .sort-option-check{opacity:1}
.sort-option.is-active{background:#e9f0fb}
.sort-option.is-active:not([aria-selected=true]){color:var(--green-dark)}
.filter-star-rating{min-width:0;margin:18px 0 0;padding:0;border:0}
.filter-star-rating legend{margin:0 0 3px;padding:0;color:var(--ink);font-size:.8125rem;font-weight:500}
.filter-star-rating label{display:inline-flex;flex-direction:row;align-items:center;gap:8px;min-height:44px;font-size:.8125rem;font-weight:400;line-height:1.5;cursor:pointer}
.filter-star-rating input[type=checkbox]{width:18px;height:18px;min-width:18px;max-width:18px;min-height:0;flex:0 0 18px;margin:0;padding:0;accent-color:var(--green)}
@keyframes sort-menu-in{from{opacity:0;transform:translateY(-3px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:760px){.results-tools .sort-control.sort-enhanced{flex:1;width:auto;max-width:270px}.sort-trigger{gap:7px;padding-inline:11px}.sort-options{border-radius:8px}.sort-option{min-height:46px;padding:12px}}
@media(max-width:360px){.sort-trigger{gap:6px;padding-inline:8px}.sort-trigger-caption{font-size:.6875rem}.sort-trigger-value{font-size:.75rem}.sort-trigger-chevron{width:14px;height:14px}}
@media(prefers-reduced-motion:reduce){.sort-trigger,.sort-trigger-chevron{transition:none}.sort-options{animation:none}}
