/* Guest booking site (/book), in Inns.PH's look. Self-contained: it loads
   neither style.css nor promo.css, so the booking pages stay small, but the
   tokens below are style.css's (tests keep them equal) and the components
   follow promo.css's and stays.css's.

   Inns.PH serves this file to every connected inn's booking pages, older
   versions' markup included: keep each class here while an inn's version may
   still use it. Those pages have no theme script, which is why dark, the
   public sites' default, is the theme without a data-theme. */

/* ─── Tokens: dark (default) ─── */
:root {
    color-scheme: dark;

    --bg: #0b1120;
    --card: #111a2e;
    --card-soft: #172136;
    --surface: #0b1120;
    --input-bg: #0f172a;

    --text: #e2e8f0;
    --text-secondary: #cbd5e1;
    --text-muted: #8b98ad;

    --border: #243049;
    --border-strong: #334561;

    --primary: #3b82f6;  --primary-dark: #2563eb;  --primary-soft: rgba(59,130,246,0.14);  --primary-border: rgba(59,130,246,0.45);  --primary-text: #7db3ff;
    --success: #16a34a;  --success-soft: rgba(34,197,94,0.14);  --success-border: rgba(34,197,94,0.45);  --success-text: #4ade80;
    --danger: #dc2626;   --danger-soft: rgba(239,68,68,0.14);   --danger-border: rgba(239,68,68,0.45);   --danger-text: #f87171;
    --warning-soft: rgba(245,158,11,0.14);  --warning-border: rgba(245,158,11,0.45);  --warning-text: #fbbf24;
    --neutral-soft: rgba(148,163,184,0.12); --neutral-border: rgba(148,163,184,0.35);

    --nav-border: #1e293b;
    --nav-text: rgba(226,232,240,0.6);
    --nav-text-active: #ffffff;

    --shadow: 0 1px 2px rgba(0,0,0,0.5);
    --focus-ring: 0 0 0 3px rgba(59,130,246,0.3);
    --radius: 4px;
    --radius-sm: 3px;
    --radius-lg: 6px;
    --transition: 0.15s ease;
}

/* ─── Tokens: light ─── */
[data-theme="light"] {
    color-scheme: light;

    --bg: #f3f4f6;
    --card: #ffffff;
    --card-soft: #f8f9fb;
    --surface: #0f172a;
    --input-bg: #ffffff;

    --text: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;

    --border: #e2e8f0;
    --border-strong: #cbd5e1;

    --primary: #2563eb;  --primary-dark: #1d4ed8;  --primary-soft: #eff6ff;  --primary-border: #bfdbfe;  --primary-text: #1d4ed8;
    --success: #16a34a;  --success-soft: #f0fdf4;  --success-border: #bbf7d0;  --success-text: #166534;
    --danger: #dc2626;   --danger-soft: #fef2f2;   --danger-border: #fecaca;   --danger-text: #991b1b;
    --warning-soft: #fffbeb;  --warning-border: #fde68a;  --warning-text: #92400e;
    --neutral-soft: #f1f5f9;  --neutral-border: #e2e8f0;

    --nav-border: #1e293b;
    --nav-text: rgba(255,255,255,0.62);
    --nav-text-active: #ffffff;

    --shadow: 0 1px 2px rgba(15,23,42,0.06);
    --focus-ring: 0 0 0 3px rgba(37,99,235,0.18);
}

/* ─── Base ─── */
* { box-sizing: border-box; }
html { background: var(--bg); }

body.book {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
h1, h2, h3 { color: var(--text); line-height: 1.25; }
a { color: var(--primary-text); }
strong { font-weight: 600; }

.book-wrap { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 24px; }

/* ─── Header (promo.css's .promo-header) ─── */
.book-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
}
/* Older markup also gives this .book-wrap; these win over it. */
.book-header-inner {
    max-width: 1200px;
    min-height: 58px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.book-brand {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.3px;
    text-decoration: none;
}
.book-brand-inns-ph { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; overflow: visible; }
.book-brand-inns-ph img { width: 28px; height: 28px; border-radius: 6px; display: block; flex-shrink: 0; }
.book-brand-accent { color: var(--primary-text); }
.book-nav { display: flex; gap: 2px; min-width: 0; }
.book-nav a {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.book-nav a:hover { color: var(--text); background: var(--card-soft); }
.book-header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.book-secure { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-secondary); white-space: nowrap; }

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    background: var(--card);
    color: var(--text-secondary);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}
.theme-toggle:hover { color: var(--text); background: var(--card-soft); border-color: var(--primary); }
.theme-toggle:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .theme-icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .theme-icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .theme-icon-moon { display: block; }

.book-main { flex: 1; padding-top: 22px; padding-bottom: 44px; }
.book-crumbs { font-size: 13px; color: var(--text-secondary); margin: 0 0 14px; }

/* ─── Footer (promo.css's .promo-footer) ─── */
.book-footer {
    background: var(--surface);
    border-top: 1px solid var(--nav-border);
    padding: 32px 0;
    text-align: center;
    color: var(--nav-text);
}
.book-footer .book-wrap { max-width: 688px; }
.book-contact { margin: 0 0 8px; white-space: pre-line; font-size: 14px; color: var(--nav-text-active); }
.book-footer .book-fineprint { margin: 0; color: var(--nav-text); }
.book-footer a { color: var(--nav-text-active); }
.book-footer-inns-ph { max-width: 640px; margin: 26px auto 0; padding: 26px 24px 0; border-top: 1px solid var(--nav-border); }
.book-footer-inns-ph:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.book-footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--nav-text-active);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin-bottom: 8px;
}
.book-footer-brand img { width: 26px; height: 26px; border-radius: 6px; display: block; }
.book-footer-tagline { color: var(--nav-text); font-size: 13px; margin: 0 0 16px; }
.book-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; }
.book-footer .book-footer-links a { color: var(--nav-text); font-size: 12.5px; text-decoration: none; transition: var(--transition); }
.book-footer .book-footer-links a:hover { color: var(--nav-text-active); }

/* ─── Hero ─── */
.book-hero { margin-bottom: 18px; }
.book-hero h1 { font-size: 30px; line-height: 1.2; margin: 0 0 6px; letter-spacing: -0.4px; }
.book-about { margin: 0; color: var(--text-secondary); font-size: 15px; max-width: 640px; white-space: pre-line; }

/* ─── Cards (promo.css's .public-card) ─── */
.book-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 24px;
}

/* ─── Fields (stays.css's .stays-field) ─── */
.book-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; min-width: 0; }
.book-field label { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.book-field small, .book-optional { color: var(--text-muted); font-size: 12px; font-weight: 400; }
.book-field input, .book-field select, .book-field textarea {
    width: 100%;
    padding: 9px 10px;
    font: inherit;
    font-size: 14px;
    line-height: 1.4;
    color: var(--text);
    background: var(--input-bg);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    transition: border-color var(--transition), box-shadow var(--transition);
}
/* Date, time and select boxes are otherwise a few pixels taller than text
   boxes, which shows when they sit side by side. */
.book-field input:not([type="radio"]):not([type="checkbox"]), .book-field select { height: 40px; }
.book-field input:focus, .book-field select:focus, .book-field textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--focus-ring);
}
.book-field input::placeholder, .book-field textarea::placeholder { color: var(--text-muted); opacity: 0.8; }
.book-field input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }

/* Search bar */
.book-search { display: grid; grid-template-columns: 1.2fr 1fr 1.4fr 0.6fr auto; gap: 10px; align-items: end; padding: 14px; }
.book-search .book-field { margin-bottom: 0; }

/* ─── Buttons (promo.css's .promo-btn) ─── */
.book-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 20px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}
.book-btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.book-btn-primary { background: var(--primary); color: #fff; }
.book-btn-primary:hover { background: var(--primary-dark); color: #fff; }
.book-btn-primary:disabled { opacity: 0.7; cursor: progress; }
.book-btn-secondary { background: transparent; color: var(--text); border-color: var(--border-strong); }
.book-btn-secondary:hover { background: var(--card-soft); border-color: var(--primary); color: var(--text); }
.book-btn-block { width: 100%; white-space: normal; }

/* ─── Alerts (promo.css's .public-alert) ─── */
.book-alert {
    margin: 16px 0;
    padding: 11px 14px;
    border: 1px solid;
    border-left-width: 3px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
}
.book-alert-error { background: var(--danger-soft); color: var(--danger-text); border-color: var(--danger-border); border-left-color: var(--danger); }
.book-alert-success {
    background: var(--success-soft); color: var(--success-text); border-color: var(--success-border); border-left-color: var(--success);
    max-width: 560px; margin: 0 auto 16px;
}

/* ─── Results ─── */
.book-results { margin-top: 20px; }
.book-stay-summary {
    display: flex; flex-wrap: wrap; gap: 10px 32px;
    padding: 12px 16px; border: 1px solid var(--primary-border); border-radius: var(--radius-lg);
    background: var(--primary-soft); margin-bottom: 18px;
}
.book-label { display: block; font-size: 12px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.4px; }
.book-results-title { font-size: 18px; margin: 0 0 10px; }
.book-offers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
/* stays.css's .stay-offer */
.book-offer { display: flex; justify-content: space-between; gap: 14px 24px; align-items: center; padding: 16px 18px; }
.book-offer h3 { margin: 0 0 4px; font-size: 16px; }
.book-offer-desc { margin: 0; color: var(--text-secondary); font-size: 13px; white-space: pre-line; }
.book-scarce { margin: 6px 0 0; color: var(--danger-text); font-size: 12px; font-weight: 600; }
.book-deal {
    display: inline-block; margin: 8px 0 0; padding: 2px 9px; border: 1px solid var(--primary-border); border-radius: 999px;
    background: var(--primary-soft); color: var(--primary-text); font-size: 11.5px; font-weight: 700;
}
.book-offer-price { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex-shrink: 0; }
.book-offer-price .book-btn { margin-top: 8px; }
.book-total { font-size: 20px; font-weight: 700; color: var(--text); }
.book-was { color: var(--text-muted); text-decoration: line-through; font-size: 13px; }
.book-price-note { color: var(--text-secondary); font-size: 12px; }
.book-empty h2 { margin: 0 0 6px; font-size: 16px; }
.book-empty p { margin: 0; color: var(--text-secondary); }

/* ─── How it works ─── */
.book-how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.book-how > div { display: flex; gap: 12px; align-items: flex-start; }
.book-how p { margin: 0; color: var(--text-secondary); font-size: 13px; }
.book-how strong { display: block; color: var(--text); font-size: 14px; margin-bottom: 2px; }
.book-step {
    flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
    background: var(--primary); color: #fff; font-weight: 700; font-size: 13px;
    display: inline-flex; align-items: center; justify-content: center;
}

/* ─── Details + summary ─── */
.book-back { margin: 0 0 14px; font-size: 13px; }
.book-back a { text-decoration: none; font-weight: 500; }
.book-back a:hover { text-decoration: underline; }
.book-checkout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr); gap: 20px; align-items: start; }
.book-form h1 { font-size: 22px; margin: 0 0 16px; }
.book-summary h2 { font-size: 18px; margin: 0 0 4px; }
/* Clear of the sticky header, as stays.css's .stay-detail-side. */
.book-summary { position: sticky; top: 76px; }
.book-dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 16px 0 0; font-size: 14px; }
.book-dl dt { color: var(--text-secondary); }
.book-dl dd { margin: 0; text-align: right; }
.book-price-lines { border-top: 1px solid var(--border); padding-top: 16px; }
.book-total-line { font-weight: 700; font-size: 16px; color: var(--text) !important; }
.book-pay-methods { display: flex; gap: 8px; justify-content: center; margin: 12px 0; }
.book-chip { font-size: 12px; padding: 3px 10px; border: 1px solid var(--border-strong); border-radius: 999px; color: var(--text-secondary); }
.book-fineprint { margin: 12px 0 0; font-size: 12px; color: var(--text-muted); line-height: 1.5; }

/* ─── Status page ─── */
.book-status { max-width: 560px; margin: 0 auto; text-align: center; }
.book-status h1 { font-size: 24px; margin: 8px 0; }
.book-status > p { color: var(--text-secondary); }
.book-status .book-dl { text-align: left; border-top: 1px solid var(--border); padding-top: 16px; margin-bottom: 16px; }
.book-status-icon {
    width: 56px; height: 56px; margin: 0 auto; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 26px; font-weight: 700;
    background: var(--warning-soft); color: var(--warning-text); border: 1px solid var(--warning-border);
}
.book-status-confirmed .book-status-icon { background: var(--success-soft); color: var(--success-text); border-color: var(--success-border); }
.book-status-cancelled .book-status-icon,
.book-status-expired .book-status-icon { background: var(--neutral-soft); color: var(--text-muted); border-color: var(--neutral-border); }
.book-status-declined .book-status-icon { background: var(--danger-soft); color: var(--danger-text); border-color: var(--danger-border); }
.book-ref { font-size: 16px; letter-spacing: 0.06em; }

/* ─── Paying by GCash ─── */
.book-pay-choice { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.book-pay-choice legend { font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; padding: 0; }
.book-pay-option {
    display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; margin-bottom: 8px;
    border: 1px solid var(--border-strong); border-radius: var(--radius); cursor: pointer;
    font-weight: 400 !important; transition: var(--transition);
}
.book-pay-option:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 2px var(--primary-soft); }
.book-pay-option:has(input:focus-visible) { box-shadow: var(--focus-ring); }
.book-field .book-pay-option input {
    flex: none; width: 16px; height: 16px; margin: 2px 0 0; padding: 0;
    border: 0; box-shadow: none; accent-color: var(--primary);
}
.book-pay-option span { display: flex; flex-direction: column; gap: 2px; }
.book-pay-option strong { font-size: 14px; color: var(--text); }
.book-gcash { display: flex; gap: 20px; align-items: center; text-align: left; margin: 16px 0; flex-wrap: wrap; justify-content: center; }
/* The QR stays on white in either theme so phones can read it, framed in
   GCash blue as on Inns.PH's booking requests. */
.book-gcash-qr { margin: 0; padding: 12px; border: 2px solid #0b6bd6; border-radius: var(--radius-lg); background: #fff; }
.book-gcash-qr img { display: block; width: 220px; height: 220px; object-fit: contain; }
.book-gcash-qr figcaption { display: flex; flex-direction: column; align-items: center; margin-top: 8px; font-size: 13px; color: #0f172a; }
.book-gcash-qr figcaption span { color: #475569; letter-spacing: 0.04em; }
.book-gcash-steps { flex: 1; min-width: 200px; margin: 0; padding-left: 20px; font-size: 14px; color: var(--text); }
.book-gcash-steps li { margin-bottom: 8px; }
.book-gcash-form { text-align: left; margin-bottom: 8px; }

@media (max-width: 768px) {
    .book-nav { display: none; }
}
@media (max-width: 760px) {
    .book-wrap { padding-left: 16px; padding-right: 16px; }
    .book-header-inner { padding: 12px 16px; }
    .book-hero h1 { font-size: 24px; }
    .book-search { grid-template-columns: 1fr 1fr; }
    .book-field-action { grid-column: 1 / -1; }
    .book-field-action .book-btn { width: 100%; }
    .book-offer { flex-direction: column; align-items: stretch; }
    .book-offer-price { align-items: flex-start; }
    .book-offer-price .book-btn { width: 100%; }
    .book-how { grid-template-columns: 1fr; }
    .book-checkout { grid-template-columns: 1fr; }
    .book-summary { position: static; order: -1; }
    .book-card { padding: 18px; }
    /* Below 16px, phones zoom into the field the guest taps. */
    .book-field input, .book-field select, .book-field textarea { font-size: 16px; }
    .book-field input:not([type="radio"]):not([type="checkbox"]), .book-field select { height: 44px; }
}
@media (max-width: 480px) {
    .book-header-inner { padding: 12px 14px; gap: 8px; }
    .book-header-actions { gap: 8px; }
}
@media (max-width: 370px) {
    .book-brand-inns-ph > span { display: none; }
}
