/*
 * Functional v1 styling so the widget is usable/demoable now. The full
 * brand pass (film-grain texture, neon glow, marquee effects, mobile
 * polish) is Phase 7 - see build plan.
 */
:root {
  --cb-bg: #0a0908;
  --cb-bg-elevated: #1c1714;
  --cb-text: #f5f0e6;
  --cb-text-muted: #c6b8a3;
  --cb-red: #e50914;
  --cb-gold: #d9a441;
  --cb-gold-soft: rgba(217, 164, 65, 0.25);
  --cb-range-band: rgba(217, 164, 65, 0.15);
  --cb-border: #3a322c;
  --cb-radius: 10px;
  --cb-font: "Cinzel", Georgia, serif;
}

.cb-search-pill,
.cb-popover,
.cb-room-widget,
.cb-result-card,
.cb-modal {
  font-family: var(--cb-font);
  color: var(--cb-text);
  box-sizing: border-box;
}
.cb-search-pill *,
.cb-popover *,
.cb-room-widget *,
.cb-result-card *,
.cb-modal * {
  box-sizing: border-box;
}

/* ---- homepage search pill ---- */

.cb-search-pill {
  display: flex;
  align-items: center;
  background: var(--cb-bg-elevated);
  border: 1px solid var(--cb-border);
  border-radius: 999px;
  padding: 6px;
  max-width: 640px;
  margin: 0 auto;
}
.cb-pill-field {
  flex: 1;
  background: none;
  border: none;
  border-radius: 999px;
  color: var(--cb-text-muted);
  font-family: inherit;
  font-size: 15px;
  text-align: left;
  padding: 10px 16px;
  cursor: pointer;
  outline: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.cb-pill-field:hover,
.cb-pill-field:focus,
.cb-pill-field:active,
.cb-pill-field.cb-pill-field-active {
  background: rgba(245, 240, 230, 0.07);
  color: var(--cb-text);
}
.cb-pill-field:focus-visible {
  outline: 2px solid var(--cb-gold);
  outline-offset: 2px;
}
.cb-pill-divider {
  width: 1px;
  height: 28px;
  background: var(--cb-border);
}
.cb-pill-search {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background-color: var(--cb-gold);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231c1714' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='16.5' y1='16.5' x2='21' y2='21'/%3E%3C/svg%3E");
  font-size: 0;
  cursor: pointer;
  transition: filter 0.15s ease;
}
.cb-pill-search:hover,
.cb-pill-search:focus,
.cb-pill-search:active {
  background-color: var(--cb-gold);
  filter: brightness(1.08);
}
.cb-pill-search:focus-visible {
  outline: 2px solid var(--cb-text);
  outline-offset: 2px;
}

/* ---- modal / popover shell ---- */

.cb-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  z-index: 9999;
  overflow-y: auto;
}
.cb-modal {
  position: relative;
  background: var(--cb-bg-elevated);
  border: 1px solid var(--cb-border);
  border-radius: var(--cb-radius);
  max-width: 720px;
  width: 100%;
  padding: 32px 24px 16px;
}
.cb-modal-close {
  position: absolute;
  top: 12px;
  left: 12px;
  background: none;
  border: none;
  color: var(--cb-text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.cb-modal-close:hover,
.cb-modal-close:focus,
.cb-modal-close:active {
  background: none;
  color: var(--cb-gold);
}

.cb-popover-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--cb-border);
}
.cb-guest-popover .cb-popover-footer {
  justify-content: flex-end;
}

.cb-btn {
  font-family: var(--cb-font);
  border: none;
  border-radius: 999px;
  padding: 12px 28px;
  font-size: 15px;
  cursor: pointer;
}
.cb-btn-primary {
  background: var(--cb-gold);
  color: #1c1714;
  font-weight: 600;
}
/* Keep the gold fill on every interaction state (the host theme styles
   button:hover/:focus/:active red otherwise); just brighten the fill a touch
   and switch the label to white. */
.cb-btn-primary:hover,
.cb-btn-primary:focus,
.cb-btn-primary:active {
  background: var(--cb-gold);
  color: #fff;
  filter: brightness(1.05);
}
.cb-btn:focus-visible {
  outline: 2px solid var(--cb-gold);
  outline-offset: 2px;
}
.cb-btn-primary:disabled {
  opacity: 0.5;
  cursor: default;
}
.cb-btn-block {
  width: 100%;
  display: block;
}

.cb-clear-dates {
  color: var(--cb-text-muted);
  text-decoration: underline;
  font-size: 14px;
}

/* ---- guest popover ---- */

.cb-guest-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--cb-border);
}
.cb-guest-row:last-of-type {
  border-bottom: none;
}
.cb-guest-row-label strong {
  display: block;
  font-size: 15px;
}
.cb-guest-row-label span {
  display: block;
  font-family: Georgia, serif;
  font-size: 13px;
  color: var(--cb-text-muted);
}
.cb-stepper {
  display: flex;
  align-items: center;
  gap: 14px;
}
.cb-stepper-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--cb-text-muted);
  background: none;
  color: var(--cb-text);
  font-size: 18px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.cb-stepper-btn:hover,
.cb-stepper-btn:focus,
.cb-stepper-btn:active {
  background: none;
  border-color: var(--cb-text);
  color: var(--cb-text-muted);
}
.cb-stepper-value {
  min-width: 16px;
  text-align: center;
}

/* ---- calendar ---- */

.cb-calendar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.cb-calendar-headings {
  flex: 1;
  display: flex;
  gap: 32px;
}
.cb-calendar-heading {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  font-size: 14px;
}
.cb-calendar-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--cb-border);
  border-radius: 50%;
  background: none;
  color: var(--cb-text);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.cb-calendar-nav-btn:hover:not(:disabled),
.cb-calendar-nav-btn:focus:not(:disabled),
.cb-calendar-nav-btn:active:not(:disabled) {
  background: var(--cb-gold-soft);
  color: var(--cb-text);
}
.cb-calendar-nav-btn:disabled {
  opacity: 0.35;
  cursor: default;
}
.cb-calendar-grids {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}
.cb-calendar-month {
  flex: 1 1 240px;
  min-width: 0;
  max-width: 340px;
  margin: 0 auto;
}
/* Only used in the mobile scrollable-stack layout; sticks to the top of the
   scroll area as you scroll past each month. */
.cb-calendar-month-heading {
  position: sticky;
  top: 0;
  z-index: 2;
  text-align: center;
  font-size: 14px;
  padding: 8px 0;
  background: var(--cb-bg-elevated);
}
.cb-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  column-gap: 0;
  row-gap: 2px;
}
.cb-calendar-dow {
  text-align: center;
  font-size: 12px;
  color: var(--cb-text-muted);
  padding-bottom: 6px;
  font-family: Georgia, serif;
}
.cb-calendar-day {
  position: relative;
  aspect-ratio: 1;
  border: none;
  background: none;
  color: var(--cb-text);
  font-family: Georgia, serif;
  font-size: 13px;
  line-height: 1;
  padding: 0;
  margin: 0;
  min-width: 0;
  cursor: pointer;
  border-radius: 50%;
}
.cb-calendar-day-num {
  position: relative;
  z-index: 1;
}
.cb-calendar-day:hover:not(:disabled):not(.cb-calendar-day-start):not(.cb-calendar-day-end),
.cb-calendar-day:focus:not(:disabled):not(.cb-calendar-day-start):not(.cb-calendar-day-end),
.cb-calendar-day:active:not(:disabled):not(.cb-calendar-day-start):not(.cb-calendar-day-end) {
  background: var(--cb-gold-soft);
  color: var(--cb-text);
}
.cb-calendar-day-blank {
  cursor: default;
}
.cb-calendar-day-disabled {
  color: rgba(245, 240, 230, 0.32);
  cursor: default;
}

/* date-range selection — a continuous band with circular endpoints,
   modelled on the Hostex widget's picker rather than solid gold blocks */
.cb-calendar-day-inrange {
  background: var(--cb-range-band);
  border-radius: 0;
}
.cb-calendar-day-start,
.cb-calendar-day-end {
  border-radius: 0;
  background: transparent;
  color: #1c1714;
  font-weight: 600;
}
.cb-calendar-day-start.cb-calendar-day-connected {
  background: linear-gradient(to right, transparent 50%, var(--cb-range-band) 50%);
}
.cb-calendar-day-end.cb-calendar-day-connected {
  background: linear-gradient(to left, transparent 50%, var(--cb-range-band) 50%);
}
.cb-calendar-day-start::before,
.cb-calendar-day-end::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--cb-gold);
  z-index: 0;
}

/* ---- search results ---- */

.cb-results-heading {
  font-family: var(--cb-font);
  text-align: center;
  color: var(--cb-text);
}
.cb-results-heading-secondary {
  color: var(--cb-text-muted);
}
.cb-empty,
.cb-loading,
.cb-error {
  text-align: center;
  color: var(--cb-text-muted);
  font-family: Georgia, serif;
  font-size: 16px;
  padding: 24px 12px;
}

.cb-result-card {
  display: grid;
  grid-template-columns: 240px 1fr auto;
  gap: 20px;
  align-items: center;
  background: var(--cb-bg-elevated);
  border: 1px solid var(--cb-border);
  border-radius: var(--cb-radius);
  padding: 14px;
  margin-bottom: 14px;
  text-decoration: none;
}
.cb-result-card-unavailable {
  opacity: 0.5;
  pointer-events: none;
}
.cb-result-photo {
  width: 240px;
  height: 165px;
  border-radius: 8px;
  overflow: hidden;
  background-color: var(--cb-border);
}
.cb-result-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cb-result-title {
  font-size: 19px;
}
.cb-result-blurb {
  font-family: Georgia, serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--cb-text-muted);
  margin: 6px 0 8px;
}
.cb-result-location,
.cb-result-specs {
  font-family: Georgia, serif;
  font-size: 14px;
  color: var(--cb-text-muted);
}
.cb-result-price {
  font-size: 17px;
  text-align: right;
  white-space: nowrap;
}
.cb-result-price-unit {
  display: block;
  font-family: Georgia, serif;
  font-size: 12px;
  color: var(--cb-text-muted);
}
.cb-result-unavailable-label {
  font-family: Georgia, serif;
  font-size: 13px;
  color: var(--cb-text-muted);
}

/* ---- room-page widget ---- */

.cb-room-widget {
  background: var(--cb-bg-elevated);
  border: 1px solid var(--cb-border);
  border-radius: var(--cb-radius);
  padding: 20px;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}
/* The room widget shows two months so a stay spanning a month boundary is
   fully visible; they sit side by side and wrap to stacked when narrow,
   using the same flex rules as the modal calendar. */
.cb-room-widget .cb-popover-footer {
  border-top: none;
  padding-top: 8px;
  margin-top: 8px;
}
/* Guests selector (~1/3) + primary CTA (~2/3) share one row. */
.cb-room-actions {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-top: 14px;
}
.cb-room-guests {
  flex: 0 0 36%;
}
.cb-room-cta {
  flex: 1 1 auto;
}
.cb-guests-dropdown-toggle {
  width: 100%;
  height: 100%;
  text-align: left;
  background: none;
  border: 1px solid var(--cb-border);
  border-radius: 999px;
  color: var(--cb-text);
  font-family: var(--cb-font);
  font-size: 14px;
  padding: 10px 16px;
  cursor: pointer;
}
.cb-guests-dropdown-toggle:hover,
.cb-guests-dropdown-toggle:focus,
.cb-guests-dropdown-toggle:active {
  background: none;
  border-color: var(--cb-text);
}

.cb-quote-box {
  border: 1px solid var(--cb-gold);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
.cb-quote-title {
  color: var(--cb-gold);
  font-size: 15px;
  margin-bottom: 6px;
}
.cb-quote-breakdown {
  display: flex;
  justify-content: space-between;
  font-family: Georgia, serif;
  font-size: 15px;
  color: var(--cb-text-muted);
}
.cb-quote-total {
  color: var(--cb-text);
  font-weight: 600;
  font-size: 16px;
  font-family: var(--cb-font);
}

/* ---- confirm & pay ---- */

.cb-confirm-pay {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
  align-items: start;
}
.cb-confirm-pay-main {
  color: var(--cb-text);
  font-family: var(--cb-font);
}
.cb-confirm-pay-main h1 {
  font-size: 26px;
  margin: 0 0 14px;
}
.cb-confirm-pay-main h2 {
  font-size: 18px;
  color: var(--cb-gold);
  margin: 20px 0 10px;
  border-top: 1px solid var(--cb-border);
  padding-top: 14px;
}
.cb-cp-summary {
  font-family: Georgia, serif;
  font-size: 16px;
  line-height: 1.5;
}
.cb-cp-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 0;
  color: var(--cb-text-muted);
}
.cb-cp-summary-row span {
  white-space: nowrap;
}
.cb-cp-summary-row strong {
  color: var(--cb-text);
  font-weight: normal;
  text-align: right;
}
.cb-cp-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
/* first + last name share a row; phone and email are longer, so full width */
.cb-cp-form [name="phone"],
.cb-cp-form [name="email"] {
  grid-column: 1 / -1;
}
.cb-cp-input {
  width: 100%;
  background: var(--cb-bg);
  border: 1px solid var(--cb-border);
  border-radius: 6px;
  color: var(--cb-text);
  font-family: Georgia, serif;
  font-size: 16px;
  padding: 12px 14px;
}
.cb-cp-input::placeholder {
  color: var(--cb-text-muted);
}
.cb-cp-input:hover,
.cb-cp-input:focus,
.cb-cp-input:active {
  outline: none;
  background: var(--cb-bg);
  border-color: var(--cb-gold);
  color: var(--cb-text);
}
/* Chrome/Safari paint autofillable + autofilled fields with a pale background
   (that's why the email field looked white). The long transition defers that
   paint indefinitely; the inset shadow + text-fill cover the actual autofilled
   state. !important because the browser's autofill style is a UA rule. */
.cb-cp-input:-webkit-autofill,
.cb-cp-input:-webkit-autofill:hover,
.cb-cp-input:-webkit-autofill:focus,
.cb-cp-input:-webkit-autofill:active,
.cb-cp-input:autofill {
  -webkit-text-fill-color: var(--cb-text) !important;
  -webkit-box-shadow: 0 0 0 1000px var(--cb-bg) inset !important;
  box-shadow: 0 0 0 1000px var(--cb-bg) inset !important;
  caret-color: var(--cb-text);
  transition: background-color 100000s ease-in-out 0s;
}
.cb-cp-house-rules {
  list-style: none;
  padding: 0;
  margin: 4px 0;
  font-family: Georgia, serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--cb-text);
}
.cb-cp-house-rules li {
  padding: 4px 0;
}
.cb-cp-placeholder-note {
  font-family: Georgia, serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--cb-text-muted);
}

.cb-confirm-pay-sidebar {
  position: sticky;
  top: 16px;
  background: var(--cb-bg-elevated);
  border: 1px solid var(--cb-border);
  border-radius: var(--cb-radius);
  padding: 20px;
}
.cb-cp-countdown {
  font-family: Georgia, serif;
  font-size: 16px;
  color: var(--cb-text);
  margin-bottom: 16px;
}
.cb-cp-countdown-time {
  color: var(--cb-gold);
  font-weight: 600;
}
.cb-cp-promo {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.cb-cp-promo .cb-cp-input {
  flex: 1;
}
.cb-cp-promo-apply {
  background: none;
  border: 1px solid var(--cb-gold);
  color: var(--cb-gold);
}
.cb-cp-promo-apply:hover,
.cb-cp-promo-apply:focus,
.cb-cp-promo-apply:active {
  background: var(--cb-gold-soft);
  color: var(--cb-text);
}
.cb-cp-promo-message {
  font-family: Georgia, serif;
  font-size: 14px;
  color: var(--cb-text-muted);
  margin-bottom: 12px;
}
.cb-cp-error {
  font-family: Georgia, serif;
  font-size: 14px;
  color: #ff6b6b;
  margin-bottom: 12px;
}
.cb-cp-confirmation {
  text-align: center;
  color: var(--cb-text);
  font-family: var(--cb-font);
  padding: 40px 24px;
  max-width: 560px;
  margin: 0 auto;
}
.cb-cp-confirmation h1 {
  font-size: 30px;
  line-height: 1.15;
  margin: 0 0 18px;
}
.cb-cp-confirmation p {
  font-size: 18px;
  line-height: 1.55;
  margin: 10px 0;
  color: var(--cb-text);
}
.cb-cp-confirmation strong {
  color: var(--cb-gold);
}
.cb-cp-code {
  display: inline-block;
  white-space: nowrap;
}

/* The checkout markup is dropped into an Elementor widget whose theme
   typography cascades onto descendant p / li / div / input and shrinks our
   text. Re-assert comfortable sizes at ID specificity (1,1,0+) so the theme
   can't win. Bump these if it still reads small on the live site. */
#cinematique-booking-confirm-pay {
  font-size: 16px;
}
#cinematique-booking-confirm-pay .cb-cp-summary,
#cinematique-booking-confirm-pay .cb-cp-summary-row,
#cinematique-booking-confirm-pay .cb-cp-summary-row strong,
#cinematique-booking-confirm-pay .cb-cp-house-rules,
#cinematique-booking-confirm-pay .cb-cp-house-rules li,
#cinematique-booking-confirm-pay .cb-quote-title,
#cinematique-booking-confirm-pay .cb-quote-breakdown,
#cinematique-booking-confirm-pay .cb-quote-total,
#cinematique-booking-confirm-pay .cb-cp-countdown {
  font-size: 16px;
  line-height: 1.6;
}
#cinematique-booking-confirm-pay .cb-cp-input,
#cinematique-booking-confirm-pay .cb-cp-input:hover,
#cinematique-booking-confirm-pay .cb-cp-input:focus,
#cinematique-booking-confirm-pay input[type="email"] {
  font-size: 16px;
  background: var(--cb-bg);
  color: var(--cb-text);
}
#cinematique-booking-confirm-pay .cb-cp-placeholder-note {
  font-size: 15px;
  line-height: 1.55;
}
/* Also re-assert spacing at ID specificity - the theme's h1/h2/p/ul/li margins
   otherwise blow the layout apart with dead vertical space. */
#cinematique-booking-confirm-pay .cb-confirm-pay-main h1 {
  font-size: 26px;
  margin: 0 0 14px;
}
#cinematique-booking-confirm-pay .cb-confirm-pay-main h2 {
  font-size: 18px;
  margin: 20px 0 10px;
  padding-top: 14px;
}
#cinematique-booking-confirm-pay .cb-cp-summary,
#cinematique-booking-confirm-pay .cb-cp-form,
#cinematique-booking-confirm-pay .cb-cp-placeholder-note {
  margin: 0;
}
#cinematique-booking-confirm-pay .cb-cp-placeholder-note + .cb-cp-placeholder-note {
  margin-top: 6px;
}
#cinematique-booking-confirm-pay .cb-cp-house-rules {
  margin: 2px 0 0;
}
#cinematique-booking-confirm-pay .cb-cp-house-rules li {
  margin: 0;
  padding: 3px 0;
}
#cinematique-booking-confirm-pay .cb-cp-confirmation h1 {
  font-size: 30px;
  line-height: 1.15;
  margin: 0 0 18px;
}
#cinematique-booking-confirm-pay .cb-cp-confirmation p {
  font-size: 18px;
  line-height: 1.55;
  margin: 10px 0;
}

@media (max-width: 820px) {
  .cb-confirm-pay {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  /* Stack the rate/countdown/pay panel above the form, not below it. */
  .cb-confirm-pay-sidebar {
    position: static;
    order: -1;
  }
  #cinematique-booking-confirm-pay .cb-confirm-pay-main h1 {
    margin: 4px 0 10px;
  }
  #cinematique-booking-confirm-pay .cb-confirm-pay-main h2 {
    margin: 14px 0 8px;
    padding-top: 12px;
  }
  .cb-cp-confirmation {
    padding: 24px 16px;
  }
}

@media (max-width: 600px) {
  .cb-search-pill {
    flex-wrap: wrap;
    padding: 12px;
    border-radius: var(--cb-radius);
  }
  .cb-pill-divider {
    display: none;
  }
  /* Calendar becomes a single vertically-scrollable stack of months (JS
     renders the full horizon and hides the nav on mobile). Keep the visible
     window compact - about one and a bit months - and use fixed short day
     rows so the theme's line-height/padding can't inflate them. */
  .cb-calendar-grids {
    display: block;
    position: relative;
    max-height: 330px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .cb-calendar-month {
    max-width: 330px;
    margin: 0 auto 10px;
  }
  .cb-calendar-month-heading {
    padding: 5px 0;
  }
  .cb-calendar-dow {
    padding-bottom: 3px;
  }
  .cb-calendar-grid {
    grid-auto-rows: 42px;
  }
  .cb-calendar-day {
    aspect-ratio: auto;
  }
  .cb-result-card {
    grid-template-columns: 1fr;
  }
  .cb-result-photo {
    width: 100%;
    height: 200px;
  }
  .cb-result-price {
    text-align: left;
  }
  .cb-room-actions {
    flex-wrap: wrap;
  }
  .cb-room-guests {
    flex-basis: 100%;
  }
}
