/* Blokken van de module guestly. Gebruikt de variabelen van het thema (--navy, --line, --radius, --muted, …). */

/* Prijzen per seizoen: een tabel op desktop; op een smal scherm wordt elke rij een kaart (zelfde markup). */
.guestly-prices__table { width: 100%; max-width: 860px; border-collapse: collapse; }
.guestly-prices__table th, .guestly-prices__table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.guestly-prices__table thead th { font-size: 14px; color: var(--muted); font-weight: 600; }
.guestly-prices__name { font-weight: 700; color: var(--navy); }
.guestly-prices__night { font-weight: 700; white-space: nowrap; }
.guestly-prices__fees { margin: 18px 0 0; display: grid; gap: 0; max-width: 480px; }
.guestly-prices__fees > div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.guestly-prices__fees dt { font-weight: 600; }
.guestly-prices__fees dd { margin: 0; text-align: right; }
.guestly-prices__note { margin: 14px 0 0; font-size: 14px; color: var(--muted); }

@media (max-width: 640px) {
    .guestly-prices__table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .guestly-prices__table, .guestly-prices__table tbody { display: grid; gap: 12px; }
    .guestly-prices__row { display: grid; gap: 6px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); }
    .guestly-prices__table .guestly-prices__row > * { display: flex; justify-content: space-between; gap: 12px; padding: 0; border: 0; }
    .guestly-prices__row td::before { content: attr(data-label); color: var(--muted); }
    .guestly-prices__name { font-size: 18px; }
}

/* Zoekbalk: vier velden en de knop op één rij; op een smal scherm onder elkaar. */
.guestly-search { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 12px 16px; align-items: end; }
.guestly-search__field { display: grid; gap: 6px; }
.guestly-search__field label { font-size: 14px; font-weight: 600; }
.guestly-search__field input, .guestly-search__field select { width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); font: inherit; background: #fff; }
.guestly-search__submit { min-height: 44px; white-space: nowrap; }
.guestly-search__errors { margin-bottom: 16px; }
.guestly-search__errors p { margin: 0; }
.guestly-search__errors p + p { margin-top: 4px; }
.guestly-search__actions { margin: 16px 0 0; }

@media (max-width: 860px) {
    .guestly-search { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .guestly-search__submit { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
    .guestly-search { grid-template-columns: 1fr; }
}

/* Ruimte rond de widgets van Guestly en de zoekresultaten */
.guestly-widget { min-height: 120px; }
.guestly-search__warning { padding: 16px 0; }

/*
 * Vaste boekbalk (templates/guestly/book-bar.php): enkel op een smal scherm (< 900 px), vast onderaan, met de
 * veilige zone van de iPhone eronder. body krijgt onderaan evenveel ruimte, zodat de balk de footer niet bedekt.
 * Een thema stuurt bij met --book-bar-bg, --book-bar-fg, --book-bar-line en --book-bar-height.
 * book-bar.js zet .book-bar--hidden zolang #book of #search in beeld is.
 */
.book-bar { display: none; }
@media (max-width: 899px) {
    .book-bar { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
        background: var(--book-bar-bg, #fff); color: var(--book-bar-fg, var(--text, #1a1a1a));
        border-top: 1px solid var(--book-bar-line, var(--line, #ddd)); box-shadow: 0 -4px 16px rgba(0, 0, 0, .08);
        transition: transform .2s ease; }
    .book-bar--hidden { transform: translateY(110%); }
    .book-bar__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 640px; margin: 0 auto; min-height: 48px; }
    .book-bar__price { margin: 0; font-weight: 700; white-space: nowrap; }
    .book-bar__button { flex: 1 1 auto; max-width: 260px; margin-left: auto; }
    body:has(.book-bar) { padding-bottom: calc(var(--book-bar-height, 70px) + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 899px) and (prefers-reduced-motion: reduce) { .book-bar { transition: none; } }

/* Boekkaart van de woningpagina (guestly.bookingCard): prijs, formulier, voordelen en de beschikbaarheidskalender. */
.guestly-card { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.guestly-card__price { margin: 0 0 14px; color: var(--muted); }
.guestly-card__price b { font-size: 28px; color: var(--navy); }
.guestly-card__form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.guestly-card__field { display: grid; gap: 4px; min-width: 0; }
.guestly-card__field--wide, .guestly-card__submit { grid-column: 1 / -1; }
.guestly-card__field label { font-size: 13px; font-weight: 600; }
.guestly-card__field input, .guestly-card__field select { width: 100%; min-width: 0; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); font: inherit; background: #fff; }
.guestly-card__submit { min-height: 48px; }
.guestly-card__perks { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 6px; font-size: 15px; }
.guestly-card__perks li::before { content: "✓"; margin-right: 8px; font-weight: 700; color: var(--win, #1b7a43); }
.guestly-card__calendar { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.guestly-card .guestly-widget { min-height: 0; }

/* Prijzen en beschikbaarheid (guestly_overview): per accommodatie een kaart; vanaf 1000 px foto · prijzen · kalender. */
.guestly-overview { display: grid; gap: 24px; }
.guestly-overview__item { display: grid; gap: 20px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.guestly-overview__media { aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--radius); background: var(--sky-light); }
.guestly-overview__media picture, .guestly-overview__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.guestly-overview__main { min-width: 0; }
.guestly-overview__title { margin: 0 0 6px; }
.guestly-overview__text { margin: 8px 0 14px; color: var(--muted); }
.guestly-overview__more { margin: 12px 0 0; font-weight: 600; }
.guestly-overview__side { display: grid; gap: 14px; align-content: start; min-width: 0; }
.guestly-overview__book { text-align: center; }
.guestly-overview .guestly-widget { min-height: 0; }
.guestly-overview .guestly-prices__table { max-width: none; }
@media (min-width: 700px) { .guestly-overview__item { grid-template-columns: 240px minmax(0, 1fr); } .guestly-overview__side { grid-column: 1 / -1; } .guestly-overview__media { aspect-ratio: 4 / 5; } }
@media (min-width: 1100px) { .guestly-overview__item { grid-template-columns: 260px minmax(0, 1fr) 320px; gap: 28px; } .guestly-overview__side { grid-column: auto; } }

/* Prijsblok: tabel en vaste kosten naast elkaar vanaf 1000 px. */
@media (min-width: 1000px) {
    .blk--guestly_prices .guestly-prices__body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; }
    .blk--guestly_prices .guestly-prices__table { max-width: none; }
    .blk--guestly_prices .guestly-prices__fees { margin-top: 0; max-width: none; }
}
