/* ==========================================================================
   Sathorn111 - direct booking and payment page (reserve.html)
   Self-contained: this page loads only the web font and this file.
   The visual language matches booking.html so the two feel like one site.
   ========================================================================== */

:root {
    --ink: #2f2a1f;
    --ink-soft: #6b6257;
    --gold: #c8a256;
    --gold-deep: #a9832f;
    --cream: #fbf6ec;
    --card: #ffffff;
    --line: rgba(200, 162, 86, 0.28);
    --line-soft: rgba(47, 42, 31, 0.1);
    --shadow: 0 18px 40px rgba(47, 42, 31, 0.08);
    --shadow-soft: 0 8px 20px rgba(47, 42, 31, 0.06);
    --radius: 1rem;
    --ok: #256029;
    --ok-bg: #edf7ee;
    --warn: #8a4b1f;
    --warn-bg: #fdf3ea;
    --bad: #9c3c22;
    --bad-bg: #fdf0ec;
}

html {
    zoom: 0.8;
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    margin: 0;
    color: var(--ink);
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1.05rem;
    line-height: 1.6;
    background:
        radial-gradient(120% 60% at 50% 0%, rgba(245, 226, 183, 0.55) 0%, rgba(245, 226, 183, 0) 70%),
        linear-gradient(180deg, #fbf6ec 0%, #f5ecdc 55%, #f8f5ef 100%);
    min-height: 100vh;
}

*, *::before, *::after {
    box-sizing: border-box;
}

img, svg {
    max-width: 100%;
}

.rv-wrap {
    width: min(100% - 4rem, 1440px);
    margin-inline: auto;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

:focus-visible {
    outline: 3px solid var(--gold-deep);
    outline-offset: 2px;
}

/* ---------- Top bar ---------- */

.rv-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    padding-block: 0.8rem;
    border-bottom: 1px solid var(--line);
    background: var(--cream);
    box-shadow: 0 6px 18px rgba(47, 42, 31, 0.06);
}

.rv-topbar .rv-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.rv-back,
.rv-call {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    text-decoration: none;
    font-weight: 600;
    border-radius: 999px;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.rv-back {
    min-height: 3.1rem;
    padding: 0.55rem 1.4rem;
    font-size: 1.1rem;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
}

.rv-back:hover,
.rv-back:focus-visible {
    background: var(--ink);
    color: var(--cream);
    border-color: var(--ink);
}

.rv-call {
    padding: 0.5rem 1.1rem;
    color: var(--gold-deep);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.7);
}

.rv-call:hover,
.rv-call:focus-visible {
    background: var(--gold);
    color: #fff;
    border-color: var(--gold);
}

/* ---------- Hero ---------- */

.rv-hero {
    text-align: center;
    padding: clamp(1.6rem, 3vw, 2.6rem) 0 clamp(1.4rem, 2.5vw, 2rem);
}

.rv-hero__logo {
    width: clamp(4.4rem, 7vw, 6rem);
    height: auto;
    margin: 0 auto 0.8rem;
    display: block;
}

.rv-hero__eyebrow {
    margin: 0 0 0.4rem;
    font-size: 0.8rem;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    color: var(--gold-deep);
    font-weight: 600;
}

.rv-hero h1 {
    margin: 0 0 0.6rem;
    font-size: clamp(2.1rem, 4vw, 3rem);
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.12;
}

.rv-hero__lead {
    margin: 0 auto;
    max-width: 46rem;
    color: var(--ink-soft);
    font-size: 1.08rem;
}

.rv-hero__facts {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem 1.6rem;
    margin: 1.2rem 0 0;
    padding: 0;
    color: var(--ink-soft);
    font-size: 0.98rem;
}

.rv-hero__facts li {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.rv-hero__facts svg {
    color: var(--gold-deep);
    flex: none;
}

/* ---------- Layout ---------- */

.rv-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 27rem;
    align-items: start;
    gap: 1.6rem;
    padding-bottom: 3.5rem;
}

@media (max-width: 1100px) {
    .rv-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

.rv-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: clamp(1.2rem, 2.2vw, 2rem);
}

.rv-card + .rv-card {
    margin-top: 1.3rem;
}

.rv-step__head {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    margin-bottom: 1.1rem;
}

.rv-step__num {
    flex: none;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--gold);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
}

.rv-step__head h2 {
    margin: 0;
    font-size: 1.32rem;
    font-weight: 600;
}

.rv-step__head p {
    margin: 0.15rem 0 0;
    color: var(--ink-soft);
    font-size: 0.98rem;
}

/* ---------- Residence picker ---------- */

.rv-rooms {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: 0.8rem;
}

.rv-room {
    position: relative;
    display: block;
    cursor: pointer;
}

.rv-room input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.rv-room__body {
    height: 100%;
    border: 1px solid var(--line-soft);
    border-radius: 0.8rem;
    padding: 0.85rem 1rem;
    background: #fdfbf7;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.rv-room:hover .rv-room__body {
    border-color: var(--gold);
}

.rv-room input:checked + .rv-room__body {
    border-color: var(--gold-deep);
    box-shadow: 0 0 0 2px rgba(200, 162, 86, 0.35);
    background: #fffdf8;
}

.rv-room input:focus-visible + .rv-room__body {
    outline: 3px solid var(--gold-deep);
    outline-offset: 2px;
}

.rv-room__name {
    font-weight: 600;
    font-size: 1.05rem;
}

.rv-room__meta {
    color: var(--ink-soft);
    font-size: 0.9rem;
}

.rv-room__rate {
    margin-top: 0.35rem;
    color: var(--gold-deep);
    font-weight: 600;
    font-size: 0.98rem;
}

/* ---------- Fields ---------- */

.rv-grid {
    display: grid;
    gap: 0.9rem 1rem;
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}

.rv-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.rv-field--full {
    grid-column: 1 / -1;
}

.rv-field label,
.rv-legend {
    font-weight: 600;
    font-size: 0.95rem;
}

.rv-field input,
.rv-field select,
.rv-field textarea {
    font: inherit;
    color: inherit;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--line-soft);
    border-radius: 0.6rem;
    background: #fdfbf7;
    min-height: 3rem;
    width: 100%;
}

.rv-field textarea {
    min-height: 6.5rem;
    resize: vertical;
}

.rv-field input:focus,
.rv-field select:focus,
.rv-field textarea:focus {
    border-color: var(--gold);
    outline: none;
    box-shadow: 0 0 0 3px rgba(200, 162, 86, 0.25);
}

.rv-field input[aria-invalid="true"],
.rv-field select[aria-invalid="true"] {
    border-color: var(--bad);
    background: var(--bad-bg);
}

.rv-hint {
    color: var(--ink-soft);
    font-size: 0.88rem;
}

.rv-error {
    color: var(--bad);
    font-size: 0.88rem;
    font-weight: 600;
    min-height: 0;
}

.rv-phone {
    display: grid;
    grid-template-columns: 7.5rem minmax(0, 1fr);
    gap: 0.5rem;
}

.rv-consent {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
    margin-top: 0.4rem;
    font-size: 0.96rem;
    color: var(--ink-soft);
}

.rv-consent input {
    margin-top: 0.3rem;
    width: 1.15rem;
    height: 1.15rem;
    flex: none;
    accent-color: var(--gold-deep);
}

.rv-consent a {
    color: var(--gold-deep);
}

/* ---------- Calendar ---------- */

.rv-cal__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.9rem;
}

.rv-cal__nav {
    display: flex;
    gap: 0.4rem;
}

.rv-iconbtn {
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.rv-iconbtn:hover:not(:disabled) {
    background: var(--gold);
    color: #fff;
    border-color: var(--gold);
}

.rv-iconbtn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.rv-months {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.4rem;
}

@media (max-width: 760px) {
    .rv-months {
        grid-template-columns: minmax(0, 1fr);
    }
}

.rv-month__name {
    text-align: center;
    font-weight: 600;
    margin: 0 0 0.6rem;
    font-size: 1.05rem;
}

.rv-dow,
.rv-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.3rem;
}

.rv-dow {
    margin-bottom: 0.3rem;
}

.rv-dow span {
    text-align: center;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.rv-day {
    position: relative;
    aspect-ratio: 1 / 1;
    min-height: 2.6rem;
    border: 1px solid transparent;
    border-radius: 0.55rem;
    background: #fdfbf7;
    color: var(--ink);
    font: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.rv-day--empty {
    background: none;
    border: none;
    cursor: default;
}

.rv-day:hover:not(:disabled) {
    border-color: var(--gold);
}

.rv-day:disabled {
    cursor: not-allowed;
    color: rgba(47, 42, 31, 0.32);
    background: repeating-linear-gradient(
        135deg,
        #f3efe6,
        #f3efe6 4px,
        #ece7db 4px,
        #ece7db 8px
    );
}

.rv-day--past:disabled {
    background: #f6f4ef;
}

.rv-day--selected {
    background: var(--ink) !important;
    color: #fff !important;
    border-color: var(--ink) !important;
    font-weight: 600;
}

.rv-day--inrange {
    background: rgba(200, 162, 86, 0.22);
    border-color: rgba(200, 162, 86, 0.4);
}

.rv-day--checkout-only:not(:disabled) {
    background: linear-gradient(135deg, #fdfbf7 0 48%, #f0eadd 52% 100%);
}

.rv-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.2rem;
    margin-top: 1rem;
    font-size: 0.88rem;
    font-weight: 400;
    color: var(--ink-soft);
}

.rv-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.rv-swatch {
    width: 1rem;
    height: 1rem;
    border-radius: 0.3rem;
    border: 1px solid var(--line-soft);
    display: inline-block;
}

.rv-swatch--free { background: #fdfbf7; }
.rv-swatch--taken { background: repeating-linear-gradient(135deg, #f3efe6, #f3efe6 3px, #ece7db 3px, #ece7db 6px); }
.rv-swatch--picked { background: var(--ink); border-color: var(--ink); }

.rv-cal__status {
    margin-top: 0.9rem;
    font-size: 0.95rem;
    color: var(--ink-soft);
}

/* ---------- Notices ---------- */

.rv-note {
    border-radius: 0.7rem;
    padding: 0.8rem 1rem;
    font-size: 0.96rem;
    border: 1px solid;
    margin-top: 1rem;
}

.rv-note--info { background: #f6f2e8; border-color: var(--line); color: var(--ink); }
.rv-note--ok { background: var(--ok-bg); border-color: #bcdcc0; color: var(--ok); }
.rv-note--warn { background: var(--warn-bg); border-color: #e7cdb0; color: var(--warn); }
.rv-note--bad { background: var(--bad-bg); border-color: #e8c3b6; color: var(--bad); }

.rv-note[hidden] { display: none; }

/* ---------- Payment methods ---------- */

.rv-methods {
    display: grid;
    gap: 0.7rem;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.rv-method {
    cursor: pointer;
    position: relative;
}

.rv-method input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.rv-method__body {
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
    border: 1px solid var(--line-soft);
    border-radius: 0.8rem;
    padding: 0.9rem 1rem;
    background: #fdfbf7;
    height: 100%;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.rv-method input:checked + .rv-method__body {
    border-color: var(--gold-deep);
    box-shadow: 0 0 0 2px rgba(200, 162, 86, 0.35);
    background: #fffdf8;
}

.rv-method input:focus-visible + .rv-method__body {
    outline: 3px solid var(--gold-deep);
    outline-offset: 2px;
}

.rv-method__icon {
    flex: none;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 0.6rem;
    display: grid;
    place-items: center;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--gold-deep);
}

.rv-method strong {
    display: block;
    font-size: 1.02rem;
}

.rv-method span {
    color: var(--ink-soft);
    font-size: 0.9rem;
}

.rv-card-fields {
    margin-top: 1.1rem;
}

.rv-card-fields[hidden] {
    display: none;
}

.rv-secure {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.8rem;
    color: var(--ink-soft);
    font-size: 0.9rem;
}

.rv-secure svg {
    color: var(--ok);
    flex: none;
}

/* ---------- Buttons ---------- */

.rv-btn {
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    border-radius: 999px;
    border: 1px solid transparent;
    padding: 0.85rem 2rem;
    min-height: 3.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.rv-btn--primary {
    background: linear-gradient(135deg, #d8b262, #b68c33);
    color: #fff;
    box-shadow: 0 12px 26px rgba(169, 131, 47, 0.28);
    width: 100%;
    font-size: 1.1rem;
}

.rv-btn--primary:hover:not(:disabled),
.rv-btn--primary:focus-visible:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(169, 131, 47, 0.34);
}

.rv-btn--ghost {
    background: #fff;
    border-color: var(--line);
    color: var(--ink);
}

.rv-btn--ghost:hover:not(:disabled) {
    background: var(--ink);
    color: var(--cream);
    border-color: var(--ink);
}

.rv-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.rv-spinner {
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-top-color: #fff;
    animation: rv-spin 0.8s linear infinite;
}

@keyframes rv-spin {
    to { transform: rotate(360deg); }
}

/* ---------- Summary aside ---------- */

.rv-aside {
    position: sticky;
    top: 6.5rem;
    display: grid;
    gap: 1.1rem;
}

@media (max-width: 1100px) {
    .rv-aside {
        position: static;
    }
}

.rv-summary__room {
    display: flex;
    gap: 0.9rem;
    align-items: center;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid var(--line-soft);
    margin-bottom: 0.9rem;
}

.rv-summary__room img {
    width: 5.5rem;
    height: 4.2rem;
    object-fit: cover;
    border-radius: 0.6rem;
    flex: none;
    background: #f0ece2;
}

.rv-summary h2 {
    font-size: 1.2rem;
    margin: 0 0 0.9rem;
}

.rv-summary dl {
    margin: 0;
    display: grid;
    grid-template-columns: auto auto;
    gap: 0.35rem 1rem;
    font-size: 0.98rem;
}

.rv-summary dt {
    color: var(--ink-soft);
}

.rv-summary dd {
    margin: 0;
    text-align: right;
    font-weight: 500;
}

.rv-lines {
    margin: 1rem 0 0;
    padding: 1rem 0 0;
    border-top: 1px solid var(--line-soft);
    display: grid;
    gap: 0.4rem;
    font-size: 0.98rem;
}

.rv-line {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.rv-line--discount {
    color: var(--ok);
}

.rv-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--line);
    font-size: 1.05rem;
    font-weight: 600;
}

.rv-total strong {
    font-size: 1.5rem;
    color: var(--gold-deep);
}

.rv-support {
    background: var(--ink);
    color: #f4efe3;
    border-radius: var(--radius);
    padding: 1.2rem 1.3rem;
    box-shadow: var(--shadow);
}

.rv-support h3 {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
}

.rv-support p {
    margin: 0 0 0.6rem;
    color: rgba(244, 239, 227, 0.8);
    font-size: 0.95rem;
}

.rv-support a {
    color: #f0d79a;
    font-weight: 600;
}

/* ---------- Payment panel ---------- */

.rv-pay {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 20rem;
    gap: 1.6rem;
    align-items: start;
}

@media (max-width: 860px) {
    .rv-pay {
        grid-template-columns: minmax(0, 1fr);
    }
}

.rv-qr {
    text-align: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.2rem;
    background: #fffdf8;
}

.rv-qr img {
    width: 100%;
    max-width: 16rem;
    height: auto;
    border-radius: 0.6rem;
    background: #fff;
}

.rv-qr figcaption {
    margin-top: 0.7rem;
    color: var(--ink-soft);
    font-size: 0.92rem;
}

.rv-countdown {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--gold-deep);
}

.rv-steps-list {
    margin: 0.6rem 0 0;
    padding-left: 1.3rem;
    color: var(--ink-soft);
    font-size: 0.98rem;
}

.rv-steps-list li + li {
    margin-top: 0.3rem;
}

/* ---------- Confirmation ---------- */

.rv-done {
    text-align: center;
    padding-block: 1rem;
}

.rv-done__tick {
    width: 4.5rem;
    height: 4.5rem;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--ok-bg);
    color: var(--ok);
    border: 1px solid #bcdcc0;
}

.rv-done h2 {
    margin: 0 0 0.4rem;
    font-size: 1.8rem;
}

.rv-done__ref {
    display: inline-block;
    margin: 0.6rem 0 1.2rem;
    padding: 0.5rem 1.4rem;
    border-radius: 999px;
    background: #fdfbf7;
    border: 1px dashed var(--gold);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.rv-done dl {
    max-width: 30rem;
    margin: 0 auto;
    text-align: left;
    display: grid;
    grid-template-columns: auto auto;
    gap: 0.45rem 1.2rem;
    padding: 1.1rem 1.3rem;
    background: #fdfbf7;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
}

.rv-done dt { color: var(--ink-soft); }
.rv-done dd { margin: 0; text-align: right; font-weight: 500; }

.rv-done__actions {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-top: 1.4rem;
}

/* ---------- Footer ---------- */

.rv-footer {
    border-top: 1px solid var(--line);
    background: #f4efe3;
    padding: 1.4rem 0;
    text-align: center;
    color: var(--ink-soft);
    font-size: 0.92rem;
}

.rv-footer a {
    color: var(--gold-deep);
}

/* ---------- Test-mode banner ---------- */

.rv-testbar {
    background: repeating-linear-gradient(135deg, #2f2a1f, #2f2a1f 12px, #3b3527 12px, #3b3527 24px);
    color: #f6e7bd;
    text-align: center;
    padding: 0.55rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.rv-testbar[hidden] {
    display: none;
}

/* ---------- Phones ---------- */

@media (max-width: 767px) {
    html {
        zoom: 0.92;
    }

    .rv-wrap {
        width: min(100% - 2rem, 40rem);
    }

    .rv-topbar .rv-wrap {
        gap: 0.5rem;
    }

    .rv-back {
        min-height: 3.1rem;
        padding: 0.5rem 1.1rem;
        font-size: 1rem;
    }

    .rv-call span {
        display: none;
    }

    .rv-call {
        padding: 0.5rem 0.7rem;
    }

    .rv-hero h1 {
        font-size: 2rem;
    }

    .rv-card {
        padding: 1.1rem;
    }

    .rv-phone {
        grid-template-columns: 6.5rem minmax(0, 1fr);
    }

    .rv-day {
        min-height: 2.9rem;
        font-size: 1rem;
    }

    .rv-total strong {
        font-size: 1.35rem;
    }
}

@media print {
    .rv-topbar, .rv-footer, .rv-done__actions, .rv-support { display: none; }
    body { background: #fff; }
}
