/* ==========================================================================
   Marry Me — reusable shop location / "Get Directions" modal.

   Self-contained. Pair with js/location-modal.js. Designed to attach to the
   existing luxury-footer location block today and to a shared footer later.
   Uses the site's Fraunces / Instrument Sans + champagne-gold + teal palette.
   ========================================================================== */

:root {
  --mm-loc-ink: #2F2924;
  --mm-loc-muted: #7A6E65;
  --mm-loc-line: #D4C8BC;
  --mm-loc-paper: #FFFDF9;
  --mm-loc-teal: #0B6B63;
  --mm-loc-teal-deep: #064F4A;
  --mm-loc-gold: #B8905A;
}

/* The footer location block becomes an obvious, focusable control. */
.mm-loc-trigger {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: inherit;
  cursor: pointer;
}
.mm-loc-trigger:focus-visible {
  outline: 2px solid var(--mm-loc-gold);
  outline-offset: 4px;
  border-radius: 4px;
}
.mm-loc-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 9px 16px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mm-loc-gold);
  background: transparent;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.mm-loc-trigger:hover .mm-loc-cta,
.mm-loc-trigger:focus-visible .mm-loc-cta {
  background: var(--mm-loc-gold);
  color: #fff;
}
.mm-loc-cta svg { width: 15px; height: 15px; flex: none; }

/* ---- Overlay + dialog ---- */
.mm-loc-overlay {
  position: fixed;
  inset: 0;
  /* above the storefront's two floating action buttons (z 99999 / 100001)
     so an open modal covers them, per the shared FAB stacking contract */
  z-index: 100002;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(24, 20, 17, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease;
}
.mm-loc-overlay.is-open { opacity: 1; visibility: visible; }

.mm-loc-dialog {
  width: min(440px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: var(--mm-loc-paper);
  color: var(--mm-loc-ink);
  border: 1px solid var(--mm-loc-line);
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(40, 30, 20, 0.35);
  padding: 26px 24px 22px;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.22s ease;
  font-family: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
.mm-loc-overlay.is-open .mm-loc-dialog { transform: none; }

.mm-loc-eyebrow {
  margin: 0 0 4px;
  color: var(--mm-loc-teal);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.mm-loc-title {
  margin: 0 0 14px;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.15;
  color: var(--mm-loc-ink);
}
.mm-loc-row { margin: 0 0 12px; font-size: 0.92rem; line-height: 1.6; }
.mm-loc-row .mm-loc-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mm-loc-muted);
  margin-bottom: 2px;
}
.mm-loc-row a { color: var(--mm-loc-teal); }

.mm-loc-map {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 4px 0 16px;
  border-radius: 12px;
  border: 1px solid var(--mm-loc-line);
  object-fit: cover;
  background: #EEE8DF;
  display: block;
}

.mm-loc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}
.mm-loc-btn {
  flex: 1 1 auto;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  border: 1px solid var(--mm-loc-line);
  background: transparent;
  color: var(--mm-loc-ink);
  text-decoration: none;
}
.mm-loc-btn svg { width: 16px; height: 16px; flex: none; }
.mm-loc-btn--primary {
  background: var(--mm-loc-teal);
  border-color: var(--mm-loc-teal);
  color: #FFFDF9;
}
.mm-loc-btn--primary:hover,
.mm-loc-btn--primary:focus-visible { background: var(--mm-loc-teal-deep); border-color: var(--mm-loc-teal-deep); }
.mm-loc-btn:focus-visible { outline: 2px solid var(--mm-loc-gold); outline-offset: 2px; }

.mm-loc-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--mm-loc-line);
  background: var(--mm-loc-paper);
  color: var(--mm-loc-ink);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.mm-loc-close:focus-visible { outline: 2px solid var(--mm-loc-gold); outline-offset: 2px; }
.mm-loc-dialog { position: relative; }

.mm-loc-feedback {
  margin: 10px 0 0;
  min-height: 1.2em;
  font-size: 0.8rem;
  color: var(--mm-loc-teal-deep);
  font-weight: 600;
}

body.mm-loc-lock { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .mm-loc-overlay,
  .mm-loc-dialog { transition: none; }
}

@media (max-width: 360px) {
  .mm-loc-dialog { padding: 22px 16px 18px; border-radius: 14px; }
  .mm-loc-actions { flex-direction: column; }
  .mm-loc-btn { width: 100%; }
}
