/* SH-Beratungsstellen: übernommen aus dem Child-Theme (inc/sh-beratungsstellen-grid.php, Stand 23.10.2026). */
/* ------------------------------------------------------------------
   Karte
   Höhe folgt dem Viewport, hat aber einen Boden: unter ~340px ist eine
   Umkreiskarte nicht mehr lesbar, und im Querformat darf sie den
   Bildschirm nicht besetzen.
   ------------------------------------------------------------------ */
/* ------------------------------------------------------------------
   Hero: Überschrift, Intro und die gesamte Bedienung auf Navy.
   Die Suche steht damit VOR der Karte - man liest, was man tun kann,
   bevor man eine Karte sieht, die ohne Suche nur Deutschland zeigt.
   ------------------------------------------------------------------ */
.sh-bsg .sh-bsg-hero{
	background:var(--sh-navy-gradient);color:var(--sh-on-navy);
	padding-block:clamp(2.2rem,5vw,3.4rem);
}
.sh-bsg .sh-bsg-hero__title{
	font-family:var(--sh-font-body);font-weight:800;
	font-size:var(--sh-fs-display);line-height:var(--sh-lh-display);
	letter-spacing:var(--sh-ls-display);color:var(--sh-on-navy);
	margin:0 0 .6rem;text-wrap:balance;max-width:18ch;
}
.sh-bsg .sh-bsg-hero__intro{
	color:var(--sh-on-navy-soft);font-size:clamp(1rem,1.5vw,1.18rem);
	line-height:1.6;max-width:58ch;margin:0 0 1.8rem;
}

/* Bedienelemente auf Navy.
   Das Eingabefeld bleibt weiß gefüllt - dort wird getippt, dort zählt
   Lesbarkeit am meisten. Standort und Sortierung sind Geisterbuttons,
   damit nicht drei weiße Kästen nebeneinander um Aufmerksamkeit ringen. */
.sh-bsg .sh-bsg-hero .sh-bsg-geo{
	background:transparent;border-color:rgba(255,255,255,.5);color:var(--sh-on-navy);
}
@media (hover:hover){
	.sh-bsg .sh-bsg-hero .sh-bsg-geo:hover{background:#fff;border-color:#fff;color:var(--sh-navy);}
}
.sh-bsg .sh-bsg-hero .sh-bsg-geo.is-active{background:#fff;border-color:#fff;color:var(--sh-navy);}

.sh-bsg .sh-bsg-hero .sh-select{
	background-color:transparent;border-color:rgba(255,255,255,.5);color:var(--sh-on-navy);
	background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}
/* Die aufgeklappte Liste rendert das Betriebssystem hell - dort dunkler Text. */
.sh-bsg .sh-bsg-hero .sh-select option{color:var(--sh-ink);background:#fff;}
.sh-bsg .sh-bsg-hero .sh-label{color:var(--sh-on-navy-quiet);}
.sh-bsg .sh-bsg-hero .sh-bsg-count{color:var(--sh-on-navy);}
.sh-bsg .sh-bsg-hero .sh-bsg-status{color:var(--sh-on-navy-soft);margin-bottom:0;}
.sh-bsg .sh-bsg-hero .sh-bsg-status strong{color:var(--sh-on-navy);}
.sh-bsg .sh-bsg-hero .sh-bsg-clear{color:var(--sh-muted);}

/* Der Fokusring des Design-Systems ist navy und wäre hier unsichtbar. */
.sh-bsg .sh-bsg-hero a:focus-visible,
.sh-bsg .sh-bsg-hero button:focus-visible,
.sh-bsg .sh-bsg-hero input:focus-visible,
.sh-bsg .sh-bsg-hero select:focus-visible{outline-color:#fff;}
.sh-bsg .sh-bsg-hero .sh-field:focus{
	border-color:#fff;box-shadow:0 0 0 4px rgba(255,255,255,.24);
}

.sh-bsg .sh-bsg-mapwrap{position:relative;}
.sh-bsg .sh-bsg-map{
	width:100%;margin:0;line-height:0;background:var(--sh-surface-sunken);
	height:clamp(340px,54vh,560px);
}
.sh-bsg .sh-bsg-map--fallback{height:auto;}
@media (orientation:landscape) and (max-height:520px){
	.sh-bsg .sh-bsg-map{height:78vh;}
}
.sh-bsg .sh-bsg-maphint{
	position:absolute;left:50%;bottom:10px;transform:translateX(-50%);
	margin:0;padding:.3rem .8rem;border-radius:var(--sh-r-pill);
	background:rgba(255,255,255,.92);color:var(--sh-muted);
	font-size:.74rem;font-weight:600;pointer-events:none;white-space:nowrap;
	transition:opacity var(--sh-dur) ease;
}
@media (max-width:640px){ .sh-bsg .sh-bsg-maphint{display:none;} }

/* ------------------------------------------------------------------
   Profilkarte über der Karte
   Desktop: schwebt in der Karte. Mobil: sitzt als Blatt am unteren Rand,
   weil dort der Daumen ist und die Karte darüber sichtbar bleibt.
   ------------------------------------------------------------------ */
/* Position setzt JS: die Karte wird am angeklickten Marker verankert,
   statt starr in einer Ecke zu kleben. left/top sind nur der Startwert. */
.sh-bsg .sh-bsg-panel{
	position:absolute;z-index:5;left:16px;top:16px;width:min(330px,calc(100% - 32px));
	background:#fff;border-radius:var(--sh-r-card-strong);
	box-shadow:var(--sh-lift-strong);overflow:hidden;
	font-family:var(--sh-font-body);
}
@media (max-width:640px){
	.sh-bsg .sh-bsg-panel{left:0 !important;right:0;top:auto !important;bottom:0;width:100%;border-radius:var(--sh-r-card-strong) var(--sh-r-card-strong) 0 0;}
}
.sh-bsg .sh-bsg-panel__head{
	position:relative;background:var(--sh-navy-gradient);color:var(--sh-on-navy);
	padding:.9rem 2.4rem .9rem 1.1rem;
}
.sh-bsg .sh-bsg-panel__role{
	display:block;font-family:var(--sh-font-head);font-weight:700;
	font-size:.64rem;letter-spacing:.14em;text-transform:uppercase;
	color:var(--sh-on-navy-quiet);margin-bottom:.25rem;
}
.sh-bsg .sh-bsg-panel__title{font-size:1.02rem;font-weight:800;line-height:1.25;margin:0;padding:0;color:inherit;font-family:inherit;}
.sh-bsg .sh-bsg-panel__title:focus{outline:none;}
.sh-bsg .sh-bsg-panel__title:focus-visible{outline:3px solid var(--sh-on-navy);outline-offset:2px;}
.sh-bsg .sh-bsg-panel__person{font-size:.86rem;margin:.15rem 0 0;color:var(--sh-on-navy-quiet);}
.sh-bsg .sh-bsg-panel__close{
	position:absolute;top:2px;right:2px;width:44px;height:44px;
	display:flex;align-items:center;justify-content:center;
	background:transparent;border:0;color:var(--sh-on-navy);
	font-size:1.3rem;line-height:1;cursor:pointer;border-radius:50%;
}
.sh-bsg .sh-bsg-panel__close:hover{background:rgba(255,255,255,.16);}
/* Fokusring folgt dem Grund: auf dem Navy-Kopf weiß (navy auf navy war unsichtbar). */
.sh-bsg .sh-bsg-panel__close:focus-visible{outline:3px solid var(--sh-on-navy);outline-offset:-3px;}
.sh-bsg .sh-bsg-panel__body{padding:.9rem 1.1rem 1rem;}
.sh-bsg .sh-bsg-panel__row{
	display:flex;gap:.5rem;align-items:flex-start;
	font-size:.88rem;line-height:1.45;color:var(--sh-body);margin:0 0 .5rem;
}
.sh-bsg .sh-bsg-panel__row svg{width:16px;height:16px;flex:0 0 16px;margin-top:.15rem;color:var(--sh-navy);}
.sh-bsg .sh-bsg-panel__dist{font-weight:700;color:var(--sh-navy);}
.sh-bsg .sh-bsg-panel__hours{margin:.1rem 0 0;padding:0;list-style:none;}
.sh-bsg .sh-bsg-panel__hours li{
	display:flex;justify-content:space-between;gap:1rem;
	font-size:.84rem;color:var(--sh-body);line-height:1.7;
}
.sh-bsg .sh-bsg-panel__hours li > span:first-child{color:var(--sh-muted);min-width:2.2em;}
.sh-bsg .sh-bsg-panel__hours li.is-heute{font-weight:700;color:var(--sh-ink);}
.sh-bsg .sh-bsg-panel__hours li.is-heute > span:first-child{color:var(--sh-navy);}
.sh-bsg .sh-bsg-panel__hours .is-zu{color:var(--sh-muted);}

/* Geöffnet-Status. Ein gefüllter Punkt gegen einen offenen trägt dieselbe
   Information wie Grün gegen Rot — ohne eine zweite Buntfarbe einzuführen,
   die es in diesem System nicht gibt (DESIGN.md, Die Mono-Navy-Regel). */
.sh-bsg .sh-bsg-oz__status{
	display:inline-flex;align-items:center;gap:.4rem;
	font-weight:700;color:var(--sh-navy);
}
.sh-bsg .sh-bsg-oz__status::before{
	content:"";width:8px;height:8px;border-radius:50%;flex:0 0 8px;
	background:var(--sh-navy);
}
.sh-bsg .sh-bsg-oz__status.is-zu{color:var(--sh-muted);}
.sh-bsg .sh-bsg-oz__status.is-zu::before{background:transparent;box-shadow:inset 0 0 0 2px var(--sh-muted);}
.sh-bsg .sh-bsg-oz__heute{display:block;color:var(--sh-body);margin-top:.1rem;}

/* Die ganze Woche nur auf Wunsch — die Profilkarte soll kompakt bleiben. */
.sh-bsg .sh-bsg-oz{margin:0 0 .6rem;}
.sh-bsg .sh-bsg-oz > summary{
	display:inline-flex;align-items:center;gap:.35rem;
	min-height:44px;padding-left:1.6rem;cursor:pointer;
	font-size:.82rem;font-weight:700;color:var(--sh-navy);
	list-style:none;
}
.sh-bsg .sh-bsg-oz > summary::-webkit-details-marker{display:none;}
/* summary fällt nicht unter die Fokusregel des Design-Systems (a, button, input …). */
.sh-bsg .sh-bsg-oz > summary:focus-visible{outline:3px solid var(--sh-navy);outline-offset:3px;border-radius:var(--sh-r-btn);}
.sh-bsg .sh-bsg-oz > summary::after{
	content:"";width:7px;height:7px;
	border-right:2px solid currentColor;border-bottom:2px solid currentColor;
	transform:rotate(45deg) translateY(-2px);
	transition:transform var(--sh-dur-fast) var(--sh-ease);
}
.sh-bsg .sh-bsg-oz[open] > summary::after{transform:rotate(-135deg) translateY(-2px);}
.sh-bsg .sh-bsg-oz .sh-bsg-panel__hours{padding-left:1.6rem;margin-bottom:.2rem;}
.sh-bsg .sh-bsg-oz__note{
	margin:0 0 .6rem;padding-left:1.6rem;
	font-size:.8rem;line-height:1.45;color:var(--sh-muted);
}
.sh-bsg .sh-bsg-panel__actions{display:flex;flex-wrap:wrap;gap:.45rem;margin-top:.8rem;}
.sh-bsg .sh-bsg-act{
	display:inline-flex;align-items:center;justify-content:center;gap:.35rem;
	min-height:44px;padding:0 .85rem;flex:1 1 auto;
	font-size:.84rem;font-weight:700;text-decoration:none;cursor:pointer;
	border-radius:var(--sh-r-btn);border:1px solid var(--sh-line);
	background:#fff;color:var(--sh-navy);
	transition:background-color var(--sh-dur-fast) ease,border-color var(--sh-dur-fast) ease;
}
.sh-bsg .sh-bsg-act svg{width:15px;height:15px;}
.sh-bsg .sh-bsg-act--primary{background:var(--sh-navy);border-color:var(--sh-navy);color:var(--sh-on-navy);}
@media (hover:hover){
	.sh-bsg .sh-bsg-act:hover{background:var(--sh-surface);border-color:var(--sh-navy);}
	.sh-bsg .sh-bsg-act--primary:hover{background:var(--sh-navy-deep);border-color:var(--sh-navy-deep);color:var(--sh-on-navy);}
}

/* ------------------------------------------------------------------
   Toolbar
   ------------------------------------------------------------------ */
.sh-bsg .sh-bsg-inner{padding-block:var(--sh-section-tight);}
.sh-bsg .sh-bsg-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:.7rem 1rem;margin-bottom:.6rem;}
.sh-bsg .sh-bsg-search{position:relative;flex:1 1 300px;display:flex;align-items:center;min-width:0;}
.sh-bsg .sh-bsg-q{padding-right:2.6rem;}
.sh-bsg .sh-bsg-clear{
	position:absolute;right:.2rem;width:44px;height:44px;border:0;background:transparent;
	color:var(--sh-muted);font-size:1.4rem;line-height:1;cursor:pointer;border-radius:50%;
}
.sh-bsg .sh-bsg-clear:hover{background:var(--sh-surface);color:var(--sh-navy);}

.sh-bsg .sh-bsg-geo{
	display:inline-flex;align-items:center;gap:.45rem;
	min-height:48px;padding:0 1rem;flex:0 0 auto;cursor:pointer;
	font-family:var(--sh-font-body);font-size:.9rem;font-weight:700;
	color:var(--sh-navy);background:#fff;
	border:2px solid var(--sh-line);border-radius:var(--sh-r-pill);
	transition:border-color var(--sh-dur-fast) ease,background-color var(--sh-dur-fast) ease;
}
.sh-bsg .sh-bsg-geo svg{width:19px;height:19px;flex:0 0 19px;}
@media (hover:hover){ .sh-bsg .sh-bsg-geo:hover{border-color:var(--sh-navy);background:var(--sh-surface);} }
.sh-bsg .sh-bsg-geo[aria-busy="true"]{opacity:.6;pointer-events:none;}
.sh-bsg .sh-bsg-geo.is-active{border-color:var(--sh-navy);background:var(--sh-navy);color:var(--sh-on-navy);}
/* Unter 900px trägt das Icon allein — das Label kostet dort die Zeile. */
@media (max-width:900px){ .sh-bsg .sh-bsg-geo__txt{display:none;} .sh-bsg .sh-bsg-geo{padding:0;width:48px;justify-content:center;} }

.sh-bsg .sh-bsg-sortwrap{display:flex;align-items:center;gap:.6rem;flex:0 0 auto;}
.sh-bsg .sh-bsg-count{font-size:.92rem;font-weight:700;color:var(--sh-navy);margin-left:auto;}
/* Unter 720px ein festes Raster statt flex-wrap: die Zeilenzahl war sonst
   Zufall - gemessen 3 Zeilen bei 360px, 4 bei 390px. Jetzt immer dieselben
   drei: Suche neben Standort, darunter Sortierung, darunter die Trefferzahl.
   Suche und Standort gehoeren nebeneinander, weil beide dieselbe Frage
   beantworten: wo suche ich? */
@media (max-width:720px){
	.sh-bsg .sh-bsg-toolbar{
		display:grid;grid-template-columns:1fr auto;align-items:center;
		gap:.7rem;margin-bottom:.5rem;
	}
	.sh-bsg .sh-bsg-search{grid-column:1;}
	.sh-bsg .sh-bsg-geo{grid-column:2;}
	.sh-bsg .sh-bsg-sortwrap{grid-column:1 / -1;}
	.sh-bsg .sh-bsg-sort{flex:1 1 auto;}
	.sh-bsg .sh-bsg-count{grid-column:1 / -1;margin-left:0;}
}

/* Kleine Bildschirme haben ein Hoehenbudget. Gemessen ohne diese Regel:
   Hero 61% plus Karte 54% - zusammen mehr als der Bildschirm, die erste
   Kachel lag hinter zwei Bildschirmhoehen. Hero und Karte geben je etwas ab,
   damit die Liste anfaengt zu existieren. */
@media (max-width:640px){
	.sh-bsg .sh-bsg-hero{padding-block:clamp(1.5rem,4.5vw,2.2rem);}
	.sh-bsg .sh-bsg-hero__intro{margin-bottom:1.2rem;font-size:1rem;}
	.sh-bsg .sh-bsg-map{height:clamp(220px,34vh,360px);}
}

.sh-bsg .sh-bsg-status{
	min-height:1.4em;margin:0 0 1.4rem;font-size:.9rem;line-height:1.5;color:var(--sh-muted);
}
.sh-bsg .sh-bsg-status strong{color:var(--sh-navy);}

/* ------------------------------------------------------------------
   Kachel
   ------------------------------------------------------------------ */
.sh-bsg .sh-bsg-card__title{
	font-family:var(--sh-font-body);font-weight:800;font-size:1.22rem;line-height:1.2;
	letter-spacing:-.01em;color:var(--sh-navy);margin:0;
	transition:color var(--sh-dur-fast) ease;
}
@media (hover:hover){ .sh-bsg .sh-bsg-card:hover .sh-bsg-card__title{color:var(--sh-navy-deep);} }
.sh-bsg .sh-bsg-card__person{margin:0;font-size:.9rem;font-weight:600;color:var(--sh-muted);}
.sh-bsg .sh-bsg-card__loc{
	display:flex;align-items:center;gap:.45rem;margin:0;
	font-size:.95rem;font-weight:600;color:var(--sh-ink);
}
.sh-bsg .sh-bsg-card__loc svg{width:17px;height:17px;flex:0 0 auto;color:var(--sh-navy);}
.sh-bsg .sh-bsg-card__pin{color:rgba(255,255,255,.5);}
.sh-bsg .sh-bsg-card__pin svg{width:46px;height:46px;}
/* Kachel mit echtem Profilbild: Foto frei, unten leicht abgedunkelt fuer die Badge-Kante.
   background-color faengt eine ausgefallene Bild-URL ab (sonst weisse Flaeche). */
.sh-bsg .sh-card__media.has-img{background-color:var(--sh-navy);}
.sh-bsg .sh-card__media.has-img::after{background:linear-gradient(180deg,rgba(10,37,64,0) 55%,rgba(10,37,64,.4) 100%);}
.sh-bsg .sh-card__media.has-img .sh-card__go{box-shadow:var(--sh-lift-badge);}
.sh-bsg .sh-bsg-card__langs{display:flex;flex-wrap:wrap;gap:.35rem;padding-top:.2rem;}
/* Oeffnungszeiten auf der Kachel. Serverseitig steht hier der Terminhinweis;
   wo echte Zeiten gepflegt sind, ersetzt JS die Zeile durch den Status. */
.sh-bsg .sh-bsg-card__oz{
	display:flex;align-items:flex-start;gap:.45rem;margin:0;
	font-size:.86rem;line-height:1.4;color:var(--sh-muted);
}
.sh-bsg .sh-bsg-card__oz svg{width:16px;height:16px;flex:0 0 16px;margin-top:.1rem;color:var(--sh-navy);}
.sh-bsg .sh-bsg-card__ozheute{display:block;color:var(--sh-body);font-weight:600;margin-top:.05rem;}
.sh-bsg .sh-bsg-card__oz .sh-bsg-oz__status{font-size:.86rem;}

/* Entfernung schließt die Kachel ab und wird nur bei bekannter Suchadresse gezeigt. */
.sh-bsg .sh-bsg-card__dist{
	margin:auto 0 0;padding-top:.7rem;
	font-size:.86rem;font-weight:700;color:var(--sh-navy);
}
.sh-bsg .sh-bsg-card.is-hit{border-color:var(--sh-navy);}

/* Helle Zwillings-Leiste zwischen Karte und Kacheln. Die Bausteine tragen
   ausserhalb des Heros bereits ihre helle Auspraegung - hier braucht es nur
   die Anordnung. */
.sh-bsg .sh-bsg-bar{
	display:flex;flex-wrap:wrap;align-items:center;gap:.7rem 1rem;
	margin:0 0 1.6rem;
}
.sh-bsg .sh-bsg-bar .sh-bsg-count{margin-left:auto;}
@media (max-width:720px){
	.sh-bsg .sh-bsg-bar{gap:.5rem .8rem;}
	.sh-bsg .sh-bsg-bar .sh-bsg-sortwrap{flex:1 1 auto;}
	.sh-bsg .sh-bsg-bar .sh-bsg-count{margin-left:0;flex:1 0 100%;}
}

.sh-bsg .sh-bsg-empty{
	text-align:center;color:var(--sh-muted);padding:3rem 0;font-size:1.05rem;font-weight:600;
}

/* Cluster-Blase und Suchmarker sind reine Karten-Elemente. */
.sh-bsg-cluster{
	display:flex;align-items:center;justify-content:center;
	width:38px;height:38px;border-radius:50%;
	background:#16395d;color:#fff;border:2px solid #fff;
	font-family:'Open Sans',Helvetica,Arial,sans-serif;font-weight:800;font-size:.8rem;
	box-shadow:0 4px 12px -4px rgba(10,37,64,.5);
}
