/* ==========================================================================
   Sathorn111 — private tour scheduler
   A two-step modal: choose a day and time, then say who you are.
   Kept in its own file so the main stylesheet stays as it is.
   ========================================================================== */

.tour-backdrop {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    place-items: center;
    padding: 1.5rem 1rem;
    background: rgba(28, 24, 17, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow-y: auto;
}

.tour-backdrop.is-open { opacity: 1; visibility: visible; }

.tour-modal {
    width: min(100%, 44rem);
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
    background: linear-gradient(180deg, #fffdf8 0%, #fdf8ee 100%);
    border: 1px solid rgba(200, 162, 86, 0.4);
    border-radius: 1.2rem;
    box-shadow: 0 30px 70px rgba(28, 24, 17, 0.35);
    transform: translateY(14px) scale(0.985);
    transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.tour-backdrop.is-open .tour-modal { transform: none; }

.tour-modal__head {
    position: relative;
    padding: 1.6rem 1.8rem 1.1rem;
    border-bottom: 1px solid rgba(200, 162, 86, 0.26);
    text-align: center;
}

.tour-modal__eyebrow {
    margin: 0 0 0.35rem;
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: #a9832f;
    font-weight: 700;
}

.tour-modal__head h2 {
    margin: 0 0 0.3rem;
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.tour-modal__head p { margin: 0; color: #6b6257; font-size: 0.97rem; }

.tour-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 1px solid rgba(200, 162, 86, 0.35);
    background: #fff;
    color: #2f2a1f;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.tour-close:hover { background: #2f2a1f; color: #fbf6ec; }

/* ---------- step rail ---------- */

.tour-steps {
    display: flex;
    justify-content: center;
    gap: 1.1rem;
    padding: 0.9rem 1.8rem 0;
}

.tour-steps span {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #a39883;
}

.tour-steps span::before {
    content: attr(data-step);
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #f1ead9;
    color: #8a7f6d;
    font-size: 0.76rem;
}

.tour-steps span[aria-current="step"] { color: #2f2a1f; }
.tour-steps span[aria-current="step"]::before { background: #c8a256; color: #fff; }
.tour-steps span.is-done::before { background: #2f6b3a; color: #fff; }

.tour-body { padding: 1.2rem 1.8rem 1.8rem; }

.tour-panel[hidden] { display: none; }

/* ---------- fields ---------- */

.tour-field { margin-bottom: 1.05rem; }

.tour-field > label,
.tour-legend {
    display: block;
    font-weight: 600;
    font-size: 0.93rem;
    margin-bottom: 0.4rem;
}

.tour-optional { font-weight: 400; color: #8a7f6d; font-size: 0.85rem; }

.tour-field input[type="text"],
.tour-field input[type="email"],
.tour-field input[type="tel"],
.tour-field select,
.tour-field textarea {
    width: 100%;
    font: inherit;
    font-size: 1rem;
    color: #2f2a1f;
    min-height: 3.1rem;
    padding: 0.65rem 0.85rem;
    border: 1px solid rgba(47, 42, 31, 0.14);
    border-radius: 0.65rem;
    background: #fffdf9;
}

.tour-field textarea { min-height: 5.5rem; resize: vertical; }

.tour-field input:focus,
.tour-field select:focus,
.tour-field textarea:focus {
    outline: none;
    border-color: #c8a256;
    box-shadow: 0 0 0 3px rgba(200, 162, 86, 0.22);
}

.tour-field input[aria-invalid="true"],
.tour-field select[aria-invalid="true"] {
    border-color: #9c3c22;
    background: #fdf0ec;
}

.tour-error {
    display: block;
    margin-top: 0.3rem;
    color: #9c3c22;
    font-size: 0.86rem;
    font-weight: 600;
}

.tour-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }
.tour-grid--phone { grid-template-columns: 8rem minmax(0, 1fr); gap: 0.5rem; }

/* ---------- viewing type ---------- */

.tour-types { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }

.tour-type { position: relative; cursor: pointer; }
.tour-type input { position: absolute; opacity: 0; pointer-events: none; }

.tour-type__body {
    display: block;
    height: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(47, 42, 31, 0.14);
    border-radius: 0.7rem;
    background: #fffdf9;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.tour-type input:checked + .tour-type__body {
    border-color: #a9832f;
    box-shadow: 0 0 0 2px rgba(200, 162, 86, 0.32);
    background: #fffaf0;
}

.tour-type input:focus-visible + .tour-type__body {
    outline: 3px solid #a9832f;
    outline-offset: 2px;
}

.tour-type strong { display: block; font-size: 1rem; }
.tour-type span { display: block; font-size: 0.85rem; color: #6b6257; }

/* ---------- day strip and time slots ---------- */

.tour-days {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.2rem 0.1rem 0.6rem;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}

.tour-day {
    flex: 0 0 auto;
    scroll-snap-align: start;
    min-width: 4.4rem;
    padding: 0.55rem 0.6rem;
    border: 1px solid rgba(47, 42, 31, 0.14);
    border-radius: 0.7rem;
    background: #fffdf9;
    cursor: pointer;
    text-align: center;
    font: inherit;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.tour-day small {
    display: block;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8a7f6d;
}

.tour-day b { display: block; font-size: 1.15rem; font-weight: 600; line-height: 1.2; }
.tour-day i { display: block; font-size: 0.72rem; font-style: normal; color: #8a7f6d; }

.tour-day:hover { border-color: #c8a256; }

.tour-day[aria-pressed="true"] {
    background: #2f2a1f;
    border-color: #2f2a1f;
    color: #fbf6ec;
}

.tour-day[aria-pressed="true"] small,
.tour-day[aria-pressed="true"] i { color: rgba(251, 246, 236, 0.75); }

.tour-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(5.2rem, 1fr));
    gap: 0.5rem;
    margin-top: 0.3rem;
}

.tour-slot {
    font: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    min-height: 2.9rem;
    padding: 0.4rem 0.3rem;
    border: 1px solid rgba(47, 42, 31, 0.14);
    border-radius: 0.6rem;
    background: #fffdf9;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.tour-slot:hover:not(:disabled) { border-color: #c8a256; }

.tour-slot[aria-pressed="true"] {
    background: linear-gradient(135deg, #d8b262, #b68c33);
    border-color: #b68c33;
    color: #fff;
    font-weight: 600;
}

.tour-slot:disabled { opacity: 0.4; cursor: not-allowed; text-decoration: line-through; }

.tour-chosen {
    margin: 1rem 0 0;
    padding: 0.75rem 0.95rem;
    border-radius: 0.7rem;
    background: #fffaf0;
    border: 1px dashed #c8a256;
    font-size: 0.95rem;
}

/* ---------- consent and actions ---------- */

.tour-consent {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
    font-size: 0.93rem;
    color: #4a4335;
    line-height: 1.5;
    cursor: pointer;
}

.tour-consent input {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.15rem;
    flex: none;
    accent-color: #a9832f;
}

.tour-actions { display: flex; gap: 0.6rem; margin-top: 1.3rem; flex-wrap: wrap; }

.tour-btn {
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    min-height: 3.2rem;
    padding: 0.6rem 1.6rem;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.tour-btn--primary {
    flex: 1 1 14rem;
    background: linear-gradient(135deg, #d8b262, #b68c33);
    color: #fff;
    box-shadow: 0 12px 24px rgba(169, 131, 47, 0.26);
}

.tour-btn--primary:hover:not(:disabled) { transform: translateY(-1px); }
.tour-btn--primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

.tour-btn--ghost { background: #fff; border-color: rgba(47, 42, 31, 0.16); color: #2f2a1f; }
.tour-btn--ghost:hover { background: #2f2a1f; color: #fbf6ec; }

.tour-note { margin: 0.9rem 0 0; font-size: 0.86rem; color: #6b6257; text-align: center; }

.tour-alert {
    margin: 0 0 1rem;
    padding: 0.8rem 1rem;
    border-radius: 0.65rem;
    border: 1px solid #e8c3b6;
    background: #fdf0ec;
    color: #9c3c22;
    font-size: 0.93rem;
}

.tour-alert[hidden] { display: none; }

/* ---------- confirmation ---------- */

.tour-done { text-align: center; padding: 0.5rem 0 0; }

.tour-done__seal {
    width: 4.6rem;
    height: 4.6rem;
    margin: 0 auto 1.1rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 30% 25%, #f3e3bd, #d8b262 70%);
    color: #4a3813;
    box-shadow: 0 12px 26px rgba(169, 131, 47, 0.3);
}

.tour-done h3 { margin: 0 0 0.5rem; font-size: 1.45rem; font-weight: 600; }
.tour-done p { margin: 0 auto 0.6rem; color: #6b6257; max-width: 30rem; }

.tour-done__card {
    margin: 1.1rem auto 0;
    max-width: 24rem;
    padding: 0.95rem 1.1rem;
    border-radius: 0.8rem;
    background: #fffaf0;
    border: 1px dashed #c8a256;
    text-align: left;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.3rem 1rem;
    font-size: 0.95rem;
}

.tour-done__card dt { color: #8a7f6d; }
.tour-done__card dd { margin: 0; font-weight: 600; }

.tour-chat { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; margin-top: 1.3rem; }

.tour-chat a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 3rem;
    padding: 0.55rem 1.3rem;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
}

.tour-chat .is-line { background: #06c755; color: #fff; }
.tour-chat .is-whatsapp { background: #25d366; color: #0b2d16; }
.tour-chat .is-call { background: #fff; border-color: rgba(47, 42, 31, 0.16); color: #2f2a1f; }
.tour-chat a:hover { filter: brightness(1.06); }

/* ---------- the band in the availability section ---------- */

.tour-band {
    margin: 1.6rem 0 0;
    padding: 1.3rem 1.6rem;
    border-radius: 1rem;
    border: 1px solid rgba(200, 162, 86, 0.35);
    background: linear-gradient(135deg, #fffaf0, #f8eeda);
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex-wrap: wrap;
}

.tour-band__btn { flex: 0 0 auto; }

.tour-band__copy { flex: 1 1 20rem; }
.tour-band__copy strong { display: block; font-size: 1.15rem; font-weight: 600; margin-bottom: 0.2rem; }
.tour-band__copy span { color: #6b6257; font-size: 0.97rem; }

/* The home page is zoomed to 0.8 on phones, so every size here is scaled
   down by a fifth. These are set larger to land back on comfortable sizes. */
@media (max-width: 767px) {
    .tour-modal { border-radius: 1rem; }
    .tour-modal__head { padding: 1.3rem 1.2rem 1rem; }
    .tour-body { padding: 1rem 1.2rem 1.5rem; }
    .tour-grid { grid-template-columns: minmax(0, 1fr); }
    .tour-grid--phone { grid-template-columns: 7rem minmax(0, 1fr); }
    .tour-types { grid-template-columns: minmax(0, 1fr); }
    .tour-btn { min-height: 3.9rem; font-size: 1.1rem; }

    .tour-slot { min-height: 3.6rem; font-size: 1.05rem; }

    .tour-day { min-width: 5rem; padding: 0.7rem 0.6rem; }
    .tour-day b { font-size: 1.3rem; }
    .tour-day small, .tour-day i { font-size: 0.8rem; }

    .tour-consent { font-size: 1rem; }
    .tour-consent input { width: 1.45rem; height: 1.45rem; }

    .tour-close { width: 3.4rem; height: 3.4rem; }

    .tour-chat a { min-height: 3.6rem; font-size: 1.05rem; }

    .tour-field input,
    .tour-field select,
    .tour-field textarea { font-size: 1.05rem; min-height: 3.3rem; }

}

@media (prefers-reduced-motion: reduce) {
    .tour-backdrop, .tour-modal, .tour-btn { transition: none; }
}
