/* =============================================================================
 *  Checkout Address Autocomplete — assets/css/checkout-address.css
 * =============================================================================
 *
 *  Premium luxury dropdown for the WooCommerce checkout address field.
 *  Mobile-first, iOS-Safari-safe, GPU-only animations, ARIA-aware.
 *
 *  Design tokens (matched to The Slow Draw brand):
 *    --tsd-ac-gold:       #9b6b28
 *    --tsd-ac-gold-soft:  rgba(155, 107, 40, 0.08)
 *    --tsd-ac-ink:        #1a1a1a
 *    --tsd-ac-mute:       #64748b
 *    --tsd-ac-border:     #e7e2d6
 *    --tsd-ac-card-bg:    #ffffff
 *    --tsd-ac-shadow:     0 18px 42px rgba(15, 23, 42, 0.10)
 *
 *  Animation rules (locked):
 *    - Enter / exit: opacity + translateY only (GPU-only, no layout)
 *    - Hover / active: opacity + transform (no box-shadow transitions —
 *      Safari paint thrash on long lists)
 *    - Easing: cubic-bezier(0.22, 1, 0.36, 1) — luxury "ease-out-quint"
 *    - Duration: 220ms (matches the JS close-timeout)
 *
 *  iOS Safari notes:
 *    - 16px font-size on input prevents iOS auto-zoom on focus
 *    - `-webkit-tap-highlight-color: transparent` kills the iOS blue flash
 *    - GPU layers via `transform: translateZ(0)` only on items being interacted
 *      with (NOT permanently — that leaks compositor memory on iPhone)
 *    - position: absolute relative to .tsd-ac-host (input parent) — keeps
 *      the dropdown anchored when iOS keyboard pops up
 *
 *  @since 2026-04-28
 * =============================================================================
 */

/* ---------- Tokens ---------- */
.tsd-ac-host,
.tsd-ac-dropdown {
    --tsd-ac-gold:      #9b6b28;
    --tsd-ac-gold-soft: rgba(155, 107, 40, 0.08);
    --tsd-ac-gold-ring: rgba(155, 107, 40, 0.30);
    --tsd-ac-ink:       #1a1a1a;
    --tsd-ac-mute:      #64748b;
    --tsd-ac-mute-2:    #94a3b8;
    --tsd-ac-border:    #e7e2d6;
    --tsd-ac-border-2:  #f1ece2;
    --tsd-ac-card-bg:   #ffffff;
    --tsd-ac-row-hover: #fbf6ec;
    --tsd-ac-shadow:    0 18px 42px rgba(15, 23, 42, 0.10);
    --tsd-ac-radius:    16px;
    --tsd-ac-ease:      cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Host: positioning anchor for the dropdown ---------- */
.tsd-ac-host {
    position: relative;
}

/* ---------- Dropdown shell ---------- */
/* REBUILT 2026-09-22: this used to fade/slide in via an opacity+transform
 * CSS transition (with translateZ(0) forcing a GPU compositing layer,
 * paired with JS-side rAF delays and a forced-reflow workaround). Across
 * an extended real-Safari investigation the dropdown was found to
 * sometimes compute every style "correctly" (opacity:1, is-open present,
 * non-zero height) while never actually painting — a WebKit compositing
 * bug that three separate targeted fixes to the animated version did not
 * conclusively resolve. Rather than continue patching an animation this
 * component doesn't need, the whole entrance/exit animation was removed:
 * visibility is now controlled purely by the `hidden` attribute, with no
 * opacity, transform, or transition involved anywhere in this state.
 * There is no compositing-layer requirement left to fail silently on.
 */
.tsd-ac-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    /* FOUND AND FIXED 2026-09-22: this is the actual, root cause of the
     * entire "dropdown not visible on Safari" investigation. Confirmed via
     * a live getBoundingClientRect() trace in the user's own Safari
     * session: the element was open, positioned correctly, and fully
     * populated with real results — but rendering at exactly 2px wide.
     * `left:0; right:0` is supposed to stretch an absolutely-positioned
     * element to its containing block's width, but Safari does not
     * reliably compute that stretched width when the element is also a
     * flex container (`display:flex`) with no explicit width of its own —
     * it can fall back to a near-zero intrinsic/content width instead.
     * This is a real, independently-documented WebKit sizing quirk, not
     * the compositing/paint bug every prior fix in this investigation
     * (forced reflow, reduced-motion translateZ(0), the full animation
     * removal) was aimed at — none of those could have fixed this, since
     * the element really was invisible, just for an entirely different
     * reason. width:100% forces the correct stretched width explicitly,
     * independent of how any browser resolves left/right on a flex box.
     */
    width: 100%;
    top: 100%;
    margin-top: 8px;
    z-index: 200;
    background: var(--tsd-ac-card-bg);
    border: 1px solid var(--tsd-ac-border);
    border-radius: var(--tsd-ac-radius);
    box-shadow: var(--tsd-ac-shadow);
    overflow: hidden;
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    color: var(--tsd-ac-ink);
    /* Mobile-friendly inner constraints */
    max-height: min(420px, 60vh);
    display: flex;
    flex-direction: column;
    /* Safari/WebKit-specific: without an explicit min-height, a column-flex
       shell whose height is content-driven (only max-height, no fixed
       height) can resolve its scrollable child's size very differently
       from Chromium, collapsing the whole dropdown down to a hairline.
       min-height: 0 removes that ambiguity. */
    min-height: 0;
}
.tsd-ac-dropdown[hidden] {
    display: none;  /* the only thing gating visibility now */
}

/* ---------- Status bar (loading / no-results) ---------- */
.tsd-ac-status {
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--tsd-ac-mute);
    background: var(--tsd-ac-gold-soft);
    border-bottom: 1px solid var(--tsd-ac-border-2);
    letter-spacing: 0.02em;
    display: none;
}
.tsd-ac-status.is-visible {
    display: block;
}

/* ---------- List ---------- */
.tsd-ac-list {
    list-style: none;
    margin: 0;
    padding: 6px 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1 1 auto;
    /* See .tsd-ac-dropdown above — same Safari min-height ambiguity applies
       to the scrollable child itself. */
    min-height: 0;
    /* Subtle thin scrollbar — matches brand */
    scrollbar-width: thin;
    scrollbar-color: var(--tsd-ac-gold-ring) transparent;
}
.tsd-ac-list::-webkit-scrollbar         { width: 6px; }
.tsd-ac-list::-webkit-scrollbar-track   { background: transparent; }
.tsd-ac-list::-webkit-scrollbar-thumb   { background: var(--tsd-ac-gold-ring); border-radius: 999px; }

/* ---------- Item (one suggestion) ---------- */
.tsd-ac-item {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    /* Color/bg-only transitions — no box-shadow / no layout */
    transition: background-color 0.18s ease, color 0.18s ease;
    min-height: 56px;   /* WCAG 2.5.5 — 44px+ touch target with comfy padding */
}
.tsd-ac-item:hover,
.tsd-ac-item:focus,
.tsd-ac-item.is-active {
    background: var(--tsd-ac-row-hover);
}
.tsd-ac-item.is-active {
    /* Subtle gold ring on the left to indicate keyboard focus without
       a layout-shifting border. Inset shadow = no layout impact. */
    box-shadow: inset 3px 0 0 0 var(--tsd-ac-gold);
}

.tsd-ac-pin {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--tsd-ac-gold-soft);
    color: var(--tsd-ac-gold);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    line-height: 1;
    flex-shrink: 0;
}

.tsd-ac-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.tsd-ac-main {
    font-size: 14px;
    font-weight: 700;
    color: var(--tsd-ac-ink);
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: 0;
}
.tsd-ac-sub {
    font-size: 12px;
    color: var(--tsd-ac-mute);
    font-weight: 500;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tsd-ac-hl {
    font-style: normal;
    font-weight: 800;
    color: var(--tsd-ac-gold);
    background: transparent;
}

/* ---------- Footer ("Suggestions powered by Google") ---------- */
.tsd-ac-footer {
    padding: 9px 16px 11px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--tsd-ac-mute-2);
    border-top: 1px solid var(--tsd-ac-border-2);
    background: #fcfbf9;
    text-align: center;
}

/* ---------- Mobile tightening (≤ 640px) ---------- */
@media (max-width: 640px) {
    .tsd-ac-dropdown {
        border-radius: 14px;
        max-height: min(360px, 50vh);
    }
    .tsd-ac-item {
        padding: 13px 14px;
        min-height: 52px;
        gap: 10px;
    }
    .tsd-ac-main { font-size: 13.5px; }
    .tsd-ac-sub  { font-size: 11.5px; }
    .tsd-ac-status { padding: 10px 14px; font-size: 11.5px; }
    .tsd-ac-footer { padding: 8px 14px 10px; font-size: 9.5px; }
}

/* ---------- Reduced motion — instant entrance, no transitions ---------- */
@media (prefers-reduced-motion: reduce) {
    /* REBUILT 2026-09-22: .tsd-ac-dropdown itself no longer has any
     * transition or transform at all (see the dropdown-shell comment
     * above) — there is nothing left for this query to override there,
     * so those rules were removed rather than left as dead code.
     * .tsd-ac-item's hover colour transition is unrelated to the
     * dropdown's own open/close visibility and still applies normally.
     */
    .tsd-ac-item {
        transition: none !important;
        transform: none !important;
    }
}

/* =============================================================================
 *  GEOLOCATION — TRIGGER PILL  (added 2026-04-28)
 * -----------------------------------------------------------------------------
 *  Discreet gold-accent pill that sits ABOVE the address_1 field. Click →
 *  opens the location modal. Always visible, never clutters the form.
 * ============================================================================= */

.tsd-loc-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px 0;
    padding: 10px 16px;
    background: linear-gradient(180deg, #fff 0%, #fbf6ec 100%);
    border: 1px solid rgba(155, 107, 40, 0.30);
    border-radius: 999px;
    color: #9b6b28 !important;
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    text-decoration: none !important;
    cursor: pointer;
    line-height: 1;
    min-height: 40px;
    transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.24s ease,
                background 0.24s ease,
                color 0.24s ease;
    -webkit-tap-highlight-color: transparent;
}
.tsd-loc-trigger:hover,
.tsd-loc-trigger:focus-visible {
    background: linear-gradient(180deg, #9b6b28 0%, #7d5520 100%);
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(155, 107, 40, 0.28);
    outline: none;
}
.tsd-loc-trigger:focus-visible {
    box-shadow: 0 0 0 3px rgba(155, 107, 40, 0.30), 0 12px 26px rgba(155, 107, 40, 0.28);
}
.tsd-loc-trigger__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    line-height: 1;
}
.tsd-loc-trigger__label {
    line-height: 1;
}
.tsd-loc-trigger__arrow {
    font-size: 14px;
    line-height: 1;
    transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}
.tsd-loc-trigger:hover .tsd-loc-trigger__arrow {
    transform: translateX(3px);
}

/* =============================================================================
 *  GEOLOCATION — MODAL  (added 2026-04-28)
 * -----------------------------------------------------------------------------
 *  Premium brand-styled location-permission modal. Sits OVER the page with a
 *  blurred dark backdrop. Card uses brand white + gold accent. Pulsing pin
 *  icon for attention without being aggressive.
 * ============================================================================= */

.tsd-loc-modal {
    position: fixed;
    inset: 0;
    z-index: 99998; /* above the existing notice modal (99999 is reserved for that) */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(16px, 4vw, 28px);
    background: rgba(10, 10, 10, 0.55);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.28s ease;
}
.tsd-loc-modal.is-open {
    opacity: 1;
}
.tsd-loc-modal[hidden] {
    display: none;
}

.tsd-loc-modal__card {
    position: relative;
    width: 100%;
    max-width: 460px;
    background: #ffffff;
    border-radius: 24px;
    padding: clamp(28px, 4vw, 40px) clamp(22px, 3vw, 36px) clamp(20px, 3vw, 28px);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.32);
    text-align: center;
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    color: #1a1a1a;
    transform: translateY(12px) scale(0.98);
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
.tsd-loc-modal.is-open .tsd-loc-modal__card {
    transform: translateY(0) scale(1);
}

.tsd-loc-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: transparent;
    border: 0;
    color: #94a3b8;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.24s ease, background 0.24s ease;
    -webkit-tap-highlight-color: transparent;
}
.tsd-loc-modal__close:hover,
.tsd-loc-modal__close:focus-visible {
    color: #1a1a1a;
    background: #f1ece2;
    outline: none;
}

/* Pulsing pin icon */
.tsd-loc-modal__icon {
    position: relative;
    width: 76px;
    height: 76px;
    margin: 0 auto clamp(16px, 2.4vw, 22px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.tsd-loc-modal__pulse {
    position: absolute;
    inset: 12px;
    border-radius: 50%;
    background: rgba(155, 107, 40, 0.30);
    animation: tsdLocPulse 1.8s ease-out infinite;
    pointer-events: none;
}
.tsd-loc-modal__pin {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #b88e3f 0%, #9b6b28 60%, #7d5520 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 24px rgba(155, 107, 40, 0.32);
}
@keyframes tsdLocPulse {
    0%   { transform: scale(0.95); opacity: 0.50; }
    70%  { transform: scale(2.40); opacity: 0;    }
    100% { transform: scale(2.40); opacity: 0;    }
}

.tsd-loc-modal__title {
    font-size: clamp(20px, 2.4vw, 24px);
    font-weight: 800;
    margin: 0 0 8px 0;
    color: #1a1a1a;
    letter-spacing: -0.01em;
    line-height: 1.2;
}
.tsd-loc-modal__body {
    font-size: 14px;
    line-height: 1.6;
    color: #64748b;
    margin: 0 auto clamp(18px, 2.4vw, 24px);
    max-width: 38ch;
    font-weight: 500;
}

/* Status row (busy / success / error) */
.tsd-loc-modal__status {
    min-height: 0;
    margin: 0 0 clamp(12px, 1.6vw, 16px) 0;
    padding: 0 16px;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.45;
    border-radius: 12px;
    display: none;
    text-align: left;
}
.tsd-loc-modal__status.is-busy,
.tsd-loc-modal__status.is-success,
.tsd-loc-modal__status.is-error {
    display: block;
    padding: 12px 16px;
}
.tsd-loc-modal__status.is-busy {
    background: rgba(155, 107, 40, 0.06);
    color: #9b6b28;
    border: 1px solid rgba(155, 107, 40, 0.16);
}
.tsd-loc-modal__status.is-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #34d399;
}
.tsd-loc-modal__status.is-error {
    background: #fff1f0;
    color: #9b1c1c;
    border: 1px solid #fecaca;
}

/* Actions */
.tsd-loc-modal__actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.tsd-loc-modal__btn {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    border-radius: 999px;
    padding: 14px 22px;
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    cursor: pointer;
    line-height: 1;
    min-height: 48px;
    transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.24s ease,
                background 0.24s ease,
                color 0.24s ease;
    -webkit-tap-highlight-color: transparent;
}
.tsd-loc-modal__btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none !important;
}

.tsd-loc-modal__btn--primary {
    background: linear-gradient(135deg, #0f172a 0%, #1f2937 100%);
    color: #ffffff;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.tsd-loc-modal__btn--primary::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(135deg, #b88e3f 0%, #9b6b28 60%, #7d5520 100%);
    transform: translateX(-101%);
    transition: transform 0.42s cubic-bezier(0.65, 0, 0.35, 1);
}
.tsd-loc-modal__btn--primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(155, 107, 40, 0.30);
}
.tsd-loc-modal__btn--primary:hover:not(:disabled)::before {
    transform: translateX(0);
}
.tsd-loc-modal__btn--primary:focus-visible {
    outline: 2px solid #9b6b28;
    outline-offset: 3px;
}

.tsd-loc-modal__btn--ghost {
    background: transparent;
    color: #64748b;
    border: 1px solid #e7e2d6;
}
.tsd-loc-modal__btn--ghost:hover:not(:disabled),
.tsd-loc-modal__btn--ghost:focus-visible {
    color: #1a1a1a;
    background: #fbf6ec;
    border-color: rgba(155, 107, 40, 0.30);
    outline: none;
}

/* Footer privacy chip */
.tsd-loc-modal__footer {
    margin-top: clamp(14px, 2vw, 18px);
    padding-top: clamp(12px, 1.6vw, 16px);
    border-top: 1px solid #f1ece2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: #94a3b8;
    width: 100%;
}

/* Mobile (≤ 480px) */
@media (max-width: 480px) {
    .tsd-loc-modal__card { border-radius: 20px; }
    .tsd-loc-modal__title { font-size: 18px; }
    .tsd-loc-modal__body  { font-size: 13px; }
    .tsd-loc-modal__icon  { width: 64px; height: 64px; }
    .tsd-loc-modal__pin   { width: 54px; height: 54px; }
    .tsd-loc-trigger      { font-size: 10px; padding: 9px 14px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .tsd-loc-modal,
    .tsd-loc-modal.is-open,
    .tsd-loc-modal__card,
    .tsd-loc-modal__btn,
    .tsd-loc-modal__btn--primary::before,
    .tsd-loc-trigger,
    .tsd-loc-trigger__arrow,
    .tsd-loc-modal__pulse {
        transition: none !important;
        transform: none !important;
        animation: none !important;
    }
}

/* =============================================================================
 *  MAP CONFIRMATION MODAL  (Phase L-2 — added 2026-04-28)
 *  Shown after geolocation/autocomplete success — customer reviews resolved
 *  address + drags pin on a Google Map. Same brand language (gold #9b6b28,
 *  white card, Poppins). z-index 99999 sits ABOVE the location-permission
 *  modal so transitioning between the two feels stacked correctly.
 * ============================================================================= */
.tsd-map-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(12px, 3vw, 24px);
    background: rgba(10, 10, 10, 0.55);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.28s ease;
}
.tsd-map-modal.is-open { opacity: 1; }
.tsd-map-modal[hidden] { display: none; }

.tsd-map-modal__card {
    position: relative;
    width: 100%;
    max-width: 600px;
    max-height: calc(100vh - 24px);
    background: #ffffff;
    border-radius: 22px;
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.32);
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    color: #1a1a1a;
    transform: translateY(14px) scale(0.98);
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.tsd-map-modal.is-open .tsd-map-modal__card { transform: translateY(0) scale(1); }

.tsd-map-modal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: clamp(20px, 2.4vw, 26px) clamp(20px, 2.4vw, 28px) 14px;
}
.tsd-map-modal__title-wrap { min-width: 0; }
.tsd-map-modal__eyebrow {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.20em;
    text-transform: uppercase;
    color: #9b6b28;
    margin-bottom: 6px;
}
.tsd-map-modal__title {
    font-size: clamp(18px, 2.2vw, 22px);
    font-weight: 800;
    margin: 0;
    color: #1a1a1a;
    line-height: 1.2;
    letter-spacing: -0.01em;
}
.tsd-map-modal__close {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: transparent;
    border: 0;
    color: #94a3b8;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.24s ease, background 0.24s ease;
    -webkit-tap-highlight-color: transparent;
}
.tsd-map-modal__close:hover,
.tsd-map-modal__close:focus-visible {
    color: #1a1a1a;
    background: #f1ece2;
    outline: none;
}

.tsd-map-modal__address {
    margin: 0 clamp(20px, 2.4vw, 28px) 14px;
    padding: 12px 14px;
    background: #fbf6ec;
    border: 1px solid #e7e2d6;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.45;
}

.tsd-map-modal__map-wrap {
    position: relative;
    margin: 0 clamp(20px, 2.4vw, 28px);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #e7e2d6;
}
.tsd-map-modal__map {
    width: 100%;
    height: clamp(220px, 36vh, 320px);
    background: #f1ece2;  /* placeholder while Maps boots */
}

/* ============================================================================
 *  MAP MODAL PRELOADER — added 2026-04-29
 *
 *  Shown immediately when the map modal opens; hidden on Maps' first
 *  `tilesloaded` event (or after a 4s safety timeout). Visual: brand-gold
 *  pulsing pin centred over a soft skeleton-shimmer that mimics the map
 *  texture so the modal feels "loading the map" rather than "loading
 *  generic content".
 * ============================================================================ */
.tsd-map-modal__loader {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: linear-gradient(135deg, #f7f4ee 0%, #f1ece2 100%);
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}
.tsd-map-modal__loader.is-hidden {
    opacity: 0;
}

/* Subtle skeleton shimmer beneath the pin — diagonal gradient sweeping
 * left → right, suggests "tiles loading". */
.tsd-map-modal__loader-skeleton {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%) 0 0 / 240% 100% no-repeat,
        repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.025) 0 1px, transparent 1px 24px),
        repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.025) 0 1px, transparent 1px 24px);
    animation: tsd-shimmer 1.6s linear infinite;
    pointer-events: none;
}
@keyframes tsd-shimmer {
    from { background-position: 240% 0, 0 0, 0 0; }
    to   { background-position: -100% 0, 0 0, 0 0; }
}

/* Pin + concentric pulse rings — the visual focal point */
.tsd-map-modal__loader-pin-wrap {
    position: relative;
    width: 56px;
    height: 56px;
    z-index: 2;
}
.tsd-map-modal__loader-pulse {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid #c9a45a;
    opacity: 0;
    animation: tsd-loader-pulse 1.8s cubic-bezier(0.22, 1, 0.36, 1) infinite;
    pointer-events: none;
}
.tsd-map-modal__loader-pulse--delayed { animation-delay: 0.9s; }
@keyframes tsd-loader-pulse {
    0%   { transform: scale(0.45); opacity: 0.85; }
    70%  { transform: scale(1.45); opacity: 0;    }
    100% { transform: scale(1.45); opacity: 0;    }
}
.tsd-map-modal__loader-pin {
    position: absolute;
    inset: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #b88e3f 0%, #9b6b28 60%, #7d5520 100%);
    color: #ffffff;
    border-radius: 50%;
    box-shadow: 0 10px 24px rgba(155, 107, 40, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.20);
    animation: tsd-loader-bob 2.4s ease-in-out infinite;
}
@keyframes tsd-loader-bob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-4px); }
}

/* Loading caption */
.tsd-map-modal__loader-text {
    position: relative;
    z-index: 2;
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.20em;
    text-transform: uppercase;
    color: #9b6b28;
    background: rgba(255, 255, 255, 0.88);
    padding: 6px 14px;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

/* Reduced motion — kill animations, keep static visual */
@media (prefers-reduced-motion: reduce) {
    .tsd-map-modal__loader-skeleton,
    .tsd-map-modal__loader-pulse,
    .tsd-map-modal__loader-pin {
        animation: none !important;
    }
    .tsd-map-modal__loader { transition: opacity 0.18s ease; }
}

/* ============================================================================
 *  POST-CONFIRM TARGET PULSE — added 2026-04-29
 *
 *  After clicking "Confirm Address" the page scrolls to the apartment
 *  field. This subtle gold pulse on the target row gives the customer's
 *  eye a clear destination so they know exactly where to type next.
 * ============================================================================ */
.tsd-target-pulse {
    animation: tsd-target-pulse 1.6s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 12px;
}
@keyframes tsd-target-pulse {
    0%   { box-shadow: 0 0 0 0    rgba(155, 107, 40, 0.0);  background-color: transparent; }
    20%  { box-shadow: 0 0 0 8px  rgba(155, 107, 40, 0.18); background-color: rgba(255, 250, 240, 0.85); }
    100% { box-shadow: 0 0 0 0    rgba(155, 107, 40, 0.0);  background-color: transparent; }
}
@media (prefers-reduced-motion: reduce) {
    .tsd-target-pulse { animation: none !important; }
}

.tsd-map-modal__hint {
    position: absolute;
    left: 14px;
    bottom: 14px;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(26, 26, 26, 0.85);
    color: #ffffff;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    pointer-events: none;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}
.tsd-map-modal__hint svg { color: #c9a45a; }

.tsd-map-modal__fallback {
    margin: 0 clamp(20px, 2.4vw, 28px);
    padding: 14px;
    background: #fff8e6;
    border: 1px solid #f0d9a8;
    border-radius: 12px;
    font-size: 12.5px;
    color: #7d5520;
    line-height: 1.45;
}

.tsd-map-modal__status {
    margin: 8px clamp(20px, 2.4vw, 28px) 0;
    min-height: 0;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.45;
    border-radius: 10px;
    display: none;
}
.tsd-map-modal__status.is-busy,
.tsd-map-modal__status.is-error {
    display: block;
    padding: 9px 12px;
}
.tsd-map-modal__status.is-busy {
    background: rgba(155, 107, 40, 0.06);
    color: #9b6b28;
    border: 1px solid rgba(155, 107, 40, 0.16);
}
.tsd-map-modal__status.is-error {
    background: #fff1f0;
    color: #9b1c1c;
    border: 1px solid #fecaca;
}

.tsd-map-modal__actions {
    display: flex;
    gap: 10px;
    padding: clamp(16px, 2vw, 20px) clamp(20px, 2.4vw, 28px) clamp(20px, 2.4vw, 26px);
    border-top: 1px solid #f1ece2;
    margin-top: 18px;
}
.tsd-map-modal__btn {
    flex: 1 1 auto;
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    border-radius: 999px;
    padding: 14px 22px;
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    cursor: pointer;
    line-height: 1;
    min-height: 48px;
    transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.24s ease, background 0.24s ease, color 0.24s ease;
    -webkit-tap-highlight-color: transparent;
}
.tsd-map-modal__btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; }

.tsd-map-modal__btn--primary {
    background: linear-gradient(135deg, #0f172a 0%, #1f2937 100%);
    color: #ffffff;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    flex: 2 1 auto;
}
.tsd-map-modal__btn--primary::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(135deg, #b88e3f 0%, #9b6b28 60%, #7d5520 100%);
    transform: translateX(-101%);
    transition: transform 0.42s cubic-bezier(0.65, 0, 0.35, 1);
}
.tsd-map-modal__btn--primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(155, 107, 40, 0.30);
}
.tsd-map-modal__btn--primary:hover:not(:disabled)::before { transform: translateX(0); }
.tsd-map-modal__btn--primary:focus-visible { outline: 2px solid #9b6b28; outline-offset: 3px; }

.tsd-map-modal__btn--ghost {
    background: transparent;
    color: #64748b;
    border: 1px solid #e7e2d6;
}
.tsd-map-modal__btn--ghost:hover:not(:disabled) {
    color: #1a1a1a;
    background: #fbf6ec;
    border-color: rgba(155, 107, 40, 0.30);
}

@media (max-width: 480px) {
    .tsd-map-modal__card    { border-radius: 18px; }
    .tsd-map-modal__title   { font-size: 17px; }
    .tsd-map-modal__address { font-size: 12.5px; }
    .tsd-map-modal__map     { height: clamp(200px, 38vh, 280px); }
    .tsd-map-modal__btn     { font-size: 11px; padding: 12px 18px; }
}

@media (prefers-reduced-motion: reduce) {
    .tsd-map-modal,
    .tsd-map-modal.is-open,
    .tsd-map-modal__card,
    .tsd-map-modal__btn,
    .tsd-map-modal__btn--primary::before {
        transition: none !important;
        transform: none !important;
    }
}

/* =============================================================================
 *  EDIT-PIN BUTTON  (added 2026-04-29)
 *  Shown below address_1 after the user confirms a pin location, so they can
 *  re-open the map and refine without re-typing. Premium gold accent on hover,
 *  fluid sizing via clamp().
 * ============================================================================= */
.tsd-edit-pin-btn {
    display: none;
    align-items: center;
    gap: 6px;
    margin: clamp(8px, 1vw, 12px) 0 0 0;
    padding: clamp(7px, 0.9vw, 9px) clamp(11px, 1.4vw, 14px);
    background: rgba(155, 107, 40, 0.06);
    color: #9b6b28;
    border: 1px dashed rgba(155, 107, 40, 0.42);
    border-radius: 999px;
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    font-size: clamp(10.5px, 0.85vw, 11.5px);
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    cursor: pointer;
    line-height: 1;
    transition: background 0.24s ease, border-color 0.24s ease, transform 0.24s ease, box-shadow 0.24s ease;
    -webkit-tap-highlight-color: transparent;
    width: auto;
    align-self: flex-start;
}
.tsd-edit-pin-btn.is-visible { display: inline-flex; }
.tsd-edit-pin-btn:hover {
    background: rgba(155, 107, 40, 0.12);
    border-color: #9b6b28;
    border-style: solid;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(155, 107, 40, 0.14);
}
.tsd-edit-pin-btn:focus-visible {
    outline: 2px solid #9b6b28;
    outline-offset: 2px;
}
.tsd-edit-pin-btn svg { flex-shrink: 0; }

@media (prefers-reduced-motion: reduce) {
    .tsd-edit-pin-btn { transition: none !important; transform: none !important; }
}
