/* ==========================================================================
   leadgen-forms.css
   Styles for the conversion pages: consultation, contact (visit), trade,
   bespoke, interior design, atelier. Loaded after leadgen.css.
   Everything here is for markup added by the lead-gen overhaul: short forms,
   mode chips, "add details" disclosure, hero action rows, fact strips,
   package extras and the map-first contact layout.
   ========================================================================== */

/* the [hidden] attribute must beat component display rules (form rows, grids) */
[hidden] {
  display: none !important;
}

/* width/height attributes only reserve space; CSS-sized images keep their own height */
:where(img[width][height]) {
  height: auto;
}

/* ---------- hero action rows ---------- */
.page-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.page-hero .open-status {
  max-width: 560px;
  margin-top: 16px;
}

.page-hero__meta a[href^="#"] {
  color: var(--gold-3);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hours-live {
  display: block;
}

/* ---------- consultation hero: the form comes first on phones ---------- */
@media (max-width: 980px) {
  .consult-hero {
    padding-top: calc(var(--header) + 22px);
    padding-bottom: 52px;
  }

  .consult-hero__grid {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
  }

  .consult-hero__content {
    display: contents;
  }

  .consult-hero .crumbs {
    order: 1;
    margin: 0;
  }

  .consult-hero .kicker {
    order: 2;
    margin: 0;
  }

  .consult-hero__content h1 {
    order: 3;
    margin: 0;
    font-size: clamp(34px, 10vw, 52px);
  }

  .consult-hero__form {
    order: 4;
    width: 100%;
    max-width: 640px;
    margin-top: 4px;
  }

  .consult-hero__content > p:not(.kicker):not(.consult-hero__side-note) {
    order: 5;
    margin-top: 10px;
  }

  .consult-hero .trust-row {
    order: 6;
    margin-top: 6px;
  }

  .consult-hero .consult-hero__actions {
    order: 7;
    margin-top: 6px;
  }

  .consult-hero .consult-hero__side-note {
    order: 8;
    margin-top: 4px;
  }
}

/* phones: lift the form so the submit button sits above the bottom bar */
@media (max-width: 560px) {
  .consult-hero {
    padding-top: calc(var(--header) + 10px);
  }

  .consult-hero .kicker {
    display: none;
  }

  .consult-hero__form {
    margin-top: 0;
    padding: 20px 18px;
  }

  .consult-hero__form h2 {
    font-size: 26px;
  }

  .consult-hero__form .enquiry-form {
    margin-top: 16px;
  }
}

/* ---------- compact forms ---------- */
.enquiry-form {
  gap: 16px;
}

.field-group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.field-group > legend {
  padding: 0;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  position: relative;
  display: inline-flex;
  min-width: 0;
}

.chip input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.chip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.2;
  text-align: center;
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease), color 0.25s var(--ease);
}

.chip:hover span {
  border-color: var(--gold);
}

.chip input:checked + span {
  border-color: var(--gold);
  background: rgba(177, 138, 82, 0.16);
  box-shadow: inset 0 0 0 1px var(--gold);
  color: var(--ink);
  font-weight: 600;
}

.chip input:focus-visible + span {
  outline: 2px solid var(--gold-3);
  outline-offset: 2px;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.6;
  cursor: pointer;
}

.check input {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  accent-color: var(--gold-3);
}

.form-more {
  border-top: 1px solid var(--line);
}

.form-more > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.form-more > summary::-webkit-details-marker {
  display: none;
}

.form-more > summary::after {
  content: "+";
  color: var(--gold-3);
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
}

.form-more[open] > summary::after {
  content: "\2212";
}

.form-more > summary:focus-visible {
  outline: 2px solid var(--gold-3);
  outline-offset: 2px;
}

.form-more__body {
  display: grid;
  gap: 16px;
  padding: 6px 0 4px;
}

.form-schedule {
  align-items: end;
}

html[lang="ar"] .field-group > legend {
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
}

@media (max-width: 1080px) {
  .field-group > legend {
    font-size: 12px;
    letter-spacing: 0.06em;
  }

  .chip span {
    font-size: 14px;
  }

  .form-more > summary {
    font-size: 14px;
  }

  .check {
    font-size: 14px;
  }
}

@media (max-width: 720px) {
  html[lang="ar"] .field-group > legend {
    font-size: 13px;
  }

  /* day and time are short selects: keep them side by side */
  .form-schedule {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .chip-group {
    gap: 6px;
  }

  .chip {
    flex: 1 1 auto;
  }

  .chip span {
    width: 100%;
    padding: 0 12px;
  }
}

/* ---------- fact strips (real facts only) ---------- */
.fact-strip-section {
  padding-block: clamp(22px, 3vw, 36px);
}

.fact-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin: 0;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  list-style: none;
}

.fact-strip li {
  position: relative;
  padding-inline-start: 16px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.5;
}

.fact-strip li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  background: var(--gold);
  transform: rotate(45deg);
}

/* ---------- contact (visit) page: map and form lead ---------- */
.map-block.map-block--lead {
  margin-top: 0;
  margin-bottom: clamp(36px, 5vw, 64px);
}

@media (max-width: 720px) {
  .map-block--lead .map-frame {
    height: 260px;
  }
}

@media (max-width: 980px) {
  .contact-layout--form-first .enquiry-card {
    order: -1;
  }
}

/* a QR code is pointless on the phone that would have to scan itself */
@media (max-width: 767px), (hover: none) and (pointer: coarse) {
  .qr-card--desktop {
    display: none;
  }
}

/* ---------- interior design: packages ---------- */
.package__rooms {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.02em;
}

.package--featured .package__rooms {
  color: rgba(255, 253, 249, 0.66);
}

.package__price--ask {
  align-items: center;
  min-height: calc(clamp(44px, 4.5vw, 64px) * 0.9 + 24px);
}

.package__price--ask strong {
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.2;
}

.package__alt {
  margin: 14px 0 0;
  text-align: center;
}

.package__alt .text-link {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: none;
}

html[lang="ar"] .package__alt .text-link {
  font-size: 13px;
}

.package-note {
  max-width: 760px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.section-link {
  margin: 28px 0 0;
}

/* shorter gallery on phones: the first six images, then the link */
@media (max-width: 720px) {
  .project-gallery--short figure:nth-child(n + 7) {
    display: none;
  }
}

/* ---------- a lead-open control styled as a text link ---------- */
button.text-link {
  padding-top: 0;
  border-width: 0 0 1px;
  background: none;
  color: inherit;
  font-family: inherit;
  cursor: pointer;
}

/* ---------- owner-fed slots stay invisible until real data is supplied ---------- */
[data-owner-fact][hidden],
.proof-slot[hidden] {
  display: none !important;
}

/* in-page anchors (hero buttons, package links) land below the fixed header */
section[id],
.enquiry-card[id] {
  scroll-margin-top: 100px;
}
