/*
 * Castle Inn hotel widgets (app/SiteWidgets, resources/views/site-widgets, resources/views/site-forms).
 * Loaded by the widget views themselves, so the builder's editor canvas shows them the same as the website.
 * Colours a widget lets the admin change come from its css() rules; these are the defaults (docs/castle-inn-design.md).
 */
.ci-bs, .ci-rooms, .ci-cta, .ci-pt, .ci-fh, .ci-pm, .ci-form-wrap {
    --ci-primary: #26a3db;
    --ci-navy: #273272;
    --ci-dark: #2a2a2a;
    --ci-muted: #6b7280;
    --ci-line: #e5e7eb;
    box-sizing: border-box;
}
.ci-bs *, .ci-rooms *, .ci-cta *, .ci-pt *, .ci-fh *, .ci-pm *, .ci-form-wrap * { box-sizing: border-box; }
.ci-al-left { text-align: left; }
.ci-al-center { text-align: center; }
.ci-al-right { text-align: right; }

/* ---------- Booking search bar ---------- */
.ci-bs { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; color: #333; text-align: left; font-family: 'Roboto', system-ui, sans-serif; }
.ci-bs-box { position: relative; display: flex; flex-direction: column; justify-content: center; min-height: 64px; padding: 10px 15px; background: #f4f6f8;
    border: 1px solid var(--ci-line); border-radius: 4px; }
.ci-bs-date { flex: 1 1 170px; cursor: pointer; }
.ci-bs-label { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--ci-muted); }
.ci-bs-label i { color: var(--ci-primary); margin-right: 4px; }
.ci-bs-day { display: flex; align-items: center; gap: 10px; margin-top: 2px; line-height: 1.1; }
.ci-bs-day b { font-size: 26px; font-weight: 700; color: var(--ci-dark); }
.ci-bs-day > span { display: flex; flex-direction: column; font-size: 13px; text-transform: uppercase; font-weight: 600; }
.ci-bs-day small { font-size: 12px; font-weight: 400; text-transform: lowercase; color: var(--ci-muted); }
/* the real date input covers its card: tapping anywhere opens the browser's date picker */
.ci-bs-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.ci-bs-input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.ci-bs-nights { flex: 0 0 auto; align-items: center; min-width: 74px; }
.ci-bs-nights b { font-size: 22px; line-height: 1; color: var(--ci-dark); }
.ci-bs-nights small { font-size: 12px; text-transform: uppercase; color: var(--ci-muted); }
.ci-bs-guests { flex: 1 1 210px; padding: 0; }
.ci-bs-guests-btn { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; width: 100%; height: 100%; min-height: 62px;
    padding: 10px 15px; background: none; border: 0; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.ci-bs-guests-sum { margin-top: 4px; font-size: 15px; font-weight: 600; color: var(--ci-dark); }
.ci-bs-pop { position: absolute; z-index: 50; top: calc(100% + 6px); right: 0; width: 285px; max-width: calc(100vw - 32px); padding: 15px; background: #fff;
    border-radius: 4px; box-shadow: 0 5px 18px rgba(0, 0, 0, .15); }
.ci-bs-pop[hidden] { display: none; }
.ci-bs-count { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--ci-line); }
.ci-bs-count > span:first-child { display: flex; flex-direction: column; font-weight: 600; }
.ci-bs-count small { font-weight: 400; font-size: 12px; color: var(--ci-muted); }
.ci-bs-stepper { display: inline-flex; align-items: center; gap: 6px; }
.ci-bs-stepper button { width: 32px; height: 32px; border: 1px solid var(--ci-primary); border-radius: 50%; background: #fff; color: var(--ci-primary);
    font-size: 18px; line-height: 1; cursor: pointer; }
.ci-bs-stepper button:disabled { opacity: .35; cursor: default; }
.ci-bs-stepper input { width: 34px; border: 0; text-align: center; font-weight: 700; font-size: 16px; background: transparent; -moz-appearance: textfield; }
.ci-bs-stepper input::-webkit-inner-spin-button, .ci-bs-stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.ci-bs-done { display: block; width: 100%; margin-top: 12px; padding: 9px; border: 0; background: var(--ci-primary); color: #fff; font-weight: 600; cursor: pointer; }
.ci-bs-go { flex: 0 0 auto; min-height: 64px; padding: 17px 26px; border: 1px solid var(--ci-primary); border-radius: 4px; background: var(--ci-primary);
    color: #fff; font: 600 13px/1.1 'Open Sans', sans-serif; text-transform: uppercase; letter-spacing: 1.5px; cursor: pointer; transition: filter .15s; }
.ci-bs-go:hover { filter: brightness(.92); }
.ci-bs-stacked { flex-direction: column; }
.ci-bs-stacked > * { flex: 0 0 auto; width: 100%; }
.ci-bs-stacked .ci-bs-pop { left: 0; right: auto; }
@container (max-width: 760px) {
    .ci-bs-bar .ci-bs-date, .ci-bs-bar .ci-bs-guests { flex-basis: calc(50% - 5px); }
    .ci-bs-bar .ci-bs-go { flex: 1 1 100%; }
}
@media (max-width: 575.98px) {
    .ci-bs-bar > * { flex: 1 1 100% !important; }
    .ci-bs-bar .ci-bs-nights { flex-direction: row; gap: 6px; min-height: 40px; }
    .ci-bs-pop { left: 0; right: auto; width: 100%; }
}

/* ---------- Room list ---------- */
.ci-rooms-note { margin: 0 0 12px; padding: 8px 12px; background: #fff8e1; border-left: 3px solid #f59e0b; font-size: 14px; }
.ci-rooms-search { margin: 0 0 18px; font-weight: 600; color: var(--ci-navy); }
.ci-rooms-search i { color: var(--ci-primary); margin-right: 6px; }
.ci-rooms-empty { padding: 24px; text-align: center; background: #f7f8f9; }
.ci-rooms { display: grid; gap: 24px; }
.ci-room { display: grid; grid-template-columns: 300px 1fr 200px; background: #fff; border: 1px solid var(--ci-line); text-align: left; }
.ci-room-img { position: relative; min-height: 200px; background: #eef2f5; }
.ci-room-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ci-room-noimg { position: absolute; inset: 0; display: grid; place-items: center; font-size: 46px; color: #b8c4cf; }
.ci-room-body { padding: 20px 24px; }
.ci-room-name { margin: 0 0 6px; font-size: 24px; color: var(--ci-dark); }
.ci-room-cap { margin: 0 0 10px; font-size: 14px; color: var(--ci-muted); }
.ci-room-cap i { color: var(--ci-primary); }
.ci-room-text { margin: 0 0 12px; }
.ci-room-amen { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.ci-room-amen i { color: var(--ci-primary); font-size: 12px; }
.ci-room-side { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 20px; border-left: 1px solid var(--ci-line);
    text-align: center; }
.ci-room-price { margin: 0; line-height: 1.1; }
.ci-room-price b { display: block; font-size: 28px; color: var(--ci-navy); }
.ci-room-price small { font-size: 13px; color: var(--ci-muted); }
.ci-rooms-grid { grid-template-columns: repeat(var(--ci-per-row, 3), minmax(0, 1fr)); }
.ci-rooms-grid .ci-room { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; }
.ci-rooms-grid .ci-room-img { min-height: 220px; }
.ci-rooms-grid .ci-room-side { flex-direction: row; justify-content: space-between; border-left: 0; border-top: 1px solid var(--ci-line); }
@media (max-width: 991.98px) {
    .ci-room { grid-template-columns: 240px 1fr; }
    .ci-room-side { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; border-left: 0; border-top: 1px solid var(--ci-line); }
    .ci-rooms-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575.98px) {
    .ci-room { grid-template-columns: 1fr; }
    .ci-rooms-grid { grid-template-columns: 1fr; }
}

/* ---------- Call-to-action banner ---------- */
.ci-cta { position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; color: #fff; }
.ci-cta-bg, .ci-cta-shade { position: absolute; inset: 0; }
.ci-cta-bg { background-size: cover; background-position: center; }
.ci-cta-shade { background: var(--ci-dark); opacity: .65; }
.ci-cta-body { position: relative; max-width: 820px; }
.ci-al-left .ci-cta-body { margin-right: auto; }
.ci-al-right .ci-cta-body { margin-left: auto; }
.ci-cta-title { margin: 0 0 12px; color: inherit; }
.ci-cta-text { margin: 0 0 8px; }
.ci-cta-eyebrow { margin: 40px 0 6px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; }
.ci-cta .ci-cta-phone { display: table; margin: 0 auto 24px; font-size: 48px; font-weight: 600; line-height: 1; color: inherit; text-decoration: none; }
.ci-al-left .ci-cta-phone { margin-left: 0; }
.ci-al-right .ci-cta-phone { margin-right: 0; }
.ci-cta-phone i { font-size: .7em; }
.ci-cta .sb-btn { display: inline-block; }
@media (max-width: 991.98px) { .ci-cta-phone { font-size: 40px; } }
@media (max-width: 575.98px) { .ci-cta-phone { font-size: 28px; } .ci-cta-eyebrow { margin-top: 24px; } }

/* ---------- Page title banner ---------- */
.ci-pt { position: relative; display: flex; align-items: center; overflow: hidden; }
.ci-pt-bg, .ci-pt-shade { position: absolute; inset: 0; }
.ci-pt-bg { background-size: cover; background-position: center; }
.ci-pt-shade { background: var(--ci-dark); opacity: .45; }
.ci-pt-photo { color: #fff; }
.ci-pt-body { position: relative; width: 100%; max-width: var(--sb-container, 1200px); margin: 0 auto; }
.ci-pt-title { margin: 0; color: inherit; }
.ci-pt-sub { margin: 10px 0 0; font-size: 18px; opacity: .9; }
.ci-pt-crumbs { margin-top: 14px; font-size: 14px; }
.ci-pt-crumbs a { color: var(--ci-primary); text-decoration: none; }
.ci-pt-photo .ci-pt-crumbs a { color: #fff; text-decoration: underline; }

/* ---------- Floating help ---------- */
.ci-fh { position: fixed; bottom: 20px; z-index: 999; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; pointer-events: none; }
.ci-fh > * { pointer-events: auto; }
.ci-fh-right { right: 20px; }
.ci-fh-left { left: 20px; align-items: flex-start; }
.ci-fh-editor { position: static; align-items: flex-end; padding: 8px; border: 1px dashed #cbd5e1; }
.ci-fh-top { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ci-primary); color: #fff; text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .2); transition: opacity .25s, transform .25s; }
.ci-fh-top.is-hidden { opacity: 0; transform: translateY(10px); pointer-events: none; }
.ci-fh-wa { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.ci-fh-label { padding: 8px 14px; background: #fff; color: #1f2937; border-radius: 18px; font-size: 14px; font-weight: 600; box-shadow: 0 4px 12px rgba(0, 0, 0, .15); }
.ci-fh-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #fff; font-size: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .25); }
.ci-fh-left .ci-fh-wa { flex-direction: row-reverse; }
@media (max-width: 575.98px) { .ci-fh-label { display: none; } }

/* ---------- Payment methods ---------- */
.ci-pm { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.ci-pm-list { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.ci-pm-list li { display: inline-flex; align-items: center; gap: 8px; }
.ci-pm-icon { font-size: 30px; color: var(--ci-navy); }
.ci-pm-banner img { display: block; max-width: 100%; height: auto; }
@media (max-width: 575.98px) { .ci-pm-btn { width: 100%; text-align: center; } }

/* ---------- Forms (View / form widget) ---------- */
.ci-form-title { margin: 0 0 8px; }
.ci-form-intro { margin: 0 0 18px; color: var(--ci-muted); }
.ci-form-alert { margin: 0 0 16px; padding: 10px 14px; border-left: 3px solid; font-size: 14px; }
.ci-form-ok { background: #ecfdf5; border-color: #10b981; }
.ci-form-err { background: #fef2f2; border-color: #ef4444; }
.ci-form-off { background: #f8fafc; border-color: #94a3b8; color: #475569; }
.ci-form fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.ci-form fieldset:disabled { opacity: .7; }
.ci-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; margin-bottom: 20px; }
.ci-field { display: block; font-size: 14px; font-weight: 600; color: var(--ci-dark); }
.ci-field span { color: #dc2626; }
.ci-field small { font-weight: 400; color: var(--ci-muted); }
.ci-field-wide { grid-column: 1 / -1; }
.ci-field input, .ci-field select, .ci-field textarea { display: block; width: 100%; margin-top: 6px; padding: 11px 12px; border: 1px solid #cfd6dd; border-radius: 0; background: #fff;
    font: 400 15px/1.4 'Roboto', system-ui, sans-serif; color: #222; }
.ci-field input:focus, .ci-field select:focus, .ci-field textarea:focus { outline: 2px solid rgba(38, 163, 219, .35); border-color: var(--ci-primary); }
.ci-field .is-invalid { border-color: #dc2626; }
.ci-check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; }
.ci-check input { margin-top: 3px; }
.ci-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
@media (max-width: 575.98px) { .ci-form-grid { grid-template-columns: 1fr; } .ci-form-submit { width: 100%; } }

/* the gateway's own "Pay with" banner fills the strip (SSLCommerz asks merchants to show it) */
.ci-pm-banner { display: block; flex: 1 1 100%; }
.ci-pm-banner img { width: 100%; max-width: 1200px; margin: 0 auto; }

/* room photos: one block per room type, its name and Book button above its photos */
.ci-photos-room + .ci-photos-room { margin-top: 48px; }
.ci-photos-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.ci-photos-head h3 { margin: 0; }
.ci-photos-empty { color: var(--ci-muted); text-align: center; padding: 24px 0; }
