/* Kvasir Kartenintegration V11, Zusatz zu V10. */
/* Kvasir Kartenintegration V10, 2026-10-26. Nur kv-Styles, Liste unveraendert. */
.kv-view-switch{position:fixed;z-index:9000;bottom:max(20px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);display:flex;gap:4px;align-items:center;padding:5px;background:rgba(255,255,255,.97);border:1px solid #d5e2ee;border-radius:999px;box-shadow:0 5px 24px rgba(17,49,81,.20);backdrop-filter:blur(10px)}
  .kv-view-switch button{border:0;border-radius:999px;color:#12395f;background:transparent;min-height:43px;padding:9px 19px;min-width:104px;line-height:1;font-family:inherit;font-size:14px;font-weight:700;line-height:1.2;cursor:pointer;white-space:nowrap}
  .kv-view-switch button[aria-pressed="true"]{background:#003366;color:#fff;box-shadow:0 2px 7px rgba(10,54,96,.22)}
  .kv-view-switch button:focus-visible{outline:3px solid #d6ab43;outline-offset:2px}
  #kv-map-shell[hidden]{display:none!important}
  .kv-map-mode #event-results,.kv-map-mode #loading-zone{display:none!important}
  .kv-map-shell{margin:14px 0 45px}
  .kv-map-count{font-size:13px;color:#536e88;margin:0 0 12px;line-height:1.5}
  .kv-map-frame{display:grid;grid-template-columns:minmax(0,1fr) 326px;border:1px solid #d7e3f0;border-radius:16px;background:#fff;overflow:hidden;box-shadow:0 5px 20px rgba(10,54,96,.05)}
  .kv-map-area{position:relative;min-width:0;height:590px;background:#edf2f3}
  #kv-map{width:100%;height:100%;z-index:0}
  .kv-map-aside{display:flex;flex-direction:column;min-width:0;max-height:590px;border-left:1px solid #d7e3f0}
  .kv-side-head{flex:0 0 auto;border-bottom:1px solid #d7e3f0;padding:17px 16px 13px}
  .kv-side-head strong{display:block;color:#003366;font-size:16px;line-height:1.3}
  .kv-side-head small{display:block;margin-top:5px;color:#6b8096;font-size:12px}
  .kv-side-events{padding:10px 13px;overflow-y:auto;overscroll-behavior:contain;flex:1}
  .kv-empty{color:#627c95;font-size:14px;line-height:1.55;padding:15px 4px}
  .kv-event-mini{background:#fff;border:1px solid #d7e3f0;border-radius:11px;margin:0 0 10px;padding:13px}
  .kv-event-mini h3{color:#003366;font-size:15px;line-height:1.4;margin:7px 0 8px}
  .kv-event-mini p{margin:5px 0;color:#536d86;font-size:12px}
  .kv-event-mini .kv-event-meta{color:#617993;font-size:12px}
  .kv-event-mini .kv-event-time{color:#183b63;font-size:12px;font-weight:700}
  .kv-event-mini .kv-event-price{font-weight:700;color:#003366}
  .kv-event-mini .kv-event-badge{color:#0b5a42;font-weight:750;background:#e0f3eb;padding:2px 6px;border-radius:30px;font-size:11px;margin-left:6px}
  .kv-event-mini .kv-event-link{display:inline-flex;align-items:center;gap:5px;border-radius:8px;text-decoration:none;background:#003366;color:white;padding:7px 12px;font-size:12px;font-weight:700;margin-top:8px}
  .kv-event-mini .kv-event-link-demo{opacity:.55;cursor:not-allowed;background:#70859a}
  .kv-no-event-link{display:block;margin-top:9px;font-size:12px;color:#627c95}
  .kv-map-legend{position:absolute;z-index:450;bottom:15px;left:13px;background:rgba(255,255,255,.95);border:1px solid #d7e3f0;border-radius:10px;box-shadow:0 2px 12px #183c5422;padding:9px 10px;color:#23435f;font-size:11px;pointer-events:none}
  .kv-map-legend-samples{display:flex;align-items:center;gap:7px}
  .kv-legend-dot{width:12px;height:12px;background:#003366;border-radius:50%;display:inline-block}
  .kv-legend-dot.kv-dim{opacity:.4}
  .kv-pin-host,.kv-cluster-host{background:transparent!important;border:none!important}
  .kv-pin-shape{width:36px;height:36px;display:flex;align-items:center;justify-content:center;border:2px solid white;border-radius:50% 50% 50% 0;transform:rotate(-45deg);color:white;background:#003366;box-shadow:-2px 3px 12px rgba(10,54,96,.33)}
  .kv-pin-shape .kv-pin-count{transform:rotate(45deg);font:800 13px/1 system-ui,sans-serif}
  .kv-cluster-shape{display:flex;align-items:center;justify-content:center;width:47px;height:47px;color:#fff;border-radius:50%;border:3px solid white;background:#166ca4;box-shadow:0 2px 13px #00336644;font:800 14px/1 system-ui,sans-serif}
  .kv-map-note{color:#627c95;font-size:12px;line-height:1.5;margin:12px 0}
  .kv-map-note a{text-decoration:underline}
  @media(max-width:850px){.kv-map-frame{grid-template-columns:minmax(0,1fr)}.kv-map-area{height:450px}.kv-map-aside{border-left:0;border-top:1px solid #d7e3f0;max-height:380px;min-height:170px}}
  @media(max-width:600px){.kv-map-area{height:400px}.kv-view-switch{bottom:max(12px,env(safe-area-inset-bottom))}.kv-view-switch button{padding:9px 15px;min-width:90px}.kv-map-legend{bottom:10px;left:8px;font-size:10px}}
  @media(prefers-reduced-motion:reduce){.kv-view-switch{scroll-behavior:auto}}

  /* Integrationstest: Umschalter auf Hoehe des schwebenden Filterbuttons. */
  .kv-map-mode .kv-map-shell{scroll-margin-top:90px}
  .kv-map-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:10px}
  .kv-demo-toggle{font-family:inherit;font-size:12px;font-weight:700;line-height:1.3;background:#f4f7fb;color:#12395f;border:1px solid #c6d8e9;border-radius:9px;cursor:pointer;padding:9px 12px}
  .kv-demo-toggle[aria-pressed="true"]{background:#fff4d8;border-color:#e1ba5a}
  .kv-demo-label{font-size:12px;line-height:1.4;color:#775520}
  .kv-event-badge.kv-is-demo{margin-left:6px;color:#725114;background:#fff0bc}
  /* Touch-Gesten auf der Karte gehoeren Leaflet, nicht dem Seiten-Scroller.
     #kv-map ist bewusst genauer als die spaeter geladene Leaflet-CSS.
     Die Sprechblasenliste bleibt als eigenstaendiger Scroller bedienbar. */
  @media(max-width:850px){
    #kv-map.leaflet-container{touch-action:none!important;-ms-touch-action:none;overscroll-behavior:contain}
  }
  /* Die Popup-Blase ist relativ zum Pin positioniert; ihr Inhalt scrollt intern. */
  .kv-mobile-popup .leaflet-popup-content-wrapper{border-radius:15px;box-shadow:0 4px 24px #00336640;border:1px solid #d3dfeb}
  .kv-mobile-popup .leaflet-popup-content{width:min(294px,calc(100vw - 92px))!important;margin:12px 12px 10px}
  .kv-mobile-popup .leaflet-popup-tip{background:#fff}
  .kv-mobile-popup .leaflet-popup-close-button{z-index:5;font-size:24px!important;width:28px!important;height:28px!important;color:#234a68!important}
  .kv-bubble{max-width:100%;color:#153e60}
  .kv-bubble-heading{display:block;padding-right:30px;font-size:14px;line-height:1.35;color:#003366}
  .kv-bubble-subtitle{font-size:11px;color:#59748d;margin:3px 0 7px}
  /* Der echte Maximalwert wird bei Bedarf anhand der Kartenhöhe gesetzt.
     Auf kleinen Displays bleibt dadurch das X im sichtbaren Kartenbereich. */
  .kv-bubble-scroll{max-height:min(31vh,192px);overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y;padding-right:3px}
  .kv-bubble-scroll .kv-event-mini{padding:9px;margin:0 0 7px;border-radius:8px}
  .kv-bubble-scroll .kv-event-mini h3{font-size:13px;margin:5px 0}
  .kv-bubble-scroll .kv-event-mini p{font-size:11px;margin:4px 0}
  .kv-bubble-scroll .kv-event-mini .kv-event-link{font-size:11px;padding:7px 10px}
  @media(max-width:850px){
    /* Kein Details-Block UNTER der Karte: Infoblase erscheint am Pin. */
    .kv-map-aside{display:none!important}
    .kv-map-frame{grid-template-columns:minmax(0,1fr)}
    .kv-map-area{height:clamp(380px,68svh,530px)}
    .kv-view-switch{bottom:calc(19px + env(safe-area-inset-bottom, 0px))}
    /* Legende mit beiden Beschriftungen auf EINER Zeile. */
    .kv-map-legend{bottom:10px;left:8px;min-width:162px;max-width:none;box-sizing:border-box;font-size:10px}
    .kv-map-legend-samples{flex-wrap:nowrap;gap:7px;white-space:nowrap}
    .kv-map-legend-samples .kv-legend-dot{flex:none}
    .kv-map-shell.kv-popup-open .kv-map-legend{display:none}
    .kv-map-note{padding-bottom:80px}
  }
  @media(max-width:600px){
    /* Filter-Knopf: bottom 18px + safe-area, min-height 45px.
       Umschalter: ca. 41px hoch; mit bottom 20px sitzen beide mittig auf einer Linie. */
    .kv-view-switch{gap:2px;padding:3px;bottom:calc(20px + env(safe-area-inset-bottom, 0px));box-shadow:0 3px 15px #113a5838}
    .kv-view-switch button{font-size:12px;min-width:0;min-height:34px;padding:6px 11px;line-height:1.2}
    .kv-switch-icon{display:none}
    .kv-map-area{height:clamp(390px,66svh,510px)}
    .kv-map-shell{margin-top:10px}
    .kv-map-count{font-size:12px}
  }
  @media(max-width:370px){
    .kv-view-switch button{font-size:11px;min-height:33px;padding:6px 8px}
    .kv-view-switch{gap:1px}
  }

/* Anmeldehinweis im Desktop-Detail und in der mobilen Pin-Blase */
.kv-event-mini .kv-event-registration{display:flex;align-items:center;gap:7px;color:#617993;font-weight:400;font-size:12px;line-height:1.45;margin:5px 0}
.kv-event-registration svg{flex:none;width:17px;height:17px;stroke:currentColor}
/* Rueckkehr zur kompakten zweispaltigen Legende aus V10: Frueher / Spaeter. */
.kv-map-legend-samples{display:flex;align-items:center;gap:10px;white-space:nowrap}
.kv-map-legend-samples .kv-legend-item{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
.kv-map-legend .kv-legend-dot{flex:none}
@media(max-width:850px){.kv-map-legend-samples{display:flex;flex-wrap:nowrap;gap:10px}.kv-map-legend{max-width:calc(100% - 18px)}}

/* Registrierung in der LIVE-Liste: dieselbe Farbe und Schriftstaerke wie Uhrzeit, Ort, Adresse.
   Uebersteuert bewusst auch die aeltere Zusatz-JS-Regel color:#003366. */
.event-facts .event-fact.kv-registration-fact,
.event-facts .event-fact.kv-registration-fact > span,
.event-facts .event-fact.kv-registration-fact > svg {
  color:inherit !important;
  font-weight:400 !important;
}

.kv-map-count[hidden]{display:none!important}

/* V11.2: einheitliche Piktogramme in Karte UND mobiler Pin-Sprechblase. */
.kv-event-mini p.kv-event-fact{
  display:flex;align-items:flex-start;gap:7px;
  color:#617993;font-size:12px;font-weight:400;line-height:1.45;
  margin:5px 0;min-width:0;
}
.kv-event-mini .kv-event-fact-icon{
  display:inline-flex;justify-content:center;align-items:flex-start;
  flex:0 0 18px;width:18px;height:18px;min-width:18px;margin-top:0;
  color:inherit;
}
.kv-event-mini .kv-event-fact-icon svg{display:block;width:18px;height:18px;flex:none;stroke:currentColor}
.kv-event-mini .kv-event-fact-text{min-width:0;flex:1;overflow-wrap:anywhere;font-weight:400;color:inherit}
.kv-bubble-scroll .kv-event-mini p.kv-event-fact{font-size:11px;line-height:1.45}
/* Die alte Regel fuer den bisherigen Registrierungs-Paragraphen wird nicht mehr benoetigt.
   Der Anmeldehinweis teilt jetzt die .kv-event-fact-Gestaltung. */

/* V11.3: Kategorie und max. zwei Themen in der Karten-Detailansicht.
 * Farbe nur nach category_id; kein Eingriff in Pins, Cluster oder Datenfilter.
 * Die Zeile darf horizontal scrollen, bleibt jedoch immer eine Zeile hoch.
 */
.kv-event-mini .kv-event-tags{
  display:flex;align-items:center;gap:4px;white-space:nowrap;
  width:100%;min-width:0;max-width:100%;box-sizing:border-box;
  overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;
  scrollbar-color:#bbcfe0 transparent;
  -webkit-overflow-scrolling:touch;touch-action:pan-x;
  padding:2px 0 2px;margin:3px 0 1px;
}
.kv-event-mini .kv-event-tags:focus-visible{
  outline:2px solid #003366;outline-offset:1px;border-radius:4px;
}
.kv-event-mini .kv-event-tag{
  display:inline-flex;flex:none;align-items:center;justify-content:center;
  box-sizing:border-box;border:0;border-radius:5px;
  padding:3px 6px;font-size:10px;font-weight:700;line-height:1.25;
  letter-spacing:0;text-transform:none;
}
.kv-event-mini .kv-event-tag-category{color:#fff!important}
.kv-event-mini .kv-event-tag-topic{background:#E7F2FC;color:#003366}
/* Ausgleich über bestehende Abstände, statt die Kartenrahmen zu vergrößern. */
.kv-event-mini:has(> .kv-event-tags) h3{margin-top:3px}
.kv-bubble-scroll .kv-event-tags{gap:3px;margin:2px 0 1px;padding:1px 0}
.kv-bubble-scroll .kv-event-tag{font-size:9px;padding:3px 5px}
.kv-bubble-scroll .kv-event-mini:has(> .kv-event-tags) h3{margin-top:2px}
/* Zwei verschachtelte Scrollrichtungen: Chip-Reihe horizontal, Blase vertikal.
 * Die Karte selbst bleibt mit eigenen Gesten steuerbar. */
.kv-bubble-scroll{touch-action:pan-y pan-x}
