/* Rentals for a friend, on the House style (stijl.css). Phone first; filters become a
   sidebar from 900px. Nothing here may be wider than the screen: rows of choices are
   grids, the photo strip scrolls inside its own box. */
:root { --accent: #4c56b5; }
/* Same selector as stijl.css's dark block: a plain :root inside the query would lose. */
@media (prefers-color-scheme: dark) { :root:not([data-thema="licht"]) { --accent: #9aa2f0; } }

body { padding: 12px 16px 4rem; overflow-x: hidden; }
main { max-width: 1240px; margin: 0 auto; }
header h1 { font-size: 1.35rem; }
header .sub { margin-bottom: .6rem; font-size: .9rem; }
#login form, #consume { display: grid; gap: 10px; }
#login input { min-height: var(--tik); }
#login, #consume { max-width: 28rem; }
.message { color: var(--zacht); }
.message.error { color: var(--gevaar); }
button, a.knop, select, input { min-height: var(--tik); }
button.klein, a.klein { min-height: 36px; }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: .2rem 0 .6rem;
  color: var(--zacht); font-size: .9rem; }

/* -- filters ----------------------------------------------------------- */
.layout { display: grid; gap: 12px; }
.filters { margin-top: 0; padding: 0; }
.filters summary { cursor: pointer; padding: .7rem .85rem; min-height: var(--tik); display: flex; gap: .5rem;
  align-items: baseline; flex-wrap: wrap; list-style: none; }
.filters summary::-webkit-details-marker { display: none; }
.filters summary::before { content: "▸"; color: var(--zacht); }
.filters[open] summary::before { content: "▾"; }
.filter-title { font-weight: 600; }
.filter-summary-text { color: var(--zacht); font-size: .85rem; min-width: 0; overflow-wrap: anywhere; }
.filter-body { display: grid; gap: .6rem; padding: 0 .85rem .85rem; }

.group { border: var(--vlak-lijn); border-radius: var(--r); padding: .45rem .55rem .55rem; margin: 0; min-width: 0; }
.group legend { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--zacht); padding: 0 .3rem; }
.group .kind { text-transform: none; letter-spacing: 0; color: var(--flauw); margin-left: .3rem; }
.group:disabled { opacity: .45; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(7.6rem, 1fr)); gap: .4rem; }
.check { display: flex; align-items: center; justify-content: center; gap: .4rem; min-height: var(--tik); min-width: 0;
  border: 1px solid var(--rand-sterk); border-radius: var(--r-pil); padding: 0 .5rem; cursor: pointer; font-size: .9rem; }
.check input { width: 18px; height: 18px; min-height: 0; margin: 0; flex: none; }
.check > span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.check:has(input:checked) { border-color: var(--accent); background: var(--accent-zacht); font-weight: 600; }
.segment { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); border: 1px solid var(--rand-sterk);
  border-radius: var(--r-pil); overflow: hidden; }
.segment label { position: relative; display: flex; cursor: pointer; min-width: 0; }
.segment label + label { border-left: 1px solid var(--rand-sterk); }
.segment input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.segment label > span { flex: 1; display: flex; align-items: center; justify-content: center; gap: .25rem;
  min-height: var(--tik); padding: 0 .3rem; white-space: nowrap; color: var(--zacht); font-size: .9rem; }
.segment input:checked + span { background: var(--accent); color: var(--accent-tekst); font-weight: 600; }
.segment input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -4px; border-radius: var(--r-pil); }
.telling { font-size: .78rem; font-weight: 400; color: inherit; opacity: .8; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.field { display: grid; gap: .2rem; font-size: .78rem; color: var(--zacht); min-width: 0; }
.field input, .field select { width: 100%; min-width: 0; font-size: 1rem; color: var(--tekst); }  /* 16px: no iOS zoom */
.wide { grid-column: 1 / -1; }
.group .hint { margin: .4rem 0 0; }
.filter-foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; align-items: end; }

@media (min-width: 900px) {
  .layout { grid-template-columns: 320px minmax(0, 1fr); align-items: start; }
  .filters { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; }
}

/* -- listing cards ----------------------------------------------------- */
.results { min-width: 0; }
.list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.pinned-bar { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin: 0 0 .6rem;
  font-size: .88rem; }
.listing { display: flex; flex-direction: column; min-width: 0; background: var(--paneel); border: var(--vlak-lijn);
  box-shadow: var(--vlak-schaduw); border-radius: var(--r-groot); overflow: hidden; scroll-margin-top: 12px; }
.listing.pinned { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.listing.dimmed .photo, .listing.dimmed .card-body > :not(.actions):not(.note) { opacity: .55; }
.listing.starred { border-color: var(--accent); }

.photo { position: relative; aspect-ratio: 4 / 3; background: var(--paneel-2); }
.photo-strip { display: flex; height: 100%; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none; }
.photo-strip::-webkit-scrollbar { display: none; }
.photo-strip img { flex: none; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; display: block; }
.no-photo { flex: none; width: 100%; display: grid; place-items: center; color: var(--flauw); font-size: .85rem; }
.labels { position: absolute; left: .5rem; top: .5rem; right: .5rem; display: flex; flex-wrap: wrap; gap: .3rem;
  pointer-events: none; }
.verdict, .badge { padding: .15rem .55rem; border-radius: var(--r-pil); font-size: .75rem; font-weight: 700;
  letter-spacing: .02em; }
.verdict { background: var(--paneel); border: 1px solid var(--rand); }
.verdict.match { color: var(--goed); border-color: var(--goed); }
.verdict.maybe { color: var(--waarschuwing); border-color: var(--waarschuwing); }
.verdict.no { color: var(--gevaar); border-color: var(--gevaar); }
.badge { background: var(--accent); color: var(--accent-tekst); }
.badge.changed { background: var(--waarschuwing); color: var(--paneel); }
.badge.gone { background: var(--gevaar); color: var(--paneel); }
.badge.option { background: var(--paneel); color: var(--tekst); border: 1px solid var(--rand-sterk); }
.photo-count { position: absolute; right: .5rem; bottom: .5rem; padding: .1rem .5rem; border-radius: var(--r-pil);
  font-size: .72rem; background: rgb(0 0 0 / .55); color: #fff; pointer-events: none; }
.photo-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; min-height: 0; padding: 0;
  border-radius: 50%; border: 0; background: rgb(0 0 0 / .45); color: #fff; font-size: 1.3rem; line-height: 1;
  display: none; }
.photo-btn.prev { left: .4rem; }
.photo-btn.next { right: .4rem; }
@media (hover: hover) { .photo-btn { display: block; } }

.card-body { padding: .7rem .8rem .8rem; display: grid; gap: .45rem; flex: 1; align-content: start; min-width: 0; }
.listing h2 { font-size: 1.05rem; margin: 0; line-height: 1.25; overflow-wrap: anywhere; }
.listing h2:focus { outline: none; }
.place { color: var(--zacht); font-size: .85rem; overflow-wrap: anywhere; }
.change { font-size: .82rem; color: var(--waarschuwing); border-left: 3px solid var(--waarschuwing); padding-left: .45rem; }
.price-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .6rem; }
.price { font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.price small { font-weight: 400; color: var(--zacht); font-size: .8rem; }
.price-note, .terms { color: var(--zacht); font-size: .82rem; overflow-wrap: anywhere; }
.specs { display: flex; flex-wrap: wrap; gap: .3rem; font-size: .82rem; }
.specs span { padding: .05rem .5rem; border-radius: var(--r-pil); background: var(--paneel-2); }
.contract { margin: 0; font-size: .85rem; color: var(--zacht); overflow-wrap: anywhere; white-space: pre-line; }
.criteria { margin: 0; padding: 0; list-style: none; font-size: .82rem; display: grid; gap: .15rem; }
.criteria .unmet { color: var(--gevaar); }
.criteria .unknown { color: var(--waarschuwing); }

.note summary { cursor: pointer; color: var(--zacht); font-size: .85rem; min-height: 32px; display: flex; align-items: center; }
.note textarea { min-height: 4.5rem; font-size: 1rem; margin-top: .2rem; }
.note-status { display: block; font-size: .75rem; color: var(--zacht); min-height: 1em; }

.actions { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: .4rem; padding-top: .2rem; }
.actions a.knop { display: flex; align-items: center; justify-content: center; text-align: center; min-width: 0; }
.actions .off { opacity: .5; pointer-events: none; }
.actions .star { font-size: 1.15rem; min-width: var(--tik); padding: 0 .5rem; }
.actions .star.on { color: var(--accent); border-color: var(--accent); background: var(--accent-zacht); }
.actions .hide[aria-pressed="true"] { border-color: var(--rand-sterk); background: var(--paneel-2); }

.hidden-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .3rem .4rem .3rem .8rem;
  border: 1px dashed var(--rand-sterk); border-radius: var(--r-groot); color: var(--zacht); font-size: .88rem; min-width: 0; }
.hidden-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.toast { position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%); margin: 0; max-width: calc(100vw - 32px);
  padding: .5rem .9rem; border-radius: var(--r-pil); background: var(--tekst); color: var(--bg); font-size: .9rem; z-index: 5; }
