/* Chez Nirus Booking - front-end styles (v1.4.0).
   Colours come from the Design setting in the admin. cn_booking_color_vars() and
   cn_booking_option_vars() set the brand colour and the option button colours inline on the widget. */

@font-face {
  font-family: "CN Inter";
  src: url("fonts/inter-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "CN Inter";
  src: url("fonts/inter-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "CN Inter";
  src: url("fonts/inter-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

.cn-booking {
  --cn-ink: #141414;
  --cn-brand: #2b1b17;
  --cn-brand-soft: #46332d;
  --cn-on-brand: #ffffff;
  --cn-primary-off: #a89f9a;
  --cn-selected: var(--cn-brand);
  --cn-opt-text: #141414;
  --cn-opt-text-hover: #2b1b17;
  --cn-opt-bg: #ffffff;
  --cn-opt-bg-hover: #f6f4f1;
  --cn-label: #5f5a57;
  --cn-muted: #7a7471;
  --cn-line: #ebe7e2;
  --cn-field: #f6f4f1;
  --cn-red: #c62828;
  --cn-red-bg: #fde9e9;
  --cn-grey: #b8b3ae;
  --cn-green: #16a34a;
  --cn-green-ring: #d8f3e2;
  font-family: "CN Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.45;
  color: var(--cn-ink);
  -webkit-font-smoothing: antialiased;
  background: #fff;
  border: 1px solid var(--cn-line);
  border-radius: 20px;
  padding: 28px;
  max-width: 1040px;
  margin: 0 auto;
  box-shadow: 0 1px 2px rgba(20, 20, 20, 0.04), 0 14px 36px rgba(20, 20, 20, 0.07);
}
.cn-booking *,
.cn-booking *::before,
.cn-booking *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:where(.cn-booking) button { font: inherit; color: var(--cn-ink); }
.cn-booking input,
.cn-booking select,
.cn-booking textarea { font: inherit; color: var(--cn-ink); }
.cn-booking button:focus-visible { outline: 2px solid var(--cn-brand); outline-offset: 2px; }

/* Header band */
.cn-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 20px;
  margin: -28px -28px 26px;
  padding: 22px 28px;
  border-radius: 19px 19px 0 0;
  background: radial-gradient(120% 160% at 100% 0%, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 55%), linear-gradient(135deg, var(--cn-brand) 0%, var(--cn-brand-soft) 100%);
  color: var(--cn-on-brand);
}
.cn-head__name { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; color: inherit; }
.cn-head__eyebrow {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.7;
}
.cn-pill {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 9px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
}
.cn-pill strong { font-size: 14px; font-weight: 700; color: inherit; font-variant-numeric: tabular-nums; }
.cn-pill span { font-size: 12px; font-weight: 600; color: inherit; opacity: 0.72; }

/* Layout */
.cn-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 40px;
  align-items: start;
}
.cn-main { min-width: 0; }
.cn-booking__inner.is-done .cn-layout {
  grid-template-columns: minmax(0, 560px);
  justify-content: center;
}

/* Accordion rows: Choose your date / Time / Party size */
.cn-acc { border-bottom: 1px solid var(--cn-line); }
.cn-acc__head {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  margin: 0;
  padding: 18px 2px;
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
@media (hover: hover) {
  .cn-acc__head:hover { background: rgba(20, 20, 20, 0.03); }
}
.cn-acc__label {
  flex: 1;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cn-label);
}
.cn-acc__value {
  font-size: 16px;
  font-weight: 700;
  color: var(--cn-ink);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.cn-chev {
  width: 8px;
  height: 8px;
  margin: 0 2px 0 8px;
  border-right: 2px solid var(--cn-brand);
  border-bottom: 2px solid var(--cn-brand);
  transform: rotate(45deg);
  transition: transform 0.25s ease;
}
.cn-acc__head[aria-expanded="true"] .cn-chev { transform: rotate(-135deg); }
.cn-acc__body { padding: 2px 0 24px; }
.cn-acc__body[hidden] { display: none; }

/* Calendar */
.cn-cal { max-width: 440px; }
.cn-cal__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 12px;
}
.cn-cal__nav strong { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.cn-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--cn-ink);
  cursor: pointer;
  transition: background-color 0.15s ease;
}
@media (hover: hover) {
  .cn-nav:not(:disabled):hover { background: var(--cn-field); }
}
.cn-nav:disabled { color: var(--cn-grey); cursor: default; }
.cn-nav__icon {
  display: block;
  width: 9px;
  height: 9px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}
.cn-nav--prev .cn-nav__icon { transform: translateX(2px) rotate(45deg); }
.cn-nav--next .cn-nav__icon { transform: translateX(-2px) rotate(-135deg); }
.cn-cal__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  text-align: center;
}
.cn-wd {
  padding: 6px 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--cn-muted);
}
.cn-day {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  max-height: 48px;
  width: 100%;
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  font-size: 16px;
  font-weight: 500;
  color: var(--cn-grey);
  font-variant-numeric: tabular-nums;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.12s ease, box-shadow 0.2s ease;
}
.cn-day--blank { visibility: hidden; }
.cn-day[data-today] { position: relative; }
.cn-day[data-today]::after {
  content: "";
  position: absolute;
  bottom: 6px;
  left: 50%;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: currentColor;
}
.cn-day--open { font-weight: 700; cursor: pointer; }
.cn-day--open:active { transform: scale(0.94); }
.cn-day--off { background: var(--cn-red-bg); color: var(--cn-red); font-weight: 700; }
.cn-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 14px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--cn-muted);
}
.cn-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 4px;
  vertical-align: -1px;
}
.cn-swatch--off { background: var(--cn-red-bg); border: 1px solid var(--cn-red); }
.cn-swatch--full { background: #e7e3de; }

/* Time and party: tap grid on desktop */
.cn-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.cn-slot,
.cn-chip {
  padding: 12px 6px;
  border: 1px solid var(--cn-line);
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
}
@media (hover: hover) {
  .cn-slot:not(.is-selected):not(:disabled):hover,
  .cn-chip:not(.is-selected):not(:disabled):hover { border-color: #c9c4bf; }
}
.cn-slot:active:not(:disabled),
.cn-chip:active:not(:disabled) { transform: scale(0.96); }
.cn-slot.is-selected:hover,
.cn-chip.is-selected:hover { border-color: var(--cn-selected); }

/* Time and party: scroll wheel on phones. Row height (48px) matches ITEM_H in booking.js */
.cn-only-mobile { display: none; }
.cn-wheel {
  position: relative;
  height: 240px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 24%, #000 76%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 24%, #000 76%, transparent 100%);
}
.cn-wheel__bar {
  position: absolute;
  left: 0;
  right: 0;
  top: 96px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8f6f2 0%, #f1ede6 100%);
  border: 1px solid #ebe5dc;
  box-shadow: 0 1px 2px rgba(20, 20, 20, 0.04);
  pointer-events: none;
}
.cn-wheel__scroll {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  padding: 96px 0;
  scroll-snap-type: y mandatory;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cn-wheel__scroll::-webkit-scrollbar { display: none; }
.cn-wheel__item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  padding: 0;
  border: 0;
  background: transparent;
  scroll-snap-align: center;
  font-size: 17px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: #c2bdb8;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}
.cn-wheel__item.is-near { color: #8a8480; font-size: 18px; }
.cn-wheel__item.is-sel { color: var(--cn-ink); font-size: 22px; font-weight: 700; }
.cn-wheel__item.is-off { color: #dcd8d4; text-decoration: line-through; cursor: not-allowed; }
.cn-only-mobile::after {
  content: "Scroll to choose, then tap to confirm";
  display: block;
  margin-top: 10px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--cn-muted);
}

.cn-muted { margin: 0 0 14px; font-size: 15px; color: var(--cn-muted); }
.cn-note { margin: 16px 0 0; font-size: 14px; }

/* Option buttons: calendar days, time slots and party size.
   Normal and hover text/background come from the Design setting (--cn-opt-*).
   !important keeps the theme's own button colours out of the widget. */
.cn-booking .cn-day--open:not(.is-selected),
.cn-booking .cn-slot:not(.is-selected),
.cn-booking .cn-chip:not(.is-selected) {
  color: var(--cn-opt-text) !important;
  background-color: var(--cn-opt-bg) !important;
  border-color: var(--cn-line);
}
@media (hover: hover) {
  .cn-booking .cn-day--open:not(.is-selected):hover,
  .cn-booking .cn-slot:not(.is-selected):not(:disabled):hover,
  .cn-booking .cn-chip:not(.is-selected):not(:disabled):hover {
    color: var(--cn-opt-text-hover) !important;
    background-color: var(--cn-opt-bg-hover) !important;
  }
}
.cn-booking .cn-slot:not(.is-selected):disabled,
.cn-booking .cn-chip:not(.is-selected):disabled {
  color: var(--cn-grey) !important;
  background-color: var(--cn-field) !important;
  border-color: transparent;
  text-decoration: line-through;
  cursor: not-allowed;
}
.cn-booking .cn-day--open.is-selected,
.cn-booking .cn-slot.is-selected,
.cn-booking .cn-chip.is-selected {
  color: var(--cn-on-brand) !important;
  background-color: var(--cn-selected) !important;
  border-color: var(--cn-selected) !important;
}
.cn-booking .cn-day--open.is-selected { box-shadow: 0 6px 14px rgba(20, 20, 20, 0.18); }

/* Buttons */
.cn-booking .cn-btn {
  display: block;
  width: 100%;
  padding: 15px 18px;
  border: 0;
  border-radius: 14px;
  background: var(--cn-brand) !important;
  color: var(--cn-on-brand) !important;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(20, 20, 20, 0.16);
  transition: transform 0.12s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
@media (hover: hover) {
  .cn-booking .cn-btn:not(:disabled):hover { background: var(--cn-brand-soft) !important; }
}
.cn-booking .cn-btn:active { transform: scale(0.985); }
.cn-booking .cn-btn:disabled {
  background: var(--cn-primary-off) !important;
  color: var(--cn-on-brand) !important;
  box-shadow: none;
  cursor: not-allowed;
}
.cn-booking .cn-btn--ghost {
  margin-top: 10px;
  background: var(--cn-field) !important;
  color: var(--cn-ink) !important;
  box-shadow: none;
}
@media (hover: hover) {
  .cn-booking .cn-btn--ghost:not(:disabled):hover { background: #ece9e4 !important; }
}
.cn-booking .cn-btn--ghost:disabled { background: var(--cn-field) !important; color: var(--cn-grey) !important; }
.cn-booking .cn-link {
  padding: 8px;
  border: 0;
  background: none;
  color: var(--cn-brand);
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

/* Reservation card */
.cn-card {
  padding: 22px;
  border: 1px solid var(--cn-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(20, 20, 20, 0.04), 0 8px 24px rgba(20, 20, 20, 0.05);
}
.cn-aside { position: sticky; top: 24px; }
.cn-aside__title { margin: 0 0 6px; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.cn-aside__actions { margin-top: 18px; }
.cn-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--cn-line);
  font-size: 15px;
}
.cn-line:last-child { border-bottom: 0; }
.cn-line > span { flex-shrink: 0; font-weight: 600; color: var(--cn-muted); }
.cn-line > strong {
  font-weight: 700;
  text-align: right;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

/* Details form */
.cn-h { margin: 0 0 6px; font-size: 28px; font-weight: 700; letter-spacing: -0.025em; }
.cn-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}
.cn-field { display: block; margin-bottom: 14px; font-size: 15px; }
.cn-field > span:first-child { display: block; margin-bottom: 6px; font-weight: 700; }
.cn-booking input[type="text"],
.cn-booking input[type="email"],
.cn-booking input[type="tel"],
.cn-booking select,
.cn-booking textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--cn-field);
  font-size: 16px;
  font-weight: 500;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.cn-booking input:focus,
.cn-booking select:focus,
.cn-booking textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--cn-brand);
  box-shadow: 0 0 0 4px rgba(20, 20, 20, 0.08);
}
.cn-booking textarea { min-height: 110px; resize: vertical; }
.cn-phone { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px; }
.cn-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 12px 0;
  font-size: 15px;
}
.cn-check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--cn-brand); }
.cn-check small { display: block; font-size: 13px; font-weight: 500; color: var(--cn-muted); }
.cn-count {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  text-align: right;
  color: var(--cn-muted);
}
.cn-alert {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--cn-red-bg);
  color: #8a1c1c;
  font-size: 15px;
  font-weight: 600;
}

/* Review */
.cn-block { margin-bottom: 24px; }
.cn-block__label {
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cn-label);
}
.cn-venue { display: flex; flex-direction: column; gap: 2px; }
.cn-venue strong { font-size: 16px; font-weight: 700; }
.cn-venue span { font-size: 14px; color: var(--cn-muted); }
.cn-box {
  min-height: 56px;
  padding: 16px;
  border-radius: 12px;
  background: var(--cn-field);
  font-size: 15px;
  color: var(--cn-muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Confirmation */
.cn-done { padding: 6px 0 4px; text-align: center; }
.cn-done__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--cn-green);
  color: #fff;
  box-shadow: 0 0 0 10px var(--cn-green-ring);
  animation: cn-pop 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.cn-done__icon svg { width: 30px; height: 30px; }
.cn-done .cn-h { font-size: 30px; }
.cn-done .cn-muted { margin-bottom: 10px; }
.cn-done .cn-card { max-width: 440px; margin: 22px auto; text-align: left; }
@keyframes cn-pop {
  0% { transform: scale(0.4); opacity: 0; }
  70% { transform: scale(1.06); opacity: 1; }
  100% { transform: scale(1); }
}

/* Header and link text: theme colours must not leak in */
.cn-booking .cn-acc__head:focus,
.cn-booking .cn-acc__head:active,
.cn-booking .cn-acc__head:focus-visible,
.cn-booking .cn-nav:focus,
.cn-booking .cn-nav:active,
.cn-booking .cn-link:focus,
.cn-booking .cn-link:active,
.cn-booking .cn-wheel__item:focus,
.cn-booking .cn-wheel__item:active {
  background: transparent !important;
}

/* Phones: Ody-style first page, scroll wheels, glass Continue bar */
@media (max-width: 640px) {
  .cn-booking { padding: 16px; border-radius: 18px; }
  .cn-head { margin: -16px -16px 18px; padding: 16px; border-radius: 17px 17px 0 0; }
  .cn-head__name { font-size: 20px; }
  .cn-pill { display: none; }
  .cn-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .cn-booking__inner.is-done .cn-layout { grid-template-columns: minmax(0, 1fr); }
  .cn-cal { max-width: none; }
  .cn-day { max-height: none; }
  .cn-row { grid-template-columns: minmax(0, 1fr); }
  .cn-phone { grid-template-columns: 110px minmax(0, 1fr); }
  .cn-h { font-size: 24px; }
  .cn-only-desktop { display: none; }
  .cn-only-mobile { display: block; }
  .cn-aside {
    position: sticky;
    top: auto;
    bottom: 0;
    z-index: 5;
    margin: 12px -16px -16px;
    padding: 12px 16px 16px;
    border: 0;
    border-top: 1px solid var(--cn-line);
    border-radius: 0 0 18px 18px;
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: saturate(1.4) blur(12px);
    backdrop-filter: saturate(1.4) blur(12px);
    box-shadow: 0 -10px 24px rgba(20, 20, 20, 0.06);
    /* The empty part of the bar lets taps through to the wheel underneath; only the buttons catch taps. */
    pointer-events: none;
  }
  .cn-aside .cn-btn { pointer-events: auto; }
  .cn-aside__title,
  .cn-aside .cn-line { display: none; }
  .cn-aside__actions { display: flex; gap: 10px; margin-top: 0; }
  .cn-aside__actions .cn-btn { flex: 1 1 0; }
  .cn-booking .cn-aside__actions .cn-btn--ghost { flex: 0 0 34%; margin-top: 0; }
  .cn-booking .cn-btn { padding: 15px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .cn-done__icon { animation: none; }
  .cn-chev { transition: none; }
}

/* Opening hours table: [cn_hours] shortcode (website footer) */
.cn-hours {
  width: 100%;
  max-width: 360px;
  border-collapse: collapse;
  font-size: 14px;
}
.cn-hours th,
.cn-hours td {
  padding: 8px 6px;
  border-bottom: 1px solid #e5e5e5;
  text-align: left;
}
.cn-hours th { font-weight: 600; }
