/*
 * Styles for the guest Reserve / Book pages (resources/views/booking-flow, public/js/booking-flow.js)
 * and the Function Hall overview. They sit on top of landing.css's bk-* look and only add what the
 * wizard needs. Dark is the base; html[data-theme="light"] overrides follow, same as landing.css.
 */

.bf-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.bf-eyebrow { color: #f5a623; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.bf-section { margin-top: 1.5rem; }
.bf-section:first-child { margin-top: 0; }
.bf-note { font-size: 0.78rem; color: #8a9ab0; margin-top: 0.4rem; line-height: 1.5; }
.bf-muted { color: #8a9ab0; }
.bf-unit { font-size: 0.68rem; color: #8a9ab0; font-weight: 600; }
.bf-hidden { display: none !important; }

/* ---- Form rows ---- */
.bf-stepper { display: inline-flex; align-items: center; gap: 0.7rem; }
.bf-stepper input { width: 3.2rem; text-align: center; padding: 0.45rem 0.3rem; }
.bf-readonly {
    background: #0a1420; border: 1.5px solid rgba(255,255,255,0.1); border-radius: 10px;
    padding: 0.7rem 0.95rem; color: #fff; font-size: 0.88rem; font-weight: 700;
}
.bf-readonly.is-off { opacity: 0.6; }
.bf-inline-error { color: #ff8080; font-size: 0.76rem; margin-top: 0.3rem; }

/* ---- Item cards (selection / browse) ---- */
.bf-list { display: grid; gap: 1.1rem; }
.bf-item {
    display: grid; grid-template-columns: 170px 1fr; gap: 1.1rem; align-items: stretch;
    background: #101d2e; border: 1px solid rgba(255,255,255,0.06); border-radius: 16px; overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.bf-item.is-picked { border-color: #f5a623; box-shadow: 0 0 0 2px rgba(245,166,35,0.3); }
.bf-item.is-off { opacity: 0.55; }
.bf-item-img { position: relative; background: #0a1420; min-height: 140px; }
.bf-item-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bf-item-banner {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 0.4rem 0.6rem; font-size: 0.7rem; font-weight: 700;
    background: rgba(160,30,30,0.9); color: #fff; text-align: center;
}
.bf-item-body { padding: 1rem 1.1rem 1rem 0; display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.bf-item-name { font-size: 1rem; font-weight: 800; color: #fff; text-transform: uppercase; letter-spacing: 0.02em; }
.bf-item-meta { font-size: 0.76rem; color: #8a9ab0; }
.bf-item-meta.is-cottage { color: #f5a623; }
.bf-item-desc { font-size: 0.78rem; color: #8a9ab0; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bf-item-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; padding-top: 0.5rem; }
.bf-price { font-size: 0.95rem; font-weight: 800; color: #f5a623; }
.bf-pill {
    display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.7rem; font-weight: 700; padding: 0.2rem 0.6rem;
    border-radius: 50px; background: rgba(255,255,255,0.08); color: #c8d3e0;
}
.bf-pill-ok { background: rgba(47,143,91,0.18); color: #7be3a8; }
.bf-pill-off { background: rgba(220,38,38,0.15); color: #ff8080; }
.bf-pill-picked { background: #f5a623; color: #0f1f3d; }
.bf-toggle { min-width: 6.5rem; }
@media (max-width: 640px) {
    .bf-item { grid-template-columns: 1fr; }
    .bf-item-body { padding: 0 1rem 1rem; }
}

/* ---- Review / summary ---- */
.bf-card-stack { display: grid; gap: 1.1rem; }
.bf-rows { display: grid; gap: 0.7rem; }
.bf-row { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.86rem; }
.bf-row > span:first-child { color: #8a9ab0; }
.bf-row > span:last-child { font-weight: 700; color: #fff; text-align: right; }
.bf-line { display: flex; justify-content: space-between; gap: 1rem; padding: 0.7rem 0; border-top: 1px solid rgba(255,255,255,0.07); }
.bf-line:first-of-type { border-top: 0; }
.bf-line-name { font-weight: 700; color: #fff; font-size: 0.86rem; }
.bf-line-meta { font-size: 0.74rem; color: #8a9ab0; margin-top: 0.15rem; }
.bf-line-price { font-weight: 800; color: #f5a623; white-space: nowrap; }
.bf-total { display: flex; justify-content: space-between; font-size: 1.05rem; font-weight: 800; color: #f5a623; padding-top: 0.9rem; border-top: 1px solid rgba(255,255,255,0.12); margin-top: 0.4rem; }
.bf-notice { border-left: 3px solid #f5a623; background: rgba(245,166,35,0.08); padding: 0.9rem 1rem; border-radius: 8px; font-size: 0.8rem; line-height: 1.6; color: #c8d3e0; }
.bf-notice strong { color: #f5a623; display: block; margin-bottom: 0.35rem; font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; }
.bf-checks { display: grid; gap: 0.7rem; margin-top: 1rem; }
.bf-check { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.82rem; color: #c8d3e0; cursor: pointer; }
.bf-check input { margin-top: 0.15rem; accent-color: #f5a623; }
.bf-check.is-off { opacity: 0.55; cursor: not-allowed; }
.bf-check-note { display: block; font-size: 0.72rem; font-style: normal; opacity: 0.85; margin-top: 0.1rem; }
.bf-actions { display: flex; justify-content: flex-end; gap: 0.8rem; margin-top: 1.5rem; flex-wrap: wrap; }
.bf-actions.is-split { justify-content: space-between; }

/* ---- Payment ---- */
.bf-qr { text-align: center; }
.bf-qr img { width: 210px; max-width: 70%; border-radius: 12px; background: #fff; padding: 0.5rem; }
.bf-qr-meta { margin-top: 0.7rem; font-size: 0.84rem; font-weight: 700; color: #fff; line-height: 1.5; }
.bf-proof { position: relative; display: flex; align-items: center; justify-content: center; min-height: 150px; border: 1.5px dashed rgba(255,255,255,0.2); border-radius: 14px; overflow: hidden; cursor: pointer; }
.bf-proof:hover { border-color: #f5a623; }
.bf-proof input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.bf-proof img { width: 100%; max-height: 260px; object-fit: contain; display: block; }
.bf-proof-hint { color: #8a9ab0; font-size: 0.82rem; padding: 1rem; text-align: center; }

/* ---- Status / timeline ---- */
.bf-status { display: flex; align-items: center; gap: 0.6rem; font-weight: 800; font-size: 1rem; }
.bf-dot { width: 12px; height: 12px; border-radius: 50%; background: #f5a623; flex-shrink: 0; }
.bf-dot.is-ok { background: #2f8f5b; }
.bf-dot.is-bad { background: #dc2626; }
.bf-dot.is-muted { background: #6b7d92; }
.bf-timeline { display: grid; gap: 0; margin-top: 0.4rem; }
.bf-tl { display: grid; grid-template-columns: 18px 1fr; gap: 0.8rem; position: relative; padding-bottom: 1.1rem; }
.bf-tl:last-child { padding-bottom: 0; }
.bf-tl::before { content: ""; position: absolute; left: 8px; top: 16px; bottom: 0; width: 2px; background: #f5a623; }
.bf-tl.is-upcoming::before { background: rgba(255,255,255,0.15); }
.bf-tl:last-child::before { display: none; }
.bf-tl-dot { width: 14px; height: 14px; border-radius: 50%; background: #f5a623; margin-top: 2px; }
.bf-tl.is-upcoming .bf-tl-dot { background: transparent; border: 2px solid rgba(255,255,255,0.3); }
.bf-tl-label { font-weight: 700; font-size: 0.86rem; color: #fff; }
.bf-tl.is-current .bf-tl-label { font-weight: 800; }
.bf-tl.is-upcoming .bf-tl-label { color: #6b7d92; }
.bf-tl-meta { font-size: 0.74rem; color: #8a9ab0; margin-top: 0.1rem; }

/* ---- Result screens ---- */
.bf-result { text-align: center; padding: 1rem 0; }
.bf-result .bk-confirm-icon { margin: 0 auto 1.2rem; }
.bf-ref { margin: 1.2rem auto; display: inline-block; background: rgba(245,166,35,0.1); border: 1px solid rgba(245,166,35,0.4); border-radius: 12px; padding: 0.8rem 1.4rem; }
.bf-ref-label { font-size: 0.68rem; color: #8a9ab0; text-transform: uppercase; letter-spacing: 0.08em; }
.bf-ref-value { font-size: 1.25rem; font-weight: 800; color: #f5a623; letter-spacing: 0.04em; }
.bf-result-actions { display: flex; justify-content: center; gap: 0.8rem; flex-wrap: wrap; margin-top: 1.5rem; }
.bf-loading { text-align: center; padding: 3rem 0; color: #8a9ab0; }

/* ---- Dialogs ---- */
.bf-modal { position: fixed; inset: 0; background: rgba(5,10,18,0.7); display: flex; align-items: center; justify-content: center; z-index: 500; padding: 1rem; }
.bf-modal[hidden] { display: none; }
.bf-modal-box { background: #101d2e; border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; padding: 1.6rem; width: 100%; max-width: 440px; max-height: 90vh; overflow: auto; }
.bf-modal-title { font-size: 1.05rem; font-weight: 800; color: #fff; margin-bottom: 0.7rem; }
.bf-modal-text { font-size: 0.86rem; color: #c8d3e0; line-height: 1.6; }
.bf-modal-actions { display: flex; justify-content: flex-end; gap: 0.7rem; margin-top: 1.3rem; }

/* ---- Messages ---- */
.bf-toast {
    position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); z-index: 600;
    max-width: min(92vw, 460px); padding: 0.8rem 1.2rem; border-radius: 10px; font-size: 0.84rem; font-weight: 600;
    background: #1f2d40; color: #fff; box-shadow: 0 8px 28px rgba(0,0,0,0.35); text-align: center;
}

/* ---- Function Hall overview ---- */
.bf-overview { padding: 0; overflow: hidden; }
.bf-overview-img { width: 100%; max-height: 380px; object-fit: cover; display: block; }
.bf-overview-body { padding: 1.5rem; display: grid; gap: 0.9rem; }
.bf-overview-meta { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.bf-overview-cap { font-size: 0.82rem; color: #8a9ab0; font-weight: 600; }
.bf-overview-desc { max-width: none; }

/* ---- Landing page: two buttons per card ---- */
.lp-room-footer .lp-card-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: flex-end; }
.lp-btn-book.is-secondary { background: transparent; color: #ffc72c; border: 1.5px solid #ffc72c; padding: calc(0.6rem - 1.5px) calc(1.2rem - 1.5px); text-decoration: none; }
.lp-btn-book.is-secondary:hover { background: rgba(255,199,44,0.12); }
html[data-theme="light"] .lp-btn-book.is-secondary { background: transparent; color: #2450C4; border-color: #2450C4; }
html[data-theme="light"] .lp-btn-book.is-secondary:hover { background: rgba(36,80,196,0.08); }

/* ================= Light theme ================= */
html[data-theme="light"] .bf-readonly { background: #F3F4F6; border-color: #E0E0E0; color: #1A1A1A; }
html[data-theme="light"] .bf-item,
html[data-theme="light"] .bf-modal-box { background: #fff; border-color: #E8E8E8; box-shadow: 0 1px 3px rgba(58,46,30,0.10); }
html[data-theme="light"] .bf-item-img { background: #F3F4F6; }
html[data-theme="light"] .bf-item-name,
html[data-theme="light"] .bf-row > span:last-child,
html[data-theme="light"] .bf-line-name,
html[data-theme="light"] .bf-tl-label,
html[data-theme="light"] .bf-modal-title,
html[data-theme="light"] .bf-qr-meta { color: #1A1A1A; }
html[data-theme="light"] .bf-item-meta,
html[data-theme="light"] .bf-item-desc,
html[data-theme="light"] .bf-note,
html[data-theme="light"] .bf-muted,
html[data-theme="light"] .bf-row > span:first-child,
html[data-theme="light"] .bf-line-meta,
html[data-theme="light"] .bf-tl-meta,
html[data-theme="light"] .bf-proof-hint,
html[data-theme="light"] .bf-ref-label,
html[data-theme="light"] .bf-overview-cap,
html[data-theme="light"] .bf-loading { color: #666666; }
html[data-theme="light"] .bf-item-meta.is-cottage { color: #C1440E; }
html[data-theme="light"] .bf-notice,
html[data-theme="light"] .bf-check,
html[data-theme="light"] .bf-modal-text { color: #1A1A1A; }
html[data-theme="light"] .bf-line { border-top-color: #E8E8E8; }
html[data-theme="light"] .bf-total { border-top-color: #E0E0E0; color: #C1440E; }
html[data-theme="light"] .bf-price,
html[data-theme="light"] .bf-line-price,
html[data-theme="light"] .bf-ref-value { color: #C1440E; }
html[data-theme="light"] .bf-pill { background: #F3F4F6; color: #1A1A1A; }
html[data-theme="light"] .bf-pill-ok { background: #dcfce7; color: #166534; }
html[data-theme="light"] .bf-pill-off { background: #fee2e2; color: #b91c1c; }
html[data-theme="light"] .bf-pill-picked { background: #C1440E; color: #FFFFFF; }
html[data-theme="light"] .bf-proof,
html[data-theme="light"] .bf-tl.is-upcoming .bf-tl-dot { border-color: #cbd5e1; }
html[data-theme="light"] .bf-tl.is-upcoming::before { background: #cbd5e1; }
html[data-theme="light"] .bf-inline-error { color: #B3402F; }

/* ---- Dates-first pages, coupons, payment summary ---- */
.bf-section { margin-top: 1.4rem; }
.bf-coupon { cursor: pointer; margin-top: 0; }
.bf-coupon:hover { border-color: #f5a623; }
.bf-coupons { display: grid; gap: 0.6rem; }
.bf-coupon-opt { text-align: left; background: rgba(255,255,255,0.05); border: 1.5px solid transparent; border-radius: 12px; padding: 0.7rem 0.9rem; display: grid; gap: 0.15rem; font-family: inherit; color: inherit; cursor: pointer; }
.bf-coupon-opt b { font-size: 0.86rem; }
.bf-coupon-opt span { font-size: 0.76rem; color: #8a9ab0; }
.bf-coupon-opt.is-on { border-color: #f5a623; }
.bf-paysummary { background: rgba(255,255,255,0.05); border-radius: 10px; padding: 0.7rem 0.9rem; display: grid; gap: 0.35rem; }
html[data-theme="light"] .bf-coupon-opt, html[data-theme="light"] .bf-paysummary { background: #F3F4F6; }
html[data-theme="light"] .bf-coupon:hover { border-color: #C1440E; }

/* ---- Package Promos: landing carousel + details ---- */
#packages { padding-top: 1.5rem; padding-bottom: 0; }
.pk-track { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 0 10px; scrollbar-width: none; }
.pk-track::-webkit-scrollbar { display: none; }
.pk-banner { flex: 0 0 100%; scroll-snap-align: start; display: grid; grid-template-columns: 66fr 50fr; min-height: 190px; border-radius: 18px; overflow: hidden; text-decoration: none; color: #fff; background: #1a5c8a; position: relative; }
.pk-banner-body { grid-column: 1; grid-row: 1; padding: 1.2rem 1.4rem; display: flex; flex-direction: column; gap: 0.5rem; background: #1a5c8a; clip-path: ellipse(100% 140% at 0% 50%); position: relative; z-index: 1; margin-right: -16%; padding-right: 22%; }
.pk-banner-img { grid-column: 2; grid-row: 1; background: #0d3048 center/cover no-repeat; }
.pk-badge { align-self: flex-start; font-size: 0.64rem; font-weight: 800; letter-spacing: 0.1em; background: rgba(255,255,255,0.18); padding: 0.2rem 0.6rem; border-radius: 50px; color: #fff; }
.pk-badge.is-solid { background: #f5a623; color: #0f1f3d; }
.pk-banner-name { font-size: 1.3rem; font-weight: 800; line-height: 1.2; }
.pk-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 0.3rem 0.8rem; }
.pk-chip { display: flex; align-items: center; gap: 0.35rem; font-size: 0.76rem; min-width: 0; }
.pk-chip svg { width: 14px; height: 14px; flex-shrink: 0; }
.pk-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-banner-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 0.8rem; flex-wrap: wrap; }
.pk-price { font-size: 1.4rem; font-weight: 800; color: #ffc72c; }
.pk-price.is-lg { font-size: 1.7rem; color: #f5a623; }
.pk-regular { font-size: 0.82rem; opacity: 0.75; margin-left: 0.3rem; }
.pk-save { font-size: 0.72rem; font-weight: 800; background: #2f8f5b; color: #fff; padding: 0.15rem 0.5rem; border-radius: 50px; margin-left: 0.3rem; }
.pk-view { font-size: 0.8rem; font-weight: 800; background: #ffc72c; color: #0f1f3d; padding: 0.5rem 1rem; border-radius: 50px; white-space: nowrap; }
.pk-dots { display: flex; justify-content: center; gap: 8px; padding-top: 4px; }
.pk-dot { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid #f5a623; }
.pk-dot.is-on { background: #f5a623; }
.pk-title { font-size: 1.5rem; font-weight: 800; color: #fff; margin: 0.3rem 0 0; }
.pk-incl { display: grid; gap: 0.5rem; }
.pk-incl-row { display: flex; align-items: center; gap: 0.7rem; font-size: 0.88rem; color: #c8d3e0; }
.pk-incl-row span:nth-child(2) { flex: 1; }
.pk-incl-row b { color: #fff; }
.pk-incl-icon { width: 30px; height: 30px; border-radius: 50%; background: rgba(245,166,35,0.15); color: #f5a623; display: flex; align-items: center; justify-content: center; }
.pk-incl-icon svg { width: 16px; height: 16px; }
html[data-theme="light"] .pk-title, html[data-theme="light"] .pk-incl-row b { color: #1A1A1A; }
html[data-theme="light"] .pk-incl-row { color: #444; }
html[data-theme="light"] .pk-price.is-lg { color: #C1440E; }
@media (max-width: 640px) {
    .pk-banner { grid-template-columns: 1fr; }
    .pk-banner-img { grid-column: 1; grid-row: 1; min-height: 120px; }
    .pk-banner-body { grid-row: 2; clip-path: none; margin-right: 0; padding-right: 1.4rem; }
}
