/**
 * Five Star Restaurant Reservations (.rtb-booking-form) — Zeitlos styling.
 *
 */

/* ---------- Panel / form shell ---------- */
.fsrr-booking {
  max-width: 1024px;
  margin: 0 auto;
}
.fsrr-booking .rtb-booking-form {
  padding: clamp(30px, 4vw, 46px);
}
.fsrr-booking .rtb-booking-form-form {
  margin: 0;
}

/* Fieldsets — strip the browser's default chrome so sections sit flush */
.fsrr-booking .rtb-booking-form fieldset {
  border: 0;
  margin: 0 0 34px;
  padding: 0;
  min-width: 0;
}
.fsrr-booking .rtb-booking-form fieldset:last-of-type {
  margin-bottom: 0;
}

/* Section headings (<legend> — "Tisch buchen", "Kontaktdaten") */
.fsrr-booking .rtb-booking-form legend {
  display: block;
  float: none;
  width: 100%;
  padding: 0 0 16px;
  margin: 0 0 22px;
  font-family: var(--serif);
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 500;
  color: var(--cream);
  border-bottom: 1px solid var(--line);
}

/* ---------- Field wrappers ---------- */
.fsrr-booking .rtb-text,
.fsrr-booking .rtb-select,
.fsrr-booking .rtb-textarea {
  margin: 0 0 18px;
}
.fsrr-booking .rtb-booking-form label {
  display: block;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--smoke);
  margin: 0 0 8px;
  line-height: 1.4;
}

/* ---------- Inputs / selects / textareas (mirror .wpforms-form) ---------- */
.fsrr-booking .rtb-booking-form input[type="text"],
.fsrr-booking .rtb-booking-form input[type="email"],
.fsrr-booking .rtb-booking-form input[type="tel"],
.fsrr-booking .rtb-booking-form input[type="number"],
.fsrr-booking .rtb-booking-form select,
.fsrr-booking .rtb-booking-form textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--cream);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 300;
  line-height: 1.4;
  outline: none;
  transition: 0.3s var(--ease);
  color-scheme: dark;
}
/* Fixed height for single-line fields (textarea excluded) */
.fsrr-booking .rtb-booking-form input[type="text"],
.fsrr-booking .rtb-booking-form input[type="email"],
.fsrr-booking .rtb-booking-form input[type="tel"],
.fsrr-booking .rtb-booking-form input[type="number"],
.fsrr-booking .rtb-booking-form select {
  height: 46px;
}
.fsrr-booking .rtb-booking-form input::placeholder,
.fsrr-booking .rtb-booking-form textarea::placeholder {
  color: #9c9079;
}
.fsrr-booking .rtb-booking-form input:focus,
.fsrr-booking .rtb-booking-form select:focus,
.fsrr-booking .rtb-booking-form textarea:focus {
  border-color: var(--gold);
  background: rgba(201, 168, 106, 0.06);
  box-shadow: 0 0 0 3px rgba(201, 168, 106, 0.08);
}
.fsrr-booking .rtb-booking-form textarea {
  resize: vertical;
  min-height: 120px;
  height: auto;
}

/* Custom select arrow (same SVG chevron as the theme form) */
.fsrr-booking .rtb-booking-form select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  color-scheme: light;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23C9A86A' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
}
.fsrr-booking .rtb-booking-form select option {
  background: #fff;
  color: #17110c;
}
.fsrr-booking .rtb-booking-form select option:checked,
.fsrr-booking .rtb-booking-form select option:hover {
  background: var(--gold);
  color: #17110c;
}

/* ---------- Field layout: 3-per-row responsive grid ----------
   .reservation  → Datum / Uhrzeit / Personen (3 in a row)
   .rtb-contact  → Name / E-Mail / Telefon (3 in a row); the reveal link and the
                   message textarea span the full width below them.
   auto-fit + minmax gives exactly 3 columns when they fit and collapses to
   2 → 1 as the container narrows, so no media queries are needed. */
.fsrr-booking .rtb-booking-form fieldset.reservation,
.fsrr-booking .rtb-booking-form fieldset.rtb-contact {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 1.6vw, 20px);
  align-items: start;
}
/* Collapse to a single column on tablet/mobile */
@media (max-width: 767px) {
  .fsrr-booking .rtb-booking-form fieldset.reservation,
  .fsrr-booking .rtb-booking-form fieldset.rtb-contact {
    grid-template-columns: 1fr;
  }
}
/* Items that must occupy the whole row */
.fsrr-booking .rtb-booking-form fieldset.reservation legend,
.fsrr-booking .rtb-booking-form fieldset.rtb-contact legend,
.fsrr-booking .rtb-booking-form fieldset.rtb-contact .add-message,
.fsrr-booking .rtb-booking-form fieldset.rtb-contact .rtb-textarea.message {
  grid-column: 1 / -1;
}
/* Reset the stacked-field margins inside the grid (the grid gap spaces them) */
.fsrr-booking .rtb-booking-form fieldset.reservation .rtb-text,
.fsrr-booking .rtb-booking-form fieldset.reservation .rtb-select,
.fsrr-booking .rtb-booking-form fieldset.rtb-contact .rtb-text,
.fsrr-booking .rtb-booking-form fieldset.rtb-contact .rtb-select,
.fsrr-booking .rtb-booking-form fieldset.rtb-contact .rtb-textarea {
  margin: 0;
  min-width: 0; /* let grid tracks shrink instead of overflowing */
}
/* Ensure the actual controls fill their cell. The plugin ships a max-width on
   its inputs which clamps width:100% — reset it to 100% so each control fills
   its grid column. */
.fsrr-booking .rtb-booking-form fieldset.reservation input,
.fsrr-booking .rtb-booking-form fieldset.reservation select,
.fsrr-booking .rtb-booking-form fieldset.rtb-contact input,
.fsrr-booking .rtb-booking-form fieldset.rtb-contact select,
.fsrr-booking .rtb-booking-form fieldset.rtb-contact textarea {
  width: 100% !important;
  max-width: 100% !important;
}

/* ---------- "Nachricht hinzufügen" reveal link ---------- */
.fsrr-booking .rtb-booking-form .add-message {
  margin: 4px 0 18px;
}
.fsrr-booking .rtb-booking-form .add-message a {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.25s var(--ease);
}
.fsrr-booking .rtb-booking-form .add-message a:hover,
.fsrr-booking .rtb-booking-form .add-message a:focus-visible {
  color: var(--gold-2);
  outline: none;
}

/* ---------- Footer / submit button (mirror .btn-gold / wpforms-submit) ---------- */
.fsrr-booking .rtb-booking-form fieldset.rtb-form-footer {
  margin-top: 26px;
}
.fsrr-booking .rtb-booking-form #rtb_recaptcha:not(:empty) {
  margin-bottom: 18px;
}
.fsrr-booking .rtb-booking-form .rtb-form-submit button,
.fsrr-booking .rtb-booking-form button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 54px;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #1a1208;
  background: linear-gradient(
    135deg,
    var(--gold-2),
    var(--gold) 55%,
    var(--gold-deep)
  );
  border: none;
  border-radius: 999px;
  padding: 16px 28px;
  cursor: pointer;
  box-shadow: 0 12px 32px -10px rgba(201, 168, 106, 0.6);
  transition:
    transform 0.3s var(--ease),
    filter 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}
.fsrr-booking .rtb-booking-form .rtb-form-submit button:hover,
.fsrr-booking .rtb-booking-form button[type="submit"]:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 18px 40px -12px rgba(201, 168, 106, 0.7);
}
.fsrr-booking .rtb-booking-form .rtb-form-submit button:focus-visible,
.fsrr-booking .rtb-booking-form button[type="submit"]:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(201, 168, 106, 0.35),
    0 14px 34px -12px rgba(201, 168, 106, 0.65);
}
.fsrr-booking .rtb-booking-form .rtb-form-submit button:active,
.fsrr-booking .rtb-booking-form button[type="submit"]:active {
  transform: translateY(0);
  filter: brightness(0.97);
  box-shadow: 0 8px 20px -10px rgba(201, 168, 106, 0.55);
}

/* ---------- Validation + confirmation messages ---------- */
.fsrr-booking .rtb-booking-form .rtb-error,
.fsrr-booking .rtb-booking-form .error {
  color: #e2a0a0;
  font-size: 12px;
  margin-top: 6px;
}
.fsrr-booking .rtb-booking-form input.error,
.fsrr-booking .rtb-booking-form select.error,
.fsrr-booking .rtb-booking-form textarea.error {
  border-color: #b46b6b;
}
.fsrr-booking .rtb-message-success,
.fsrr-booking .rtb-booking-form .rtb-message {
  margin: 0 0 20px;
  background: rgba(201, 168, 106, 0.08);
  border: 1px solid var(--glass-brd);
  border-radius: 14px;
  padding: 18px 20px;
  color: var(--cream);
  font-size: 15px;
  line-height: 1.7;
}

/* ================================================================
   pickadate.js calendar + time dropdowns (date / Uhrzeit fields)
   Themed to the Zeitlos dark-gold palette so the pickers match.
   ================================================================ */
.fsrr-booking .picker__input,
.fsrr-booking .rtb-booking-form input.picker__input {
  cursor: pointer;
}
/* Backdrop shown while the picker is open — a darkened, see-through overlay
   (NOT a solid fill), so the page stays visible behind it. The actual panel
   is .picker__box below, which keeps its solid background. */
.picker__holder {
  background: rgba(16, 12, 9, 0.6) !important;
}
.picker__frame {
  max-width: 320px;
}
/* Force every picker container layer dark. pickadate's own stylesheet paints
   .picker__box / .picker__list / .picker__list-item with opaque white/#f2f2f2
   backgrounds (and higher specificity via .picker--time …), which sit ON TOP of
   the dark holder — so without overriding these the cream item text lands on
   white. Override all of them, including the .picker--time / .picker--date
   variants, so the dark background always wins. */
.picker__box,
.picker--time .picker__box,
.picker--date .picker__box,
.picker__wrap,
.picker__table,
.picker__list,
.picker--time .picker__list {
  background: var(--coal, #100c09) !important;
  border: 0 !important;
}
.picker__box {
  padding: 14px !important;
}
.picker--time .picker__list {
  padding: 6px !important;
}
/* header + weekday labels */
.picker__header,
.picker__weekday {
  color: var(--smoke) !important;
  font-family: var(--sans) !important;
}
.picker__month,
.picker__year {
  color: var(--cream) !important;
  font-family: var(--serif) !important;
  font-weight: 500 !important;
}
.picker__nav--prev:hover,
.picker__nav--next:hover {
  background: rgba(201, 168, 106, 0.14) !important;
  color: var(--gold) !important;
}
.picker__nav--prev:before,
.picker__nav--next:before {
  border-right-color: var(--gold) !important;
  border-left-color: var(--gold) !important;
}
/* day cells + time list items — transparent so the dark container shows through
   (pickadate paints .picker__list-item white by default) */
.picker__day,
.picker__list-item,
.picker--time .picker__list-item {
  background: transparent !important;
  color: var(--cream) !important;
  border: 1px solid var(--line) !important;
}
.picker--time .picker__list-item {
  border-radius: 8px !important;
  margin-bottom: 4px !important;
}
/* hover + keyboard-highlighted (pickadate's default --highlighted is bright blue) */
.picker__day--infocus:hover,
.picker__day--outfocus:hover,
.picker__list-item:hover,
.picker__day--highlighted,
.picker__list-item--highlighted,
.picker__list-item--highlighted:hover {
  background: rgba(201, 168, 106, 0.14) !important;
  color: var(--gold-2) !important;
  border-color: var(--gold-deep) !important;
}
.picker__day--outfocus {
  color: var(--smoke-2) !important;
}
.picker__day--today:before {
  border-top-color: var(--gold) !important;
}
.picker__day--selected,
.picker__day--selected:hover,
.picker__list-item--selected,
.picker__list-item--selected:hover {
  background: linear-gradient(135deg, var(--gold-2), var(--gold-deep)) !important;
  color: #1a1208 !important;
}
.picker__day--disabled,
.picker__day--disabled:hover,
.picker__list-item--disabled {
  color: #5a5142 !important;
  background: transparent !important;
}
/* footer buttons (Today / Clear / Close) */
.picker__button--today,
.picker__button--clear,
.picker__button--close {
  background: transparent !important;
  color: var(--smoke) !important;
  border: 1px solid var(--line) !important;
  border-radius: 999px !important;
  font-family: var(--sans) !important;
  font-size: 12px !important;
}
.picker__button--today:hover,
.picker__button--clear:hover,
.picker__button--close:hover {
  border-color: var(--gold-deep) !important;
  color: var(--gold) !important;
  background: rgba(201, 168, 106, 0.08) !important;
}
