/* ============================================================
 * Palmers TV — Booking form styles
 * ------------------------------------------------------------
 * Used by the enquiry form on /contact.html (and anywhere we
 * embed the same form layout). Mirrors the previous in-modal
 * styling, now used inline on the page.
 * ============================================================ */

/* Required asterisk in labels */
.form-group .required {
  color: var(--color-orange);
  font-weight: 700;
  margin-left: 2px;
}

/* Two-column row that stacks on mobile */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
@media (max-width: 560px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* The form wrapper */
.booking-form {
  display: block;
}

/* Honeypot — visually hidden but reachable for bots */
.booking-form__honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Error banner — shown when .is-visible is added */
.booking-form__error {
  display: none;
  background: #fdecea;
  color: #b3261e;
  border: 1px solid #f5c2c0;
  border-radius: 10px;
  padding: var(--space-3) var(--space-4);
  font-size: .9rem;
  line-height: 1.5;
  margin-bottom: var(--space-4);
}
.booking-form__error.is-visible { display: block; }
.booking-form__error a { color: var(--color-orange); text-decoration: underline; }

/* "Add more detail" toggle button */
.booking-form__optional-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: transparent;
  border: 1px dashed rgba(61, 43, 31, .25);
  color: var(--color-brown);
  font-family: inherit;
  font-size: .875rem;
  font-weight: 500;
  padding: var(--space-3) var(--space-5);
  border-radius: 999px;
  cursor: pointer;
  margin: var(--space-2) 0 var(--space-5);
  transition: border-color .2s, color .2s, background .2s;
}
.booking-form__optional-toggle:hover {
  border-color: var(--color-orange);
  color: var(--color-orange);
  background: rgba(232, 90, 21, .04);
}
.booking-form__optional-toggle svg {
  width: 14px;
  height: 14px;
  transition: transform .25s;
}
.booking-form__optional-toggle.is-open svg {
  transform: rotate(45deg);
}

/* Collapsible optional fields */
.booking-form__optional {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height .35s ease, opacity .25s ease, margin .25s ease;
  margin-bottom: 0;
}
.booking-form__optional.is-open {
  max-height: 700px;
  opacity: 1;
  margin-bottom: var(--space-4);
}

/* Primary submit button — matches site btn--primary tone */
.booking-form__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-4) var(--space-6);
  background: var(--color-orange);
  color: var(--color-white);
  border: 0;
  border-radius: 999px;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  margin-top: var(--space-2);
  transition: background .2s, transform .2s, box-shadow .2s;
}
.booking-form__submit:hover:not(:disabled) {
  background: var(--color-orange-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(232, 90, 21, .25);
}
.booking-form__submit:disabled {
  opacity: .65;
  cursor: not-allowed;
}
.booking-form__submit svg {
  width: 18px;
  height: 18px;
}

/* Legal / "prefer something else" line */
.booking-form__legal {
  font-size: .8rem;
  color: var(--color-text-light);
  text-align: center;
  margin-top: var(--space-4);
  line-height: 1.6;
}
.booking-form__legal a {
  color: var(--color-orange);
  text-decoration: none;
  font-weight: 500;
}
.booking-form__legal a:hover { text-decoration: underline; }

/* Success state — replaces the form when submission succeeds */
.booking-form__success {
  display: none;
  text-align: center;
  padding: var(--space-6) var(--space-4) var(--space-4);
  animation: bookingSuccessIn .4s ease;
}
.booking-form__success.is-visible { display: block; }

.booking-form__success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-5);
  background: rgba(16, 185, 129, .12);
  color: #10b981;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.booking-form__success-icon svg {
  width: 32px;
  height: 32px;
  stroke-width: 2.5;
}
.booking-form__success h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-brown);
  margin: 0 0 var(--space-2);
}
.booking-form__success p {
  font-size: .95rem;
  color: var(--color-text-light);
  line-height: 1.6;
  margin: 0;
}

@keyframes bookingSuccessIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Tighten textarea on the booking form so it doesn't dominate the card */
.booking-form .form-group textarea {
  min-height: 96px;
}

/* HTML5 hidden attribute must always win over component display rules */
[hidden] { display: none !important; }

/* ============================================================
 * Alternate contact tiles ("or" — Design my system / Call us)
 * ============================================================ */
.booking-form__alts {
  margin-top: var(--space-6);
}

.booking-form__alts-divider {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin: 0 0 var(--space-5);
  color: var(--color-text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.booking-form__alts-divider::before,
.booking-form__alts-divider::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: rgba(0, 0, 0, 0.08);
}

.booking-form__alts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
@media (max-width: 720px) {
  .booking-form__alts-grid {
    grid-template-columns: 1fr;
  }
}

.booking-alt-tile {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border: 1.5px solid rgba(0, 0, 0, 0.1);
  border-radius: 14px;
  background: #fff;
  color: var(--color-text);
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
  min-height: 84px;
}

.booking-alt-tile:hover,
.booking-alt-tile:focus-visible {
  border-color: var(--color-orange);
  background: linear-gradient(135deg, #fff7ef 0%, #ffe9d2 100%);
  box-shadow: 0 8px 24px -10px rgba(229, 110, 33, 0.4);
  transform: translateY(-2px);
  outline: none;
}

.booking-alt-tile__icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff8a3d 0%, #e56e21 100%);
  color: #fff;
  box-shadow: 0 4px 12px -4px rgba(229, 110, 33, 0.5);
}
.booking-alt-tile__icon svg {
  width: 22px;
  height: 22px;
}

.booking-alt-tile__body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.booking-alt-tile__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.25;
}

.booking-alt-tile__desc {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.35;
}

.booking-alt-tile__arrow {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  transition: transform 180ms ease, color 180ms ease;
}
.booking-alt-tile__arrow svg {
  width: 18px;
  height: 18px;
}

.booking-alt-tile:hover .booking-alt-tile__arrow,
.booking-alt-tile:focus-visible .booking-alt-tile__arrow {
  color: var(--color-orange);
  transform: translateX(3px);
}
