/* FlächenDigital v6 Clean – Kartenrahmen und eigene Kartensteuerung
 * Leaflet/onOffice-Innenmarkup liegt in integrations/leaflet.css.
 */
.fp-overview-v54 .fp-oo-native-map{
  margin:0 0 30px;
  padding:0;
  overflow:visible;
  border:1px solid var(--fd-border);
  border-radius:18px;
  background:transparent;
  box-shadow:var(--fd-shadow-soft);
}

.fp-overview-v54 .fp-oo-native-map .oo-estate-map{
  display:block;
  width:100%;
  height:410px;
  min-height:410px;
  margin:0;
  padding:0;
  overflow:hidden;
  border:0;
  border-radius:16px;
  background:transparent;
  box-shadow:none;
}

.fp-overview-v54 .fp-oo-native-map .oo-estate-map > .oo-map,
.fp-overview-v54 .fp-oo-native-map .oo-estate-map .oo-map{
  display:block;
  width:100%;
  height:100%;
  min-height:410px;
  overflow:hidden;
  border:0;
  border-radius:16px;
}

.fp-site .fd-map-toolbar{
  display:flex;
  align-items:center;
  gap:8px;
  margin:12px 12px 0 0;
  padding:0;
  border:0;
  background:transparent;
  box-shadow:none;
}

.fp-site .fd-map-layer-switch{
  display:inline-flex;
  align-items:center;
  padding:3px;
  border:1px solid rgba(31,48,58,.16);
  border-radius:12px;
  background:var(--fd-surface);
  box-shadow:0 7px 22px rgba(15,34,47,.12);
  backdrop-filter:blur(10px) saturate(115%);
  -webkit-backdrop-filter:blur(10px) saturate(115%);
}

.fp-site .fd-map-layer-button,
.fp-site .fd-map-expand-button{
  appearance:none;
  -webkit-appearance:none;
  border:0;
  outline:0;
  font-family:"Montserrat",Arial,sans-serif;
  cursor:pointer;
}

.fp-site .fd-map-layer-button{
  min-height:34px;
  padding:0 12px;
  border-radius:9px;
  background:transparent;
  color:#53625b;
  font-size:11px;
  line-height:1;
  font-weight:700;
  letter-spacing:.025em;
  box-shadow:none;
  transition:background .16s ease,color .16s ease;
}

.fp-site .fd-map-layer-button.is-active{
  background:rgba(51,137,96,.16);
  color:#28684e;
}

.fp-site .fd-map-layer-button:hover,
.fp-site .fd-map-layer-button:focus-visible{
  background:rgba(51,137,96,.10);
  color:#245f49;
}

.fp-site .fd-map-expand-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:42px;
  height:42px;
  padding:0;
  border:1px solid rgba(31,48,58,.16);
  border-radius:12px;
  background:var(--fd-surface);
  color:#34443d;
  font-size:20px;
  line-height:1;
  font-weight:500;
  box-shadow:0 7px 22px rgba(15,34,47,.12);
  backdrop-filter:blur(10px) saturate(115%);
  -webkit-backdrop-filter:blur(10px) saturate(115%);
  transition:background .16s ease,transform .16s ease;
}

.fp-site .fd-map-expand-button:hover,
.fp-site .fd-map-expand-button:focus-visible{
  background:var(--fd-surface);
  transform:translateY(-1px);
}

body.fp-site.fd-map-modal-open{overflow:hidden}

.fd-map-modal{
  position:fixed;
  inset:0;
  z-index:2147482000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:rgba(31,42,40,.58);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
}

.fd-map-modal__panel{
  display:grid;
  grid-template-rows:58px minmax(0,1fr);
  width:min(1640px,calc(100vw - 48px));
  height:calc(100vh - 48px);
  max-height:1120px;
  overflow:hidden;
  border:1px solid var(--fd-border);
  border-radius:22px;
  background:var(--fd-surface);
  box-shadow:0 28px 90px rgba(0,0,0,.36);
}

.fd-map-modal__header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:58px;
  padding:0 14px 0 22px;
  border-bottom:1px solid var(--fd-border);
  background:var(--fd-surface);
}

.fd-map-modal__title{
  color:var(--fd-text);
  font-family:"Montserrat",Arial,sans-serif;
  font-size:15px;
  line-height:1;
  font-weight:700;
  letter-spacing:.02em;
}

.fd-map-modal__close{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:40px;
  height:40px;
  padding:0;
  border:1px solid var(--fd-border);
  border-radius:12px;
  background:var(--fd-surface-soft);
  color:var(--fd-text);
  font-family:Arial,Helvetica,sans-serif;
  font-size:27px;
  line-height:1;
  font-weight:300;
  cursor:pointer;
  box-shadow:none;
}

.fd-map-modal__close:hover,
.fd-map-modal__close:focus-visible{background:var(--fd-accent-soft)}

.fd-map-modal__body{
  position:relative;
  width:100%;
  height:100%;
  min-width:0;
  min-height:0;
  overflow:hidden;
  background:#e9efeb;
}

/* Großansicht ist eine vollständig eigene Leaflet-Fläche.
 * Die normale onOffice-Karte wird nicht verschoben und teilt keine Geometrie
 * mit dem Modal. Dadurch greifen dort keine onOffice-Höhenregeln mehr.
 */
.fd-map-modal__body > .fd-map-fullscreen-canvas{
  position:absolute;
  inset:0;
  width:auto;
  height:auto;
  min-width:0;
  min-height:0;
  margin:0;
  padding:0;
  border:0;
  border-radius:0;
  overflow:hidden;
  background:#e9efeb;
  visibility:hidden;
  pointer-events:none;
}

.fd-map-modal__body > .fd-map-fullscreen-canvas.is-ready{
  visibility:visible;
  pointer-events:auto;
}

@media(max-width:720px){
  .fp-overview-v54 .fp-oo-native-map .oo-estate-map{
    height:320px;
    min-height:320px;
    border-radius:13px;
  }
  .fp-overview-v54 .fp-oo-native-map .oo-estate-map > .oo-map,
  .fp-overview-v54 .fp-oo-native-map .oo-estate-map .oo-map{
    min-height:320px;
    border-radius:13px;
  }
  .fp-site .fd-map-toolbar{gap:6px;margin:9px 9px 0 0}
  .fp-site .fd-map-layer-switch{padding:2px;border-radius:10px}
  .fp-site .fd-map-layer-button{min-height:31px;padding:0 9px;border-radius:8px;font-size:10px}
  .fp-site .fd-map-expand-button{width:37px;height:37px;border-radius:10px;font-size:18px}
  .fd-map-modal{padding:8px}
  .fd-map-modal__panel{
    grid-template-rows:52px minmax(0,1fr);
    width:calc(100vw - 16px);
    height:calc(100vh - 16px);
    border-radius:16px;
  }
  .fd-map-modal__header{min-height:52px;padding:0 8px 0 16px}
  .fd-map-modal__close{width:38px;height:38px;border-radius:10px}
}
