/*
 * Damicom – Google Maps-kaartje rechts in de footer, met een venster
 * om in en uit te zoomen. page.php laadt dit bestand op elke openbare pagina.
 *
 * Het kaartje ligt absoluut in .foot-grid en is precies zo hoog als de
 * contactgegevens: de footer wordt er dus niet hoger of lager van.
 */

.foot-grid.has-map { position: relative; }

.foot-map {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(360px, 42%);
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, .12);
  border-radius: var(--radius, 6px);
  background: #e7ebf3;
  box-shadow: 0 4px 14px rgba(18, 32, 64, .12);
  cursor: zoom-in;
}

/*
 * De kaart is 110px hoger dan het kaartje aan boven- én onderkant. Het midden
 * (de speld op Willem Dreeslaan 47) blijft zo precies in het midden, terwijl
 * Googles infoblok linksboven en de knoppen onderin buiten beeld vallen.
 */
.foot-map iframe {
  position: absolute;
  top: -110px;
  left: 0;
  width: 100%;
  height: calc(100% + 220px);
  border: 0;
  pointer-events: none;      /* het kaartje zelf is alleen een knop */
}

.foot-map-label {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-family: var(--font-body, sans-serif);
  font-weight: 600;
  font-size: 12px;
  background: rgba(18, 32, 64, .88);
  color: #fff;
  pointer-events: none;
  transition: background .2s ease;
}
.foot-map:hover .foot-map-label,
.foot-map:focus-visible .foot-map-label { background: var(--brand-red, #ff0000); }

.foot-map:focus-visible {
  outline: 2px solid var(--accent, #d3273e);
  outline-offset: 2px;
}

/* Op smalle schermen geen kaartje (dat zou over de tekst vallen), maar een knop achter het adres. */
.foot-map-link {
  display: none;
  margin-left: 6px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--navy, #122040);
  text-decoration: underline;
  cursor: pointer;
}

@media (max-width: 700px) {
  .foot-map { display: none; }
  .foot-map-link { display: inline; }
}


/* ---------- Venster met grote kaart ---------- */

.map-dialog {
  margin: auto;               /* site.css zet alle marges op 0; zo blijft het venster in het midden */
  width: min(1040px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: #fff;
  color: var(--ink, #20242c);
  box-shadow: 0 30px 80px rgba(8, 20, 42, .35);
}
.map-dialog::backdrop { background: rgba(8, 20, 42, .55); }

.map-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line, #e3e6ec);
}
.map-dialog-head h2 {
  margin: 0;
  font-size: 20px;
}

.map-dialog-close {
  flex: none;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line, #e3e6ec);
  border-radius: 8px;
  background: #fff;
  color: var(--navy, #122040);
  cursor: pointer;
}
.map-dialog-close:hover { border-color: var(--navy, #122040); }

.map-dialog-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
}

.map-dialog-map {
  min-height: 460px;
  background: #e7ebf3;
}
.map-dialog-map iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 460px;
  border: 0;
}

.map-dialog-info {
  padding: 22px 22px 24px;
  background: var(--bg-alt, #f5f6f9);
  font-size: 14.5px;
}
.map-dialog-info h3 {
  margin: 0 0 10px;
  font-size: 15px;
}
.map-dialog-info ul {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}
.map-dialog-info li { margin-bottom: 4px; }
.map-dialog-info li.foot-company {
  font-weight: 700;
  color: var(--navy, #122040);
}
.map-dialog-info a:not(.btn) { color: var(--navy, #122040); }
.map-dialog-actions .btn:not(.secondary) { color: #fff; }
.map-dialog-actions .btn:not(.secondary):hover { color: var(--brand-red, #ff0000); }

.map-dialog-actions {
  display: grid;
  gap: 10px;
}
.map-dialog-actions .btn { text-align: center; }
.map-dialog-actions .btn.secondary {
  border-color: var(--navy, #122040);
  background: #fff;
  color: var(--navy, #122040);
}
.map-dialog-actions .btn.secondary:hover {
  background: var(--navy, #122040);
  color: #fff;
}

.map-dialog-hint {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--grey, #6b7280);
}

@media (max-width: 760px) {
  .map-dialog-body { grid-template-columns: 1fr; }
  .map-dialog-map,
  .map-dialog-map iframe { min-height: 320px; }
}
