/* ═══════════════════════════════════════════════════════════════════════
   Overrides applied to the SITEMAP, in its embedded form on this site.

   READ THIS BEFORE ADDING TO IT.

   This is a patch from outside onto markup this repo does not own. The
   sitemap is a separate application, deployed separately; we only get to
   touch it here because functions/[[path]].js serves it through this domain
   and appends this file to its <head>. Two consequences:

     - It applies ONLY to visitors who come through desertpalisadeslots.com.
       The sitemap's own URL is unaffected, so the two look different.
     - Every selector here is a bet on class names in someone else's build.
       When that build changes, these rules stop matching and quietly do
       nothing. They fail invisible, which is the bad way to fail.

   So this is a stopgap for things wanted NOW, and each rule says what it is
   for and what it measured, so the next person can tell a live fix from a
   dead one. Anything that can be fixed at source should be.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── The inquiry modal ─────────────────────────────────────────────────
   Measured in the running app at 1440x900: the card .inquire-form-side
   carries an explicit height of 770px, and .inquire-fields inside it is
   flex: 1 1 auto with align-content: start — so the fields box stretches to
   the card's height while its rows stay at the top, and all the slack piles
   up in one place. 140px of it, between the agent/broker row and Submit.

   The card cannot shrink on its own, and `height: auto` does not help — the
   app already sets that, with !important, and it is powerless here:

       .inquire-overlay .inquire-form-side {
         position: fixed; top: 40px;
         bottom: calc(100vh - var(--inquire-map-bottom, 90vh));
         height: auto !important;
       }

   A fixed box anchored at BOTH top and bottom is stretched between them and
   `height: auto` resolves to that distance, not to the content. 40px down from
   the top and 90px up from the bottom of a 900px window is exactly the 770px
   measured. Releasing the bottom edge is what lets it size to its content;
   max-height then caps it and the card scrolls if a form ever outgrows the
   window. */
.inquire-overlay .inquire-form-side {
  bottom: auto !important;
  max-height: min(90vh, 940px) !important;
  overflow-y: auto !important;
}
.inquire-overlay .inquire-content {
  flex: 0 1 auto !important;
  overflow-y: auto !important;
}
.inquire-overlay .inquire-form   { flex: 0 0 auto !important; }
.inquire-overlay .inquire-fields {
  flex: 0 0 auto !important;
  overflow-y: visible !important;
}

/* The heading was 50.4px against a 920px card — small for the one line of
   display type in the dialogue. Clamped rather than fixed so it holds on a
   phone, where the card is the width of the screen. */
.inquire-overlay .inquire-heading {
  font-size: clamp(38px, 4.6vw, 72px) !important;
  line-height: 1.04 !important;
}

/* ── The intro tagline ───────────────────────────────────────
   "110 rare, elevated homesites", under the mark on the way in, set all in
   lower case. The client wants each word capitalised.

   text-transform, because the words are not ours to retype: the app builds
   that line in script, splitting the string on spaces and wrapping each word
   in its own span to stagger them —

       _e.id = "dpV2Tag"; _e.innerHTML =
         "110 rare, elevated homesites".split(" ").map(… dpv2-tw …)

   — so the text is a literal in the bundle and the only thing reachable from
   out here is how it is rendered. Capitalising the container covers every
   word without touching the stagger. The id is the app's own, not a class
   name, so this is a slightly safer bet than the rules above it; it still
   fails silently if that element is ever renamed. */
#dpV2Tag { text-transform: capitalize !important; }

/* ── The heading-font lab ────────────────────────────────────
   The face is chosen — Italiana, which is what both halves were already set
   in — so the dev panel of eleven serifs below the sitemap's footer comes off.

   Hidden rather than deleted, because it is not ours to delete: the block and
   its <script> live in the sitemap app's own index.html, which this repository
   does not contain. So this takes it off the embedded copy, and it is still
   there on the sitemap's own URL until somebody removes it AT SOURCE, together
   with the Google Fonts <link> that loads the ten candidates on every visit.
   That link is the reason this is worth doing properly rather than leaving:
   hiding the panel does not stop the fonts being fetched.

   The other half of this came out of site.js in the same commit — the bridge
   that carried a pick across to the website's headlines. */
.dp-font-lab { display: none !important; }

/* ── The legend makes room for the menu ───────────────────────────
   The hamburger now stays over the sitemap, and the legend was under it:
   measured at 1440, .dp-house-legend sits at left 28 and runs 291px, while the
   menu button occupies 45..89. So the legend moves right, into the gap between
   the button and the wordmark — button, legend, wordmark, Close, left to
   right.

   The offset is COMPUTED, not typed, because the header it has to clear is
   fluid. Repeating the two clamps is deliberate: --gutter and the button's
   size are custom properties on the PARENT document, and a custom property
   does not cross an iframe boundary — the same trap as teleporting to body.
   The vw unit does resolve identically, because this frame is the full width
   of the window, so the arithmetic lands on the same pixel the parent does:

       left = gutter + button width + 22px of air
            = clamp(20px, 3.1vw, 58px) + clamp(38px, 3.1vw, 46px) + 22px

   At 1440 that is 44.64 + 44.64 + 22 = 111.3, putting the legend at 111..402
   against a wordmark that starts at 659. If either clamp is ever changed in
   site.css, this has to change with it — which is the cost of the value being
   in two places, and why it is written out rather than left as a number. */
.dp-house-legend {
  left: calc(clamp(20px, 3.1vw, 58px) + clamp(38px, 3.1vw, 46px) + 22px) !important;
}

/* On a phone it stays in the header, smaller. It does not fit there at its
   drawn size — measured, the legend is 291px wide and the gap between the menu
   button and Close is 266px at 390 and 208px at 320 — so it is reduced rather
   than moved: font, gaps, dot, icon and rule all come down together, which
   shrinks it by reflow rather than by scaling a 291px box (a transform would
   need a unitless ratio computed from vw, and CSS cannot divide a length by a
   length).

   Placed after the button and centred on the header's own row: 14px of nav
   padding plus half a 46px button puts that row's centre at 37, and a 30px
   box hangs from 22. */
@media (max-width: 680px) {
  .dp-house-legend {
    left: calc(clamp(20px, 3.1vw, 58px) + clamp(38px, 3.1vw, 46px) + 14px) !important;
    top: 22px !important;
    height: 30px !important;
    gap: 9px !important;
    font-size: 11.5px !important;
    letter-spacing: .02em !important;
  }
  .dp-house-legend .dp-leg-item { gap: 5px !important; }
  .dp-house-legend .dp-leg-dot { width: 11px !important; height: 11px !important; }
  .dp-house-legend svg { width: 15px !important; height: 15px !important; }
  .dp-house-legend .dp-leg-sep { height: 14px !important; }
}

/* One more step for the 320px class. At the sizes above, the legend measures
   189px and the gap to Close is 103 at 430, 63 at 390, 39 at 360 — and MINUS
   ONE at 320. It is the same arithmetic as the header's own, so it takes the
   same breakpoint. */
@media (max-width: 360px) {
  .dp-house-legend {
    gap: 7px !important;
    font-size: 10.5px !important;
  }
  .dp-house-legend .dp-leg-item { gap: 4px !important; }
  .dp-house-legend .dp-leg-dot { width: 10px !important; height: 10px !important; }
  .dp-house-legend svg { width: 13px !important; height: 13px !important; }
  .dp-house-legend .dp-leg-sep { height: 12px !important; }
}
