/* Shared factory-location component. Each edition supplies its own palette. */
.location-section {
  --location-accent: var(--red, var(--wine, #6e5945));
  --location-ink: var(--ink, #292725);
  --location-muted: var(--muted, #716a61);
  --location-line: var(--line, #d6cfc3);
  --location-surface: var(--paper, #fcfaf6);
  --location-pale: var(--pale, #ebe5d9);
  min-width: 0;
  max-width: 100%;
  padding-block: 62px 54px;
  color: var(--location-ink);
  border-top: 1px solid var(--location-line);
  scroll-margin-top: 24px;
}
.location-section *, .location-section *::before, .location-section *::after {
  box-sizing: border-box;
}
.location-section [hidden] { display: none !important; }
.location-heading { min-width: 0; }
.location-heading .eyebrow { margin-bottom: 14px; }
.location-heading h2 {
  margin: 0;
  color: var(--location-ink);
  font-family: var(--sans, Arial, sans-serif);
  font-size: clamp(29px, 2.8vw, 44px);
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -.025em;
  overflow-wrap: break-word;
}
.location-intro {
  max-width: 66ch;
  margin-top: 16px;
  color: var(--location-muted);
  font-size: 15px;
  line-height: 1.9;
  overflow-wrap: break-word;
}
.location-details {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  min-width: 0;
  gap: 19px 34px;
  margin-top: 27px;
  margin-bottom: 21px;
}
.location-address {
  flex: 1 1 280px;
  min-width: 0;
  max-width: 66ch;
  margin: 0;
  color: var(--location-ink);
  font-size: 15px;
  font-style: normal;
  line-height: 1.9;
  overflow-wrap: anywhere;
}
.location-address-label {
  display: block;
  margin-bottom: 5px;
  color: var(--location-muted);
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: .06em;
}
.location-address > strong, .location-address > span { display: block; }
.location-address-original { margin-top: 8px; color: var(--location-muted); font-size: 13px; }
.location-language-note { margin: 0 0 15px; color: var(--location-muted); font-size: 12px; line-height: 1.9; }
.location-copy-status { flex-basis: 100%; grid-column: 1 / -1; color: var(--location-muted); font-size: 12px; line-height: 1.8; }
.location-copy-status:empty { display: none; }
.location-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  min-width: 0;
  max-width: 100%;
  gap: 10px;
}
.location-button, .location-interaction-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  gap: 10px;
  padding: 10px 17px;
  border: 1px solid var(--location-accent);
  border-radius: 0;
  color: var(--location-accent);
  background: var(--location-surface);
  font-family: var(--sans, Arial, sans-serif);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
  touch-action: manipulation;
}
.location-button--primary, .location-button.primary,
.location-interaction-toggle[aria-pressed="true"] {
  color: #fff;
  background: var(--location-accent);
}
.location-button .arrow { flex-shrink: 0; font-size: 21px; line-height: 1; }
.location-button:hover, .location-interaction-toggle:hover {
  color: #fff;
  background: var(--location-accent);
  text-decoration: none;
}
.location-button--primary:hover, .location-button.primary:hover,
.location-interaction-toggle[aria-pressed="true"]:hover {
  color: var(--location-accent);
  background: var(--location-surface);
}
.location-button:focus-visible, .location-interaction-toggle:focus-visible {
  outline: 2px solid var(--location-accent);
  outline-offset: 4px;
}
.location-button:disabled, .location-interaction-toggle:disabled {
  cursor: default;
  opacity: .6;
}
.location-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 12px 24px;
  margin-block: 13px;
  padding: 12px 14px;
  border: 1px solid var(--location-line);
  background: var(--location-surface);
}
.location-status {
  flex: 1 1 230px;
  min-width: 0;
  margin: 0;
  color: var(--location-muted);
  font-size: 13px;
  line-height: 1.85;
  overflow-wrap: break-word;
}
.location-toolbar .location-interaction-toggle { flex: 0 1 auto; }
.location-toolbar { display: none; }
.has-map-controller .location-toolbar { display: flex; }
.location-toolbar--bottom { justify-content: flex-end; border: 0; padding: 0; }
.location-map-shell {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 450px;
  overflow: hidden;
  border: 1px solid var(--location-line);
  background: var(--location-pale);
  scroll-margin-top: 18px;
}
.location-map-shell > iframe {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 100%;
  margin: 0;
  border: 0;
  pointer-events: auto;
}
/* Disable gestures only after the controller has installed working controls. */
.has-map-controller .location-map-shell[data-interactive="false"] > iframe {
  pointer-events: none;
}
.location-map-shell:focus-within {
  outline: 2px solid var(--location-accent);
  outline-offset: 3px;
}
.location-help, .location-copy-feedback {
  max-width: 100%;
  margin-top: 12px;
  color: var(--location-muted);
  font-size: 12px;
  line-height: 1.9;
  overflow-wrap: break-word;
}
.location-help a { text-decoration: underline; text-underline-offset: 3px; }
.location-copy-feedback:empty { display: none; }

/* The sidebar edition keeps its compact red rules and headings. */
.site-layout .location-section { padding-block: 25px 28px; }
.site-layout .location-heading .eyebrow { margin-bottom: 8px; }
.site-layout .location-heading h2 {
  padding-bottom: 7px;
  border-bottom: 1px solid var(--location-accent);
  color: var(--location-accent);
  font-size: 23px;
  line-height: 1.55;
  letter-spacing: 0;
}
.site-layout .location-intro { margin-top: 12px; }
.site-layout .location-details { margin-top: 19px; margin-bottom: 16px; gap: 15px 20px; }
.site-layout .location-button { font-weight: 700; }

@media (max-width: 900px) {
  .location-details { align-items: flex-start; }
  .location-address { flex-basis: 100%; }
  .location-actions { width: 100%; }
  .location-toolbar { align-items: flex-start; }
}
@media (max-width: 700px) {
  .location-section { padding-block: 39px 36px; }
  .location-heading .eyebrow { margin-bottom: 11px; }
  .location-heading h2 { font-size: 29px; line-height: 1.5; }
  .location-intro { margin-top: 13px; font-size: 14px; }
  .location-details { gap: 17px; margin-top: 21px; margin-bottom: 18px; }
  .location-address { font-size: 14px; line-height: 1.9; }
  .location-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .location-button { width: 100%; min-height: 48px; padding: 10px 11px; font-size: 13px; }
  .has-map-controller .location-toolbar { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 12px; }
  .has-map-controller .location-toolbar--bottom { padding: 0; }
  .location-status { font-size: 12px; }
  .location-toolbar .location-interaction-toggle { width: 100%; min-height: 46px; font-size: 13px; }
  .location-map-shell { height: 420px; }
  .location-help, .location-copy-feedback { margin-top: 10px; font-size: 12px; }
  .site-layout .location-section { padding-block: 22px 25px; }
  .site-layout .location-heading h2 { font-size: 22px; }
}
@media print {
  .location-section { padding-block: 20px; break-inside: avoid; }
  .location-map-shell, .location-toolbar, .location-actions, .location-copy-feedback { display: none !important; }
  .location-details { margin-block: 12px; }
}

/* Final location card: linked address and local schematic, no embedded map. */
.location-section--linked .location-details {
  align-items: center;
  padding: 21px 23px;
  border: 1px solid var(--location-line);
  background: var(--location-surface);
}
.location-address-link {
  display: block;
  max-width: 100%;
  margin-top: 3px;
  color: var(--location-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
}
.location-address-link > span { display: block; }
.location-address-link .location-address-original { color: inherit; }
.location-link-hint { margin-top: 8px; font-size: 12px; line-height: 1.8; }
.location-address-link:focus-visible, .location-schematic-link:focus-visible,
.location-view-larger:focus-visible { outline: 2px solid var(--location-accent); outline-offset: 4px; }
.location-section--linked .location-actions { flex: 0 1 220px; }
.location-section--linked .location-language-note { margin-bottom: 18px; }
.location-schematic { min-width: 0; max-width: 100%; margin: 21px 0 0; }
.location-schematic-link { display: block; width: 100%; max-width: 100%; }
.location-schematic img { display: block; width: 100%; height: auto; border: 1px solid var(--location-line); }
.location-schematic figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 20px;
  margin-top: 10px;
  color: var(--location-muted);
  font-size: 12px;
  line-height: 1.9;
}
.location-schematic figcaption strong { display: block; font-weight: 500; }
.location-view-larger { color: var(--location-accent); text-decoration: underline; text-underline-offset: 4px; }
.location-view-larger { flex: 0 0 auto; text-decoration: none; }
.location-dialog {
  width: min(1240px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: 17px;
  border: 1px solid var(--location-line);
  color: var(--location-ink);
  background: var(--location-surface);
}
.location-dialog::backdrop { background: rgb(25 22 19 / .64); }
.location-dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.location-dialog-heading h3 { margin: 0; font-size: 17px; font-weight: 500; line-height: 1.7; }
.location-dialog-close {
  display: inline-flex;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--location-line);
  color: var(--location-ink);
  background: var(--location-surface);
  font-size: 26px;
  cursor: pointer;
}
.location-dialog-close:focus-visible, .location-large-stage:focus-visible { outline: 2px solid var(--location-accent); outline-offset: 2px; }
.location-dialog-hint { margin: 7px 0 12px; color: var(--location-muted); font-size: 13px; line-height: 1.8; }
.location-large-stage {
  width: 100%;
  max-width: 100%;
  height: min(70dvh, 720px);
  min-height: 180px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--location-line);
  background: var(--location-surface);
}
.location-large-stage > img { display: block; width: 1200px; min-width: 100%; max-width: none; height: auto; }
@media (max-width: 900px) {
  .location-section--linked .location-actions { flex-basis: 100%; }
}
@media (max-width: 700px) {
  .location-section--linked .location-details { padding: 17px 15px; }
  .location-section--linked .location-actions { display: flex; }
  .location-section--linked .location-button { width: auto; min-width: 150px; }
  .location-view-larger { display: inline-flex; align-items: center; min-height: 44px; }
  .location-large-stage > img { width: 900px; }
  .location-dialog { padding: 11px; }
  .location-dialog-heading h3 { font-size: 15px; }
  .location-dialog-hint { font-size: 12px; }
}
