/* ============================================================
   Doorloom brand-website V2 — shared components.
   Bottom sheets, accordions, pills, counters, calendar, chips,
   property card. Used on two or more pages.
   ============================================================ */

/* ---------- bottom sheet (mobile) / centred modal (tablet+) ---------- */
.sheet[hidden] { display: none; }
.sheet { position: fixed; inset: 0; z-index: 70; }
.sheet__bd { position: absolute; inset: 0; background: rgba(0, 0, 0, .42); }
.sheet__p { position: absolute; left: 0; right: 0; bottom: 0; background: var(--bg); border-radius: 20px 20px 0 0; max-height: 92vh; display: flex; flex-direction: column; animation: up .25s ease; box-shadow: var(--shadow-elevated); }
@keyframes up { from { transform: translateY(100%); } to { transform: none; } }
.sheet__grab { width: 38px; height: 4px; background: var(--line-2); border-radius: 2px; margin: 9px auto 4px; }
.sheet__hd { display: flex; align-items: center; justify-content: space-between; padding: 6px 18px 8px; }
.sheet__t { font-weight: 700; font-size: 1.05rem; }
.sheet__x { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--text); font-size: 1rem; }
.sheet__body { overflow: auto; padding: 4px 18px 18px; }
.sheet__foot { position: sticky; bottom: 0; background: var(--bg); border-top: 1px solid var(--line); padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet__clear { background: none; border: 0; font-weight: 600; text-decoration: underline; color: var(--text); }
.sheet__apply { border: 0; border-radius: var(--r); background: var(--gradient-accent); color: #fff; font-weight: 600; padding: 13px 26px; font-size: 1rem; }
.sheet__apply:hover { background: var(--accent-press); }
.sheet__apply:disabled { opacity: .5; cursor: not-allowed; }
@media (min-width: 600px) {
  .sheet__p { max-width: 460px; margin: 0 auto; left: 16px; right: 16px; bottom: 16px; border-radius: 18px; }
}
@media (min-width: 768px) {
  .sheet__p {
    left: 50%; right: auto; top: 50%; bottom: auto; margin: 0;
    transform: translate(-50%, -50%);
    width: min(520px, calc(100vw - 48px)); max-width: 520px;
    max-height: 86vh; border-radius: 20px; overflow: hidden;
    animation: pop .22s ease;
  }
  .sheet__grab { display: none; }
  .sheet__hd { padding: 16px 22px 10px; }
  .sheet__body { padding: 4px 22px 20px; flex: 1 1 auto; min-height: 0; }
  .sheet__foot { position: static; padding: 14px 22px calc(14px + env(safe-area-inset-bottom)); }
}
@keyframes pop { from { opacity: 0; transform: translate(-50%, -46%) scale(.985); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }

/* ---------- sheet sections + accordion ---------- */
.fsec { padding: 16px 0; border-top: 1px solid var(--line); }
.fsec:first-child { border-top: 0; }
.fsec__t { font-weight: 600; margin-bottom: 12px; }
.acc { border: 1px solid var(--line-2); border-radius: var(--r); margin-bottom: 10px; overflow: hidden; }
.acc__head { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface); color: var(--text); border: 0; padding: 15px 16px; }
.acc__l { font-weight: 600; font-size: 1rem; }
.acc__r { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: .9375rem; }
.acc__chev { width: 18px; height: 18px; transition: transform .2s; flex: none; color: var(--text-2); }
.acc.open .acc__chev { transform: rotate(180deg); }
.acc.open .acc__head { border-bottom: 1px solid var(--line); }
.acc__body { display: none; padding: 14px 16px 16px; }
.acc.open .acc__body { display: block; }

/* ---------- pills ---------- */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { border: 1px solid var(--line-2); background: var(--surface); color: var(--text); border-radius: 999px; padding: 9px 15px; font-size: .88rem; font-weight: 500; display: inline-flex; align-items: center; gap: 7px; }
.pill:hover { border-color: var(--text); }
.pill.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--surface)); color: var(--accent-ink); }
.pill.on::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ---------- stepper rows + switch ---------- */
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row__l { font-weight: 500; }
.row__l .s { display: block; font-size: .78rem; color: var(--text-3); font-weight: 400; }
.ctr { display: flex; align-items: center; gap: 14px; }
.rnd { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font-size: 1.1rem; display: grid; place-items: center; }
.rnd:hover:not(:disabled) { border-color: var(--text); }
.rnd:disabled { opacity: .35; cursor: not-allowed; }
.ctr .v { min-width: 16px; text-align: center; font-weight: 600; }
.sw { width: 44px; height: 26px; border-radius: 999px; border: 0; background: var(--line-2); position: relative; flex: none; transition: .2s; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: .2s; }
.sw[aria-pressed="true"] { background: var(--accent); }
.sw[aria-pressed="true"]::after { left: 21px; }
.rangewrap output { display: block; font-weight: 600; margin-bottom: 8px; }
input[type=range] { width: 100%; accent-color: var(--accent); }

/* ---------- calendar ---------- */
.cal__nav { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 10px; }
.cal__month { font-weight: 600; }
.cal__nb { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); display: grid; place-items: center; }
.cal__nb:disabled { opacity: .3; cursor: not-allowed; }
.cal__nb svg { width: 16px; height: 16px; }
.cal__wk { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: .7rem; color: var(--text-3); font-weight: 600; margin-bottom: 4px; }
.cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal__d { aspect-ratio: 1/1; border: 0; background: none; border-radius: 10px; font-size: .9rem; color: var(--text); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.cal__d:hover:not([disabled]) { background: var(--surface-2); }
.cal__d[disabled] { color: var(--text-3); cursor: not-allowed; text-decoration: line-through; opacity: .7; }
.cal__d.range { background: var(--surface-2); border-radius: 0; }
.cal__d.in, .cal__d.out { background: var(--text); color: var(--bg); }
.cal__d.in { border-radius: 10px 0 0 10px; }
.cal__d.out { border-radius: 0 10px 10px 0; }
.cal__d.in.out { border-radius: 10px; }
.cal__d .p { font-size: .58rem; color: var(--text-3); font-weight: 500; line-height: 1; }
.cal__d.in .p, .cal__d.out .p { color: color-mix(in srgb, var(--bg) 75%, transparent); }
.cal__d.range .p { color: var(--text-2); }

/* ---------- filter chips ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-bottom: 20px; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { white-space: nowrap; padding: 8px 15px; border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; font-size: .85rem; font-weight: 500; color: var(--text-2); }
.chip:hover { border-color: var(--text); color: var(--text); }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ---------- property card ---------- */
.lc { display: block; }
.lc__media { position: relative; aspect-ratio: 20/15; border-radius: 14px; overflow: hidden; background: var(--surface-2); }
.lc__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.lc:hover .lc__media img { transform: scale(1.045); }
.lc__tag { position: absolute; top: 10px; left: 10px; background: color-mix(in srgb, var(--surface) 94%, transparent); border-radius: 999px; padding: 5px 11px; font-size: .72rem; font-weight: 600; }
.lc__b { padding-top: 11px; }
.lc__type { font-size: .78rem; color: var(--text-2); }
.lc__row { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; margin-top: 1px; }
.lc__name { font-weight: 600; font-size: 1.02rem; }
.lc__rate { font-size: .85rem; display: flex; align-items: center; gap: 3px; flex: none; }
.lc__rate svg { width: 13px; height: 13px; color: var(--accent); fill: var(--accent); }
.lc__sub { color: var(--text-2); font-size: .85rem; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc__facts { color: var(--text-2); font-size: .82rem; margin-top: 7px; }
.lc__price { margin-top: 8px; font-weight: 600; }
.lc__price .u { font-weight: 400; color: var(--text-2); font-size: .85rem; }
.empty { grid-column: 1/-1; text-align: center; color: var(--text-2); padding: 40px 0; }

/* ---------- lightbox ---------- */
.lb[hidden] { display: none; }
.lb { position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, .92); display: flex; flex-direction: column; }
.lb__top { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; color: #fff; }
.lb__count { font-size: .9rem; font-weight: 600; }
.lb__x { width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: #fff; font-size: 1.05rem; }
.lb__stage { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 0 8px; }
.lb__stage img { max-width: 100%; max-height: 100%; border-radius: 10px; object-fit: contain; }
.lb__cap { text-align: center; color: rgba(255, 255, 255, .75); font-size: .88rem; padding: 10px 16px 0; }
.lb__nav { display: flex; justify-content: center; gap: 14px; padding: 14px 0 calc(18px + env(safe-area-inset-bottom)); }
.lb__nb { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: #fff; display: grid; place-items: center; }
.lb__nb svg { width: 19px; height: 19px; }

/* ---------- floating enquiry button ---------- */
.efab { position: fixed; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 60; display: inline-flex; align-items: center; gap: 9px; border: 0; border-radius: 999px; padding: 14px 20px; background: var(--gradient-accent); color: #fff; font-weight: 600; font-size: .95rem; box-shadow: var(--shadow-elevated); }
.efab svg { width: 18px; height: 18px; }
.efab:hover { filter: brightness(1.05); }

/* ---------- shared form fields ---------- */
.fld { margin-bottom: 12px; }
.fld label { display: block; font-size: .82rem; font-weight: 600; margin-bottom: 5px; }
.fld input, .fld select, .fld textarea { width: 100%; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); color: var(--text); padding: 11px 12px; font-family: inherit; font-size: .95rem; }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.fld .err { color: #d33; font-size: .78rem; margin-top: 4px; display: none; }
.fld.invalid .err { display: block; }
.fld.invalid input { border-color: #d33; }
.f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
