/* ── Rooms, rates and facilities ──────────────────────────────────────────
   The booking form asks three questions in the order the decision is made:
   which room, on what terms, and what to add. Each is a card list rather than
   a select, because the answer depends on comparing what is written on them —
   a dropdown hides exactly the detail being chosen between.

   Built on the page's own tokens so it follows the light/dark theme. */

.zvv-rp-block { margin: 0 0 18px; }

.zvv-rp-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.zvv-rp-head h4 {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    font-family: "Sora", "Plus Jakarta Sans", sans-serif;
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--zvv-ink);
}

.zvv-rp-head h4 i { color: var(--drac-purple); }

.zvv-rp-head > span {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--zvv-muted);
}

/* ── Room cards ─────────────────────────────────────────────────────── */

.zvv-rp-rooms { display: grid; gap: 8px; }

.zvv-rp-room {
    position: relative;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid var(--zvv-line);
    border-radius: 14px;
    background: var(--zvv-card, #fff);
    cursor: pointer;
    transition: border-color .14s, background .14s, box-shadow .14s;
}

.zvv-rp-room:hover { border-color: rgba(124,58,237,.45); }

.zvv-rp-room.is-picked {
    border-color: var(--drac-purple);
    background: rgba(124,58,237,.05);
    box-shadow: 0 0 0 3px rgba(124,58,237,.1);
}

.zvv-rp-room.is-gone { opacity: .5; cursor: not-allowed; }

/* The radio itself is redundant once the card carries the state, but it stays
   in the accessibility tree and keeps the group keyboard-navigable. */
.zvv-rp-room input,
.zvv-rp-plan input,
.zvv-rp-extra input { position: absolute; opacity: 0; width: 0; height: 0; }

.zvv-rp-room input:focus-visible + .zvv-rp-room-img,
.zvv-rp-plan input:focus-visible + .zvv-rp-plan-body {
    outline: 2px solid var(--drac-purple);
    outline-offset: 2px;
}

.zvv-rp-room-img {
    width: 58px;
    height: 58px;
    border-radius: 11px;
    object-fit: cover;
    background: rgba(124,58,237,.08);
}

.zvv-rp-room-img-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--drac-purple);
    font-size: 1.2rem;
}

.zvv-rp-room-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }

.zvv-rp-room-name {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--zvv-ink);
}

.zvv-rp-room-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--zvv-muted);
}

.zvv-rp-room-facts span { display: inline-flex; align-items: center; gap: 4px; }

.zvv-rp-room-desc {
    font-size: 0.72rem;
    line-height: 1.45;
    color: var(--zvv-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.zvv-rp-room-stock { font-size: 0.68rem; font-weight: 700; color: var(--zvv-muted); }
.zvv-rp-room-stock .is-low  { color: var(--drac-orange); }
.zvv-rp-room-stock .is-gone { color: var(--drac-red); }

.zvv-rp-room-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
    text-align: right;
    white-space: nowrap;
}

.zvv-rp-room-price small { font-size: 0.62rem; font-weight: 700; color: var(--zvv-muted); text-transform: uppercase; letter-spacing: .05em; }
.zvv-rp-room-price strong { font-size: 1rem; font-weight: 800; color: var(--zvv-ink); }

.zvv-rp-rooms-count {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--zvv-ink);
}

.zvv-rp-rooms-count input { width: 78px; }

/* ── Rate plan cards ────────────────────────────────────────────────── */

.zvv-rp-plans { display: grid; gap: 8px; }

.zvv-rp-plan {
    position: relative;
    display: block;
    padding: 11px 13px;
    border: 1px solid var(--zvv-line);
    border-radius: 14px;
    background: var(--zvv-card, #fff);
    cursor: pointer;
    transition: border-color .14s, background .14s, box-shadow .14s;
}

.zvv-rp-plan:hover { border-color: rgba(124,58,237,.45); }

.zvv-rp-plan.is-picked {
    border-color: var(--drac-purple);
    background: rgba(124,58,237,.05);
    box-shadow: 0 0 0 3px rgba(124,58,237,.1);
}

.zvv-rp-plan-body { display: flex; flex-direction: column; gap: 6px; }

.zvv-rp-plan-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.zvv-rp-plan-name { font-size: 0.86rem; font-weight: 800; color: var(--zvv-ink); }

.zvv-rp-plan-adj {
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.zvv-rp-plan-adj.is-down { background: rgba(22,163,74,.14); color: var(--drac-green); }
.zvv-rp-plan-adj.is-up   { background: rgba(234,88,12,.14);  color: var(--drac-orange); }

.zvv-rp-plan-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.zvv-rp-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(124,58,237,.09);
    color: var(--drac-purple);
    font-size: 0.68rem;
    font-weight: 700;
}

.zvv-rp-tag.is-ok   { background: rgba(22,163,74,.12); color: var(--drac-green); }
.zvv-rp-tag.is-firm { background: rgba(220,38,38,.1);  color: var(--drac-red); }

.zvv-rp-plan-policy,
.zvv-rp-plan-board {
    font-size: 0.71rem;
    line-height: 1.45;
    color: var(--zvv-muted);
}

/* ── Extras ─────────────────────────────────────────────────────────── */

.zvv-rp-extras { display: grid; gap: 6px; }

.zvv-rp-extra {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 12px;
    border: 1px solid var(--zvv-line);
    border-radius: 12px;
    background: var(--zvv-card, #fff);
    cursor: pointer;
    transition: border-color .14s, background .14s;
}

.zvv-rp-extra:hover { border-color: rgba(124,58,237,.4); }
.zvv-rp-extra:has(input:checked) {
    border-color: var(--drac-purple);
    background: rgba(124,58,237,.05);
}

.zvv-rp-extra-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }

.zvv-rp-extra-name {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--zvv-ink);
}

.zvv-rp-extra-name i { color: var(--drac-purple); }
.zvv-rp-extra-body small { font-size: 0.68rem; color: var(--zvv-muted); }

.zvv-rp-extra-price {
    font-size: 0.76rem;
    font-weight: 800;
    color: var(--zvv-ink);
    white-space: nowrap;
}

/* ── Facilities, on the listing body ────────────────────────────────── */

.zvv-fac-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px 28px;
}

.zvv-fac-group h3 {
    margin: 0 0 9px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--zvv-muted);
}

.zvv-fac-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }

.zvv-fac {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 4px 9px;
    font-size: 0.82rem;
}

.zvv-fac > i { color: var(--drac-purple); font-size: 0.95rem; }
.zvv-fac-name { font-weight: 700; color: var(--zvv-ink); }

.zvv-fac-price {
    font-size: 0.72rem;
    font-weight: 800;
    white-space: nowrap;
}

/* Free and included are both good news but not the same claim, so they are not
   the same colour: included is something that would otherwise be charged. */
.zvv-fac.is-free .zvv-fac-price     { color: var(--drac-green); }
.zvv-fac.is-included .zvv-fac-price { color: var(--drac-purple); }
.zvv-fac.is-paid .zvv-fac-price     { color: var(--zvv-ink); }

.zvv-fac-note {
    grid-column: 2 / -1;
    font-size: 0.7rem;
    line-height: 1.4;
    color: var(--zvv-muted);
}

/* ── Room comparison table ──────────────────────────────────────────── */

.zvv-roomtable-wrap { overflow-x: auto; }

.zvv-roomtable {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
}

.zvv-roomtable th {
    padding: 8px 12px 8px 0;
    border-bottom: 1px solid var(--zvv-line);
    text-align: left;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--zvv-muted);
    white-space: nowrap;
}

.zvv-roomtable td {
    padding: 11px 12px 11px 0;
    border-bottom: 1px solid var(--zvv-line);
    vertical-align: top;
    color: var(--zvv-ink);
}

.zvv-roomtable td strong { display: block; font-weight: 800; }
.zvv-roomtable td small { display: block; margin-top: 2px; font-size: 0.72rem; color: var(--zvv-muted); }
.zvv-roomtable-price { font-weight: 800; white-space: nowrap; }

@media (max-width: 560px) {
    .zvv-rp-room { grid-template-columns: 46px minmax(0, 1fr); }
    .zvv-rp-room-img { width: 46px; height: 46px; }
    .zvv-rp-room-price { grid-column: 2; align-items: flex-start; flex-direction: row; gap: 6px; align-items: baseline; }
}

/* ── Host editor: rooms, plans, facilities ────────────────────────────────
   Rows the host adds and removes, so each is a bordered block rather than a
   run of fields — the boundary is what makes "remove this one" unambiguous. */

.zvv-rf-rows { display: grid; gap: 10px; margin-bottom: 12px; }

.zvv-rf-row {
    position: relative;
    padding: 13px 44px 13px 14px;
    border: 1px solid var(--zvv-line);
    border-radius: 14px;
    background: var(--zvv-card, #fff);
}

.zvv-rf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 10px;
}

.zvv-rf-f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.zvv-rf-f-wide { grid-column: span 2; }

.zvv-rf-f > span {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--zvv-muted);
}

.zvv-rf-f input,
.zvv-rf-f select {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid var(--zvv-line);
    border-radius: 9px;
    background: var(--zvv-panel, #fff);
    color: var(--zvv-ink);
    font-size: 0.82rem;
}

.zvv-rf-f input:focus,
.zvv-rf-f select:focus {
    outline: none;
    border-color: var(--drac-purple);
    box-shadow: 0 0 0 3px rgba(124,58,237,.12);
}

.zvv-rf-del {
    position: absolute;
    top: 11px;
    right: 11px;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--zvv-line);
    border-radius: 8px;
    background: transparent;
    color: var(--zvv-muted);
    cursor: pointer;
    transition: color .14s, border-color .14s, background .14s;
}

.zvv-rf-del:hover {
    color: var(--drac-red);
    border-color: var(--drac-red);
    background: rgba(220,38,38,.07);
}

.zvv-rf-sub { margin-top: 26px; }

/* ── Facility grid ──────────────────────────────────────────────────── */

.zvv-rf-facs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px 24px;
}

.zvv-rf-facgroup h4 {
    margin: 0 0 8px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--zvv-muted);
}

.zvv-rf-fac {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 128px;
    gap: 6px;
    align-items: center;
    padding: 7px 9px;
    margin-bottom: 5px;
    border: 1px solid transparent;
    border-radius: 10px;
    transition: border-color .14s, background .14s;
}

/* Offered facilities lift out of the list; the rest stay quiet. */
.zvv-rf-fac.is-on {
    border-color: var(--zvv-line);
    background: var(--zvv-card, #fff);
}

.zvv-rf-fac-name {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--zvv-ink);
}

.zvv-rf-fac-name i { color: var(--drac-purple); }

.zvv-rf-fac select,
.zvv-rf-fac input {
    padding: 5px 8px;
    border: 1px solid var(--zvv-line);
    border-radius: 8px;
    background: var(--zvv-panel, #fff);
    color: var(--zvv-ink);
    font-size: 0.76rem;
    min-width: 0;
}

.zvv-rf-fac [data-fac-price],
.zvv-rf-fac [data-fac-unit] { grid-column: 2; }
.zvv-rf-fac [data-fac-note] { grid-column: 1 / -1; }
.zvv-rf-fac [hidden] { display: none; }

/* Seasonal pricing sits inside the rooms block but is a different kind of
   thing — a one-shot action rather than a row — so it is set apart. */
.zvv-rf-season {
    margin: 14px 0 4px;
    padding: 14px;
    border: 1px dashed var(--zvv-line);
    border-radius: 14px;
}

.zvv-rf-season h4 {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 4px;
    font-size: 0.84rem;
    font-weight: 800;
    color: var(--zvv-ink);
}

.zvv-rf-season h4 i { color: var(--drac-purple); }

.zvv-rf-season > p {
    margin: 0 0 11px;
    max-width: 64ch;
    font-size: 0.76rem;
    line-height: 1.5;
    color: var(--zvv-muted);
}

.zvv-rf-days {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin-top: 11px;
}

.zvv-rf-days > span {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--zvv-muted);
}

.zvv-rf-days > small { flex: 1 1 100%; font-size: 0.7rem; color: var(--zvv-muted); }

.zvv-rf-day { position: relative; cursor: pointer; }
.zvv-rf-day input { position: absolute; opacity: 0; width: 0; height: 0; }

.zvv-rf-day span {
    display: inline-block;
    padding: 5px 11px;
    border: 1px solid var(--zvv-line);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--zvv-muted);
    transition: border-color .14s, background .14s, color .14s;
}

.zvv-rf-day input:checked + span {
    border-color: var(--drac-purple);
    background: rgba(124,58,237,.1);
    color: var(--drac-purple);
}

.zvv-rf-day input:focus-visible + span { outline: 2px solid var(--drac-purple); outline-offset: 2px; }

/* ── "Sold as one whole place" ──
   The room list starts empty, and an empty <div> above an "Add a room type"
   button told a host nothing — least of all that the count behind it is what
   stops one booking closing a twenty-room hotel. This says what the listing
   does as it stands, and what the button would change. It hides itself the
   moment a room type exists (rooms-editor.js). */
.zvv-rf-none {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    padding: 14px 16px;
    border: 1px dashed rgba(124, 58, 237, .3);
    border-radius: 14px;
    background: rgba(124, 58, 237, .04);
}
.zvv-rf-none > i { flex: none; margin-top: 2px; color: var(--drac-purple); font-size: 1.15rem; }
.zvv-rf-none strong { display: block; font-size: .92rem; color: var(--zvv-ink); }
.zvv-rf-none span { display: block; margin-top: 3px; font-size: .84rem; line-height: 1.5; color: var(--zvv-muted); }

/* The one field on a room row that changes what the calendar will sell. */
.zvv-rf-f-count > span { color: var(--drac-purple); }
.zvv-rf-f-count input { border-color: rgba(124, 58, 237, .45); font-weight: 700; }

/* The on-sale toggle. A room retired here keeps its history and stops being
   sold — see room_active_value(). Narrow, because it is one box rather than a
   field, and pulled level with the labels beside it. */
.zvv-rf-f-toggle {
    flex: 0 0 auto;
    align-items: flex-start;
}

.zvv-rf-f-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 8px;
    accent-color: var(--drac-purple, #7c3aed);
}

/* B04 — a retired room or rate plan, said out loud.
 *
 * The only sign used to be an unticked box halfway along a row of eight fields.
 * A host wondering why their hotel had stopped taking bookings had nothing to
 * see, and a desk looking at somebody else's inventory had nothing either. */
.zvv-rf-row.is-retired {
    background: #fafafa;
    border-color: #e5e7eb;
    opacity: .78;
}

.zvv-rf-retired {
    margin: 0 0 10px;
    font-size: 12.5px;
    font-weight: 700;
    color: #b45309;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 6px 10px;
}
