:root{

  --cm-accent:#1296ff;
  --cm-text:rgba(255,255,255,0.92);
  --cm-muted:rgba(255,255,255,0.70);
  --cm-border:rgba(18,150,255,0.18);
}

/* Wrapper */
.company-map-wrapper{
  max-width:1440px;
  margin:0 auto;
  background:var(--cm-bg);
  color:var(--cm-text);
  border-radius:2px;
  padding:10px; /* weniger padding */
}

/* Layout */
.company-map-layout{
  display:flex;
  gap:10px; /* weniger gap */
  align-items:flex-start;
}

.company-map-col-map{
  flex: 1 1 76%;          /* größere karte */
  min-width:520px;
}

.company-map-col-list{
  flex: 1 1 24%;
  min-width:320px;
}

.company-map-layout.is-map-right .company-map-col-map{ order:2; }
.company-map-layout.is-map-right .company-map-col-list{ order:1; }

/* Map stage */
.company-map-stage{ position:relative; }

#company-map svg{
  width:100%;
  height:auto;
  display:block;
}

/* Links nur im Widget (nicht global auf a:link usw.) */
.company-map-wrapper a{
  color:var(--cm-accent);
  text-decoration:none;
}
.company-map-wrapper a:hover{
  text-decoration:underline;
}

/* Marker: weiß */
.company-map-marker{
  width:14px;
  height:14px;
  border-radius:50%;
  background:#ffffff;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.16);
  cursor:pointer;
  position:absolute;
  transform: translate(-50%, -50%);
}

/* Active marker glow */
.company-map-marker.is-active{
  box-shadow:
    0 0 0 4px rgba(18,150,255,0.35),
    0 0 18px rgba(18,150,255,0.55);
  animation: cmPulse 1.2s infinite;
}

@keyframes cmPulse{
  0%   { transform: translate(-50%, -50%) scale(1); }
  50%  { transform: translate(-50%, -50%) scale(1.22); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

/* Liste */
.company-map-list{
  display:flex;
  flex-direction:column;
  gap:8px; /* kompakter */
  width:100%;
}

.company-map-item{
  border:1px solid var(--cm-border);
  border-radius:2px;
  background:rgba(255,255,255,0.03);
  overflow:hidden;
  width:100%;
}

/* Accordion Header Button: Theme/Reset aushebeln */
.company-map-item-header{
  -webkit-appearance:none;
  appearance:none;

  background:transparent !important;
  color:inherit !important;

  border:0 !important;
  border-radius:0;
  box-shadow:none !important;

  margin:0;
  width:100%;

  display:flex;
  align-items:center;
  justify-content:space-between;

  padding:10px 10px;  /* weniger padding */
  cursor:pointer;

  font:inherit;
  line-height:inherit;
  text-align:left;
}

/* Titel */
.company-map-item-title{
  font-size:14px;
  font-weight:600;
  color:var(--cm-text);
  padding-right:10px; /* damit Text nicht in Toggle läuft */
}

/* Toggle + Abstand zum Rand */
.company-map-item-toggle{
  color:var(--cm-accent) !important;
  font-size:18px;
  line-height:1;
  margin-right:4px;   /* nicht am Rand kleben */
  flex:0 0 auto;
  transition:transform .2s ease;
}

/* Body */
.company-map-item-body{
  padding:0 10px 10px 10px; /* kompakter */
  color:var(--cm-muted);
  font-size:13px;
  line-height:1.45;
}

.company-map-actions{
  margin-top:8px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

/* Active item */
.company-map-item.is-active{
  border-color: rgba(18,150,255,0.55);
  background:rgba(18,150,255,0.06);
  box-shadow: 0 0 0 2px rgba(18,150,255,0.14);
}

.company-map-item.is-active .company-map-item-toggle{
  transform:rotate(45deg);
}

/* Fokus (barrierearm, aber clean) */
.company-map-item-header:focus,
.company-map-item-header:focus-visible{
  outline:2px solid rgba(18,150,255,0.55);
  outline-offset:2px;
}

/* Mobile */
@media (max-width: 900px){
  .company-map-wrapper{
    padding:8px;
    border-radius:2px;
  }

  .company-map-layout{
    flex-direction:column;
    gap:10px;
  }

  .company-map-col-map,
  .company-map-col-list{
    width:100% !important;
    max-width:100% !important;
    flex:0 0 100% !important;
    min-width:0 !important;
    display:block !important;
  }

  #company-map-list,
  .company-map-list,
  .company-map-item{
    width:100% !important;
    max-width:100% !important;
  }

  /* Karte auf Mobile nicht zu klein wirken lassen */
  #company-map svg{
    max-height:60vh;
  }

  /* Touch */
  .company-map-item-header{
    padding:12px 10px;
  }

  .company-map-item-title{
    font-size:15px;
  }

  .company-map-marker{
    width:16px;
    height:16px;
    box-shadow: 0 0 0 4px rgba(255,255,255,0.14);
  }
}

.company-map-stage{
  position:relative;
  overflow:hidden;
  border-radius:2px;
  min-height:560px; /* damit die Map “Hero” ist */
}

/* Panel rechts */
.company-map-panel{
  position:absolute;
  top:10px;
  right:10px;
  width:min(380px, 92vw);
  max-height: calc(100% - 20px);
  overflow:auto;

  background: rgba(0,10,27,0.92);
  border:1px solid rgba(18,150,255,0.22);
  border-radius:2px;
  padding:8px;
  backdrop-filter: blur(6px);
}

/* Mobile: Panel wird unter die Karte geschoben */
@media (max-width: 900px){
  .company-map-stage{ min-height: 55vh; }
  .company-map-panel{
    position:static;
    width:100%;
    max-height:none;
    margin-top:10px;
  }
}

.company-map-marker-label{
  position:absolute;
  left:50%;
  top:-10px;
  transform: translate(-50%, -100%);
  background: rgba(0,10,27,0.95);
  border:1px solid rgba(18,150,255,0.25);
  color: rgba(255,255,255,0.92);
  padding:4px 6px;
  border-radius:2px;
  font-size:12px;
  white-space:nowrap;
  display:none;
}

.company-map-marker.is-active .company-map-marker-label{
  display:block;
}

.company-map-layout{
  display:flex;
  gap:10px;
  align-items:flex-start;
}

.company-map-col-map{
  flex: 0 0 60%;
  max-width:60%;
  min-width:0;
}

.company-map-col-list{
  flex: 0 0 40%;
  max-width:40%;
  min-width:0;
}

/* Karte nicht absurd hoch */
#company-map svg{
  width:100%;
  height:auto;
  display:block;
  max-height: 650px;   /* optional: Deckel drauf */
}

@media (max-width: 900px){
  .company-map-layout{ flex-direction:column; }
  .company-map-col-map,
  .company-map-col-list{
    flex: 0 0 100%;
    max-width:100%;
    width:100%;
  }
  #company-map svg{ max-height:60vh; }
}
	
.company-map-selected-city{
  display:none; /* nur wenn was ausgewählt ist */
  color: var(--cm-accent);
  font-weight:600;
  font-size:14px;
  letter-spacing:0.2px;
  border:1px solid rgba(18,150,255,0.25);
  background: rgba(0,10,27,0.75);
  border-radius:2px;
  padding:6px 8px;
  line-height:1.2;
}

/* Layout: Karte links -> Label links neben der Karte (als “Spalte” vor Map) */
.company-map-layout:not(.is-map-right){
  position:relative;
}

.company-map-layout:not(.is-map-right) .company-map-col-map{
  position:relative;
}

/* wir machen das Label zur linken “Seitenleiste” */
.company-map-wrapper{
  position:relative;
}

.company-map-layout:not(.is-map-right) ~ .company-map-selected-city{
  /* Falls du es oberhalb eingefügt hast, greift das nicht – daher unten alternative */
}

/* Alternative die sicher greift: label als erstes Kind im wrapper,
   dann steuern wir über wrapper + layout-Klasse */
.company-map-wrapper .company-map-selected-city{
  margin-bottom:8px;
}

/* “Links neben Karte” erreichen wir am einfachsten über Grid statt Flex:
   Wenn du Flex behalten willst, sag’s – dann mach ich’s als absolute Position.
   -> hier: pragmatisch als absolute Position links am Map-Block */
.company-map-layout:not(.is-map-right) .company-map-selected-city{
  position:absolute;
  left:10px;
  top:10px;
  z-index:5;
}

/* Layout: Karte rechts -> Label rechts oben, hellblau */
.company-map-layout.is-map-right .company-map-selected-city{
  position:absolute;
  right:10px;
  top:10px;
  z-index:5;
}
	
.company-map-layout{
  position:relative; /* nötig für absolute label */
}

