/* The Trend feed's filter: the button under the way out and its sheet (components/lent/LentFilter.tsx). A sheet like the feed's own menu - the paper,
   the grip, the rise from the floor - with the catalogue's questions as chips. Its own file, inlined by LentPage: the
   feed's cut of style.css stays as it is. Pills are 9px, never a capsule. */

/* The site's own picker (components/forms/Combo.tsx) for a page whose cut of style.css never met one - the Trend
   feed's filter sheet. The rules are style.css's own (.field-input and .rm-picker-*, single choice), so the picker
   looks here as it does in the forms. Pulled in by name from another front-style. */
.field-input{
  display:flex; align-items:center; gap:10px; height:50px; padding:0 16px;
  background:var(--white); border:1px solid var(--line); border-radius:13px; transition:border-color .15s;
}
.field-input:focus-within{ border-color:var(--accent); }
.field-input i{ font-size:18px; color:var(--ink-3); flex:none; }

.rm-picker{ position:relative; min-width:0; }
.rm-picker[hidden]{ display:none; }
.rm-picker-trigger{ width:100%; text-align:left; cursor:pointer; color:var(--ink); font:inherit; font-size:16px; }
.rm-picker.is-open .rm-picker-trigger{ border-color:var(--accent); }
.rm-picker-label{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rm-picker.is-empty .rm-picker-label{ color:var(--ink-3); font-weight:500; }
.rm-picker-clear{ display:none; font-size:14px; color:var(--ink-3); flex:none; padding:2px; border-radius:6px; }
.rm-picker:not(.is-empty) .rm-picker-clear{ display:inline-flex; }
@media (hover:hover) and (pointer:fine){
  .rm-picker-clear:hover{ color:var(--ink); }
}
.rm-picker-caret{ font-size:13px; color:var(--ink-3); flex:none; transition:transform .15s ease; }
.rm-picker.is-open .rm-picker-caret{ transform:rotate(180deg); }
/* The box of two buttons, the opener and the «×» (style.css says why); the opener takes the box's font,
   as the trigger it was did here. */
.rm-picker-open{ display:flex; align-items:center; gap:inherit; flex:1; min-width:0; align-self:stretch; margin:0; padding:0; color:inherit; font:inherit; text-align:left; cursor:pointer; }
.rm-picker-trigger:has(.rm-picker-open:focus-visible){ outline:2px solid var(--accent); outline-offset:2px; }
button.rm-picker-clear{ margin:0; cursor:pointer; }
.field-input .rm-picker-clear{ font-size:18px; }
.field-input .rm-picker-clear:focus-visible{ outline:2px solid var(--accent); outline-offset:1px; }

.rm-picker-panel{
  position:absolute; left:0; right:0; top:calc(100% + 6px); z-index:70;
  background:var(--white); border:1px solid var(--line); border-radius:13px;
  box-shadow:0 24px 50px -18px rgba(27,25,22,.3); padding:10px;
  max-height:min(400px, 62vh);
  display:flex; flex-direction:column;
}
.rm-picker-panel[hidden]{ display:none; }
.rm-picker-search{
  display:flex; align-items:center; gap:10px; padding:11px 13px; margin-bottom:8px;
  border:1px solid var(--line-soft); border-radius:10px; background:var(--paper); flex:none;
}
.rm-picker-search i{ font-size:17px; color:var(--ink-3); flex:none; }
.rm-picker-search-input{
  flex:1; min-width:0; border:none; background:none; font:inherit; font-size:16px; color:var(--ink);
}
.rm-picker-search-input:focus{ outline:none; }
/* The search row shows the focus its input does not. */
.rm-picker-search:focus-within{ border-color:var(--accent); }
.rm-picker-search[hidden]{ display:none; }
.rm-picker-list{ list-style:none; margin:0; padding:0; overflow-y:auto; }
.rm-picker-list li{
  padding:12px 13px; border-radius:9px; font-size:16px; font-weight:500; color:var(--ink-2);
  cursor:pointer; transition:background .12s;
}
@media (hover:hover) and (pointer:fine){ .rm-picker-list li:hover{ background:var(--paper); } }
.rm-picker-list li.is-active{ background:var(--paper); }
.rm-picker-list li.is-selected{ color:var(--accent); font-weight:700; }
.rm-picker-empty{ margin:12px 0 6px; text-align:center; font-size:14.5px; color:var(--ink-3); }
.rm-picker-empty[hidden]{ display:none; }



.lent-filter-btn{ position:relative; }
.lent-filter-btn svg{ width:26px; height:26px; }
.lent-filter-count{
  position:absolute; top:3px; right:-3px;
  min-width:17px; height:17px; padding:0 4px; border-radius:9px;
  background:var(--accent); color:#fff;
  font-size:10.5px; font-weight:700; line-height:17px; text-align:center;
  font-variant-numeric:tabular-nums;
}

.lent-filter{ position:fixed; inset:0; z-index:75; display:flex; align-items:flex-end; justify-content:center; }
.lent-filter[hidden]{ display:none; }
/* Up from the floor, back down to it, on the curve every sheet of the feed travels (.lent-sheet-box in style.css):
   the rise an animation (it has its starting place in it), the fall a transition from wherever the finger left it. */
.lent-filter-veil{ position:absolute; inset:0; background:rgba(8,7,9,.62); opacity:0; transition:opacity .24s ease; }
.lent-filter.is-open .lent-filter-veil{ opacity:1; animation:lentFilterVeil .24s ease; }
@keyframes lentFilterVeil{ from{ opacity:0; } }

.lent-filter-box{
  position:relative; width:100%; max-width:560px;
  max-height:84vh; max-height:84dvh;
  display:flex; flex-direction:column; margin:0;
  background:var(--paper); color:var(--ink);
  border-radius:18px 18px 0 0; box-shadow:0 -12px 40px rgba(0,0,0,.35);
  transition:transform .28s cubic-bezier(.32,.72,0,1); will-change:transform;
}
.lent-filter.is-open .lent-filter-box{ animation:lentFilterRise .28s cubic-bezier(.32,.72,0,1); }
.lent-filter.is-still .lent-filter-box,
.lent-filter.is-open .lent-filter-box.is-dragging{ animation:none; }
@keyframes lentFilterRise{ from{ transform:translateY(100%); } }

/* The bar is the handle: a grip and the title, as the comments sheet has (.lent-sheet-bar). */
.lent-filter-bar{
  position:relative; flex:none; padding:10px 12px;
  border-bottom:1px solid var(--line-soft);
  touch-action:none; cursor:grab; text-align:center;
}
.lent-filter-box.is-dragging .lent-filter-bar{ cursor:grabbing; }
.lent-filter-grip{ display:block; width:38px; height:4px; margin:0 auto 8px; border-radius:9px; background:var(--line); }
.lent-filter-title{ display:block; font-size:14.5px; font-weight:700; color:var(--ink); }

.lent-filter-body{
  flex:1 1 auto; min-height:0; overflow-y:auto; overscroll-behavior:contain;
  padding:12px 12px 14px; display:flex; flex-direction:column; gap:10px;
}
/* Each question a block of its own, as the feed's menu groups its rows (.lent-menu-group). */
.lent-filter-group{ display:block; min-width:0; margin:0; padding:14px; border:0; border-radius:14px; background:var(--white); }
.lent-filter-group legend, .lent-filter-label{
  display:block; float:left; width:100%; padding:0; margin:0 0 10px;
  font-size:13px; font-weight:700; color:var(--ink-2);
}
.lent-filter-group legend + *{ clear:both; }
/* A section's questions stand in the form while another section is chosen, hidden (LentFilter.tsx). */
.lent-filter-group[hidden]{ display:none; }

.lent-filter-chips{ display:flex; flex-wrap:wrap; gap:8px; }
.lent-filter-chip{ position:relative; display:inline-flex; cursor:pointer; }
.lent-filter-chip input{ position:absolute; opacity:0; width:1px; height:1px; pointer-events:none; }
.lent-filter-chip span{
  display:inline-flex; align-items:center; height:38px; padding:0 14px;
  border:1px solid var(--line-soft); border-radius:9px; background:var(--paper);
  font-size:14px; font-weight:600; color:var(--ink); white-space:nowrap;
  transition:background-color .12s ease, border-color .12s ease, color .12s ease;
}
.lent-filter-chip span i{ margin-right:6px; font-size:16px; color:var(--ink-3); }
.lent-filter-chip input:checked + span{ background:var(--accent); border-color:var(--accent); color:#fff; }
.lent-filter-chip input:checked + span i{ color:#fff; }
.lent-filter-chip input:focus-visible + span{ outline:2px solid var(--accent); outline-offset:2px; }

/* The town: the site's picker, its list opening in the block rather than over the sheet's scroll. */
.lent-filter .rm-picker-trigger{ height:46px; padding:0 14px; background:var(--paper); border-color:var(--line-soft); font-size:15px; }
.lent-filter .rm-picker.is-open .rm-picker-trigger{ border-color:var(--accent); }
.lent-filter .rm-picker-panel{ position:static; margin-top:8px; max-height:300px; box-shadow:none; border-color:var(--line-soft); }

.lent-filter-range{ display:flex; align-items:center; gap:8px; }
.lent-filter-range input{
  flex:1; min-width:0; height:46px; padding:0 14px;
  border:1px solid var(--line-soft); border-radius:13px; background:var(--paper); color:var(--ink);
  font:inherit; font-size:15px;
}
.lent-filter-range span{ color:var(--ink-3); }
.lent-filter-range input:focus{ outline:none; border-color:var(--accent); }

/* "Temirli": a row with a switch, as the menu's auto-advance row. */
.lent-filter-switch{ display:flex; align-items:center; justify-content:space-between; gap:12px; cursor:pointer; }
.lent-filter-switch span{ font-size:15px; font-weight:600; color:var(--ink); }
.lent-filter-switch input{ position:absolute; opacity:0; width:1px; height:1px; pointer-events:none; }
.lent-filter-switch i{
  position:relative; flex:none; width:46px; height:28px; border-radius:14px;
  background:var(--line); transition:background-color .18s ease;
}
.lent-filter-switch i::after{
  content:""; position:absolute; top:3px; left:3px; width:22px; height:22px; border-radius:50%;
  background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.25); transition:transform .18s ease;
}
.lent-filter-switch input:checked + i{ background:var(--accent); }
.lent-filter-switch input:checked + i::after{ transform:translateX(18px); }
.lent-filter-switch input:focus-visible + i{ outline:2px solid var(--accent); outline-offset:2px; }

.lent-filter-foot{
  flex:none; display:flex; gap:10px;
  padding:12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top:1px solid var(--line-soft);
}
.lent-filter-reset, .lent-filter-apply{
  flex:1; height:48px; padding:0; display:inline-flex; align-items:center; justify-content:center;
  border-radius:12px; font:inherit; font-size:15px; font-weight:700; text-decoration:none; cursor:pointer;
}
/* Two equal halves, «Sıfırla» the quiet grey one — as the site's own sheets (the town picker's .loc-foot-reset): a
   narrower bordered button beside the red one read as a different kind of thing. */
.lent-filter-reset{ border:0; background:var(--line-soft); color:var(--ink-2); font-weight:600; }
@media (hover:hover) and (pointer:fine){ .lent-filter-reset:hover{ background:rgba(var(--ink-rgb),.14); } }
.lent-filter-apply{ border:0; background:var(--accent); color:#fff; }
.lent-filter-reset:active, .lent-filter-apply:active{ transform:scale(.98); }

/* The empty feed's second way out, under the "change the filter" button. */
.lent-empty .lent-filter-plain{
  display:inline-flex; align-items:center; justify-content:center; margin:10px auto 0;
  height:44px; padding:0 18px; border-radius:12px;
  border:1px solid rgba(255,255,255,.35); color:#fff; text-decoration:none; font-weight:600;
}
.lent-empty [data-lent-filter-open]{ display:flex; margin:0 auto; }

/* On a desktop the feed is a card in a room, and its sheets stand on the card: its width, on its bottom edge,
   all four corners round - the geometry style.css gives .lent-menu-box (--lent-card-* on .page-lent). `right`
   and `bottom`, not a transform: the rise is a transform. */
@media (min-width:769px){
  .lent-filter-box{
    width:var(--lent-card-w); max-width:var(--lent-card-w);
    right:var(--lent-card-mid); bottom:var(--lent-card-edge);
    max-height:calc(var(--lent-card-h) - 64px);
    border-radius:18px;
  }
}

@media (prefers-reduced-motion:reduce){
  .lent-filter.is-open .lent-filter-box, .lent-filter.is-open .lent-filter-veil{ animation:none; }
  .lent-filter-box{ transition:none; }
}
