/* LAB offers filter sheet — ReUI-like facet panel (vanilla LAB tokens) */

.lab-offers-sheet {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    justify-content: flex-end;
    pointer-events: none;
}

.lab-offers-sheet:not([hidden]) {
    pointer-events: auto;
}

.lab-offers-sheet[hidden] {
    display: none !important;
}

.lab-offers-sheet__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(18, 32, 58, 0.28);
}

.lab-offers-sheet__panel {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(400px, 100vw);
    height: 100%;
    background: #fff;
    box-shadow: -12px 0 40px rgba(18, 32, 58, 0.14);
    box-sizing: border-box;
}

.lab-offers-sheet__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex: 0 0 auto;
    padding: 16px 18px;
    border-bottom: 1px solid var(--lab-line, #e8ecf0);
}

.lab-offers-sheet__title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--lab-ink, #12203a);
}

.lab-offers-sheet__head-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.lab-offers-sheet__clear {
    appearance: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--lab-muted, #6b7280);
    font: inherit;
    font-size: 0.84rem;
    font-weight: 650;
    cursor: pointer;
    transition: color 0.15s ease;
}

.lab-offers-sheet__clear:hover:not(:disabled) {
    color: var(--lab-ink, #12203a);
}

.lab-offers-sheet__clear:disabled {
    opacity: 0.4;
    cursor: default;
}

.lab-offers-sheet__close {
    appearance: none;
    box-sizing: border-box;
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--lab-line, #e8ecf0);
    border-radius: 10px;
    background: #fff;
    color: var(--lab-ink, #12203a);
    font: inherit;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.lab-offers-sheet__close:hover {
    background: #f7f8fa;
    border-color: #c5ced6;
}

.lab-offers-sheet__body {
    flex: 1 1 auto;
    overflow: auto;
    padding: 8px 16px 28px;
    -webkit-overflow-scrolling: touch;
}

.lab-offers-sheet__active {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0 16px;
    padding: 0 0 14px;
    border-bottom: 1px dashed var(--lab-line, #e8ecf0);
}

.lab-offers-sheet__active[hidden] {
    display: none !important;
}

.lab-offers-sheet__chip {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 6px 10px;
    border: 1px solid rgba(18, 32, 58, 0.14);
    border-radius: 999px;
    background: #fff;
    color: var(--lab-ink, #12203a);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.lab-offers-sheet__chip:hover {
    background: #f7f8fa;
    border-color: rgba(18, 32, 58, 0.28);
}

.lab-offers-sheet__chip-x {
    color: var(--lab-muted, #6b7280);
    font-size: 0.95rem;
    line-height: 1;
}

.lab-offers-sheet__block {
    margin: 0 0 4px;
    padding: 14px 0;
    border-bottom: 1px solid var(--lab-line, #e8ecf0);
}

.lab-offers-sheet__block-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 12px;
}

.lab-offers-sheet__block-title {
    margin: 0 0 12px;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--lab-ink, #12203a);
}

.lab-offers-sheet__block-head .lab-offers-sheet__block-title {
    margin: 0;
}

.lab-offers-sheet__price-val {
    color: var(--lab-ink, #12203a);
    font-size: 0.9rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.lab-offers-sheet__price-sliders {
    margin: 0 4px;
}

.lab-offers-sheet .kit-lab-price__sliders {
    --lab-price-lo: 0%;
    --lab-price-hi: 100%;
    position: relative;
    height: 36px;
}

.lab-offers-sheet .kit-lab-price__sliders::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 3px;
    margin-top: -1.5px;
    border-radius: 999px;
    background: rgba(18, 32, 58, 0.14);
    pointer-events: none;
}

.lab-offers-sheet .kit-lab-price__sliders::after {
    content: '';
    position: absolute;
    left: var(--lab-price-lo);
    width: calc(var(--lab-price-hi) - var(--lab-price-lo));
    top: 50%;
    height: 3px;
    margin-top: -1.5px;
    border-radius: 999px;
    background: var(--lab-ink, #12203a);
    pointer-events: none;
}

.lab-offers-sheet .kit-lab-price__sliders input[type='range'] {
    -webkit-appearance: none;
    appearance: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    width: 100%;
    height: 36px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    pointer-events: none;
    outline: none;
}

.lab-offers-sheet .kit-lab-price__sliders input[type='range']::-webkit-slider-runnable-track,
.lab-offers-sheet .kit-lab-price__sliders input[type='range']::-moz-range-track {
    height: 3px;
    border: 0;
    background: transparent;
}

.lab-offers-sheet .kit-lab-price__sliders input[type='range']::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    pointer-events: auto;
    box-sizing: border-box;
    width: 18px;
    height: 18px;
    margin-top: -7.5px;
    border: 1.5px solid rgba(18, 32, 58, 0.22);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(18, 32, 58, 0.16);
    cursor: grab;
}

.lab-offers-sheet .kit-lab-price__sliders input[type='range']::-moz-range-thumb {
    pointer-events: auto;
    box-sizing: border-box;
    width: 18px;
    height: 18px;
    border: 1.5px solid rgba(18, 32, 58, 0.22);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(18, 32, 58, 0.16);
    cursor: grab;
}

.lab-offers-sheet .kit-lab-price__sliders #labSheetPriceMax {
    z-index: 2;
}

.lab-offers-sheet .kit-lab-price__sliders #labSheetPriceMin {
    z-index: 3;
}

.lab-offers-sheet__rating {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.lab-offers-sheet__rate-row {
    appearance: none;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin: 0;
    padding: 10px 2px;
    border: 0;
    background: none;
    color: var(--lab-ink, #12203a);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.lab-offers-sheet__radio {
    flex: none;
    box-sizing: border-box;
    width: 18px;
    height: 18px;
    border: 1.5px solid rgba(18, 32, 58, 0.28);
    border-radius: 50%;
    background: #fff;
}

.lab-offers-sheet__rate-row.is-on .lab-offers-sheet__radio {
    border-color: var(--lab-ink, #12203a);
    border-width: 5px;
}

.lab-offers-sheet__stars {
    display: inline-flex;
    gap: 2px;
    flex: none;
}

.lab-offers-sheet__stars svg {
    display: block;
    width: 20px;
    height: 20px;
}

.lab-offers-sheet__stars svg.is-on {
    color: #f5b301;
}

.lab-offers-sheet__stars svg.is-off {
    color: #d1d5db;
}

.lab-offers-sheet__toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 40px;
    font-size: 0.92rem;
    font-weight: 650;
    color: var(--lab-ink, #12203a);
}

.lab-offers-sheet__switch {
    appearance: none;
    position: relative;
    flex: none;
    width: 44px;
    height: 26px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #e5e7eb;
    cursor: pointer;
    transition: background 0.15s ease;
}

.lab-offers-sheet__switch.is-on,
.lab-offers-sheet__switch[aria-checked='true'] {
    background: var(--lab-ink, #12203a);
}

.lab-offers-sheet__switch-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(18, 32, 58, 0.2);
    transition: transform 0.15s ease;
}

.lab-offers-sheet__switch.is-on .lab-offers-sheet__switch-knob,
.lab-offers-sheet__switch[aria-checked='true'] .lab-offers-sheet__switch-knob {
    transform: translateX(18px);
}

.lab-offers-sheet__sec {
    margin: 0 0 6px;
    border: 1px solid var(--lab-line, #e8ecf0);
    border-radius: 12px;
    background: #fafbfc;
    overflow: hidden;
}

.lab-offers-sheet__sec-sum {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 12px 14px;
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--lab-ink, #12203a);
    user-select: none;
}

.lab-offers-sheet__sec-sum > span:first-child {
    flex: 1 1 auto;
    min-width: 0;
}

.lab-offers-sheet__sec-count {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 5px;
    border-radius: 999px;
    background: rgba(18, 32, 58, 0.1);
    color: var(--lab-ink, #12203a);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
}

.lab-offers-sheet__sec-count[hidden] {
    display: none !important;
}

.lab-offers-sheet__sec.has-sel > .lab-offers-sheet__sec-sum {
    color: var(--lab-ink, #12203a);
}

.lab-offers-sheet__sec-sum::-webkit-details-marker {
    display: none;
}

.lab-offers-sheet__sec-sum::after {
    content: '';
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    margin: 0;
    border-right: 2px solid #94a3b8;
    border-bottom: 2px solid #94a3b8;
    transform: rotate(45deg);
    transition: transform 0.15s ease;
}

.lab-offers-sheet__sec[open] > .lab-offers-sheet__sec-sum::after {
    transform: rotate(-135deg);
}

.lab-offers-sheet__sec-body {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 12px 14px;
}

.lab-offers-sheet__sec-body--stack {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
}

.lab-offers-sheet__sec-sum--price > span:first-child {
    flex: 0 1 auto;
}

.lab-offers-sheet__sec-sum--price .lab-offers-sheet__price-val {
    margin-left: auto;
    font-weight: 700;
}

.lab-offers-sheet__time {
    gap: 8px;
}

.lab-offers-sheet .kit-lab-filter-act,
.lab-offers-sheet .kit-lab-time-preset {
    background: #fff;
}

.home-page--lab-blank .kit-lab-offers-filter.is-on {
    border-color: transparent;
    background: var(--lab-lime, #ddedad);
}

.home-page--lab-blank .kit-lab-offers-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 5px;
    border-radius: 999px;
    background: rgba(18, 32, 58, 0.1);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
}

.home-page--lab-blank .kit-lab-offers-filter-count[hidden] {
    display: none !important;
}

@media (max-width: 520px) {
    .lab-offers-sheet__panel {
        width: 100vw;
    }
}
