/* Cores da marca: valores por defeito (Vila Azulejo demo). A marca ativa
   substitui-os com partials/brand/css-vars (html:root). */
:root {
    --brand-primary: #045679;
    --brand-primary-dark: #033d57;
    --brand-accent: #08b1e9;
    --brand-accent-hover: #06a0d4;
    --brand-accent-hover-admin: #0699c9;
    --brand-cream: #f7f5f1;
    --brand-primary-rgb: 4, 86, 121;
    --brand-primary-dark-rgb: 3, 61, 87;
    --brand-accent-rgb: 8, 177, 233;
}

/* Reservas diretas no site */
.rf-db { padding-top: 60px; padding-bottom: 80px; }
.rf-db .rf-page-intro h2 { font-size: 34px; }

.rf-db-steps { display: flex; justify-content: center; gap: 8px; list-style: none; padding: 0; margin: 0 auto 36px; max-width: 760px; counter-reset: none; }
.rf-db-steps__item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; color: #8a8f94; font-size: 14px; text-align: center; }
.rf-db-steps__item::after { content: ""; position: absolute; top: 16px; left: calc(50% + 22px); right: calc(-50% + 22px); height: 2px; background: #dcd8d0; }
.rf-db-steps__item:last-child::after { display: none; }
.rf-db-steps__num { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 2px solid #dcd8d0; background: #fff; font-weight: 700; position: relative; z-index: 1; }
.rf-db-steps__item.is-done { color: var(--rf-brand, var(--brand-primary)); }
.rf-db-steps__item.is-done .rf-db-steps__num { border-color: var(--rf-brand, var(--brand-primary)); background: var(--rf-brand, var(--brand-primary)); color: #fff; }
.rf-db-steps__item.is-done::after { background: var(--rf-brand, var(--brand-primary)); }
.rf-db-steps__item.is-current { color: var(--rf-brand, var(--brand-primary)); font-weight: 700; }
.rf-db-steps__item.is-current .rf-db-steps__num { border-color: var(--rf-accent, var(--brand-accent)); color: var(--rf-brand, var(--brand-primary)); }

.rf-db-card { background: #fff; border-radius: 10px; box-shadow: 0 6px 24px rgba(var(--brand-primary-rgb), .08); padding: 28px; }
.rf-db-card--search { max-width: 980px; margin: 0 auto 40px; }

.rf-db-search { display: grid; grid-template-columns: 1fr 1fr 110px 110px auto; gap: 16px; align-items: end; }
.rf-db-search__field label, .rf-db-form__field label { display: block; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--rf-brand, var(--brand-primary)); margin-bottom: 6px; }
.rf-db-search input, .rf-db-search select,
.rf-db-form input[type=text], .rf-db-form input[type=email], .rf-db-form input[type=tel], .rf-db-form select, .rf-db-form textarea {
    width: 100%; height: 50px; border: 1px solid #d9d5cc; border-radius: 6px; padding: 0 14px; font-size: 16px; background: #fff; color: #222;
}
.rf-db-form textarea { height: auto; padding: 12px 14px; }
.rf-db-search input:focus, .rf-db-search select:focus, .rf-db-form input:focus, .rf-db-form select:focus, .rf-db-form textarea:focus { outline: 2px solid var(--rf-accent, var(--brand-accent)); border-color: transparent; }
.rf-db-search__submit .btn { height: 50px; white-space: nowrap; }
.rf-db-search .rf-db-alert { grid-column: 1 / -1; margin: 0; }

.rf-db-alert { background: #fff; border-left: 4px solid var(--rf-accent, var(--brand-accent)); border-radius: 6px; padding: 16px 20px; margin: 0 auto 24px; max-width: 980px; }
.rf-db-alert--error { border-left-color: #c0392b; background: #fdf2f1; color: #7d2219; }
.rf-db-alert ul { margin: 0; padding-left: 18px; }

.rf-db-results { max-width: 980px; margin: 0 auto; }
.rf-db-results__title { color: var(--rf-brand, var(--brand-primary)); margin-bottom: 4px; }
.rf-db-results__meta { color: #666; margin-bottom: 20px; }
.rf-db-results__subtitle { color: var(--rf-brand, var(--brand-primary)); margin: 36px 0 12px; font-size: 20px; }

.rf-db-unit { display: grid; grid-template-columns: 240px 1fr 220px; gap: 0; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 6px 24px rgba(var(--brand-primary-rgb), .08); margin-bottom: 20px; }
.rf-db-unit__media img { width: 100%; height: 100%; min-height: 180px; object-fit: cover; display: block; }
.rf-db-unit__body { padding: 22px 24px; }
.rf-db-unit__title { color: var(--rf-brand, var(--brand-primary)); font-size: 22px; margin-bottom: 10px; }
.rf-db-unit__facts { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.rf-db-unit__facts li { background: var(--rf-cream, var(--brand-cream)); border-radius: 20px; padding: 4px 12px; font-size: 14px; }
.rf-db-unit__includes { font-size: 14px; color: #666; margin: 0; }
.rf-db-unit__price { padding: 22px 24px; border-left: 1px solid #eee; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; text-align: right; gap: 2px; }
.rf-db-unit__price-label { font-size: 13px; color: #666; }
.rf-db-unit__price-total { font-size: 28px; font-weight: 700; color: var(--rf-brand, var(--brand-primary)); line-height: 1.2; }
.rf-db-unit__price-night { font-size: 13px; color: #666; margin-bottom: 12px; }

.rf-db-minstay { background: #fff; border-radius: 10px; padding: 16px 20px 16px 36px; }
.rf-db-minstay li { margin: 4px 0; }

.rf-db-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; max-width: 1100px; margin: 0 auto; }
.rf-db-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.rf-db-form__field--full { grid-column: 1 / -1; }
.rf-db-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.rf-db-consent { display: flex; gap: 10px; align-items: flex-start; margin: 22px 0 8px; font-size: 15px; cursor: pointer; }
.rf-db-consent input { width: 20px; height: 20px; margin-top: 2px; flex: 0 0 auto; }
.rf-db-form__actions { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 22px; flex-wrap: wrap; }
.rf-db-back { color: var(--rf-brand, var(--brand-primary)); font-weight: 600; }
.rf-db-form__note { font-size: 14px; color: #666; margin: 14px 0 0; }

.rf-db-summary { position: sticky; top: 110px; }
.rf-db-summary__title { color: var(--rf-brand, var(--brand-primary)); font-size: 20px; margin-bottom: 14px; }
.rf-db-summary__img { width: 100%; height: 170px; object-fit: cover; border-radius: 8px; margin-bottom: 12px; }
.rf-db-summary__unit { font-weight: 700; font-size: 18px; margin-bottom: 10px; color: #222; }
.rf-db-summary__dates { margin: 0 0 14px; }
.rf-db-summary__dates div, .rf-db-confirm__facts div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed #e5e1d8; }
.rf-db-summary__dates dt, .rf-db-confirm__facts dt { font-weight: 400; color: #666; }
.rf-db-summary__dates dd, .rf-db-confirm__facts dd { margin: 0; text-align: right; }
.rf-db-summary__prices { width: 100%; }
.rf-db-summary__prices th { font-weight: 400; color: #444; padding: 6px 0; }
.rf-db-summary__prices td { text-align: right; padding: 6px 0; white-space: nowrap; }
.rf-db-summary__total th, .rf-db-summary__total td { border-top: 2px solid var(--rf-brand, var(--brand-primary)); font-weight: 700; font-size: 18px; color: var(--rf-brand, var(--brand-primary)); padding-top: 10px; }

.rf-db-confirm { text-align: center; }
.rf-db-confirm__icon { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; background: var(--rf-brand, var(--brand-primary)); color: #fff; font-size: 34px; line-height: 64px; }
.rf-db-confirm__title { color: var(--rf-brand, var(--brand-primary)); font-size: 28px; }
.rf-db-confirm__lead { font-size: 17px; }
.rf-db-confirm__facts { max-width: 420px; margin: 18px auto; text-align: left; }
.rf-db-confirm__next { color: #555; margin-bottom: 22px; }
.rf-db-badge { display: inline-block; background: #fff4d6; color: #7a5600; border-radius: 20px; padding: 2px 12px; font-size: 14px; font-weight: 600; }

@media (max-width: 991px) {
    .rf-db-search { grid-template-columns: 1fr 1fr; }
    .rf-db-search__submit { grid-column: 1 / -1; }
    .rf-db-search__submit .btn { width: 100%; }
    .rf-db-unit { grid-template-columns: 200px 1fr; }
    .rf-db-unit__price { grid-column: 1 / -1; border-left: 0; border-top: 1px solid #eee; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; text-align: left; }
    .rf-db-unit__price-night { margin-bottom: 0; }
    .rf-db-layout { grid-template-columns: 1fr; }
    .rf-db-summary { position: static; order: -1; }
    .rf-db-layout--confirm .rf-db-summary { order: 0; }
}

@media (max-width: 575px) {
    .rf-db { padding-top: 36px; padding-bottom: 50px; }
    .rf-db .rf-page-intro h2 { font-size: 26px; }
    .rf-db-card { padding: 20px 16px; }
    .rf-db-steps__label { font-size: 12px; }
    .rf-db-steps__item::after { left: calc(50% + 20px); right: calc(-50% + 20px); }
    .rf-db-unit { grid-template-columns: 1fr; }
    .rf-db-unit__media img { min-height: 0; height: 190px; }
    .rf-db-unit__price .btn { width: 100%; }
    .rf-db-form__row { grid-template-columns: 1fr; }
    .rf-db-form__actions { flex-direction: column-reverse; align-items: stretch; }
    .rf-db-form__actions .btn { width: 100%; }
    .rf-db-back { text-align: center; }
}

/* Datas (flatpickr: campo visível dd/mm/aaaa, valor enviado em ISO) */
.rf-db-search .rf-db-date {
    cursor: pointer;
    padding-right: 38px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23045679' stroke-width='1.6' viewBox='0 0 24 24'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E") no-repeat right 12px center;
}
.flatpickr-calendar .flatpickr-day.selected, .flatpickr-calendar .flatpickr-day.selected:hover, .flatpickr-calendar .flatpickr-day.selected:focus { background: var(--rf-brand, var(--brand-primary)); border-color: var(--rf-brand, var(--brand-primary)); }
.flatpickr-calendar .flatpickr-day.today { border-color: var(--rf-accent, var(--brand-accent)); }
