/* ==========================================================================
   BBC Status-Ampel 2.6 – Bärner Bärgloufcup
   ========================================================================== */
.bbc-status {
	--bbc-c: #22b14c;                    /* Statusfarbe (kommt aus PHP) */
	--bbc-bg: linear-gradient(180deg, #151c2c 0%, #0f1522 100%);
	--bbc-fg: #f5f7fa;
	--bbc-muted: rgba(245, 247, 250, .78);
	--bbc-line: var(--bbc-c);
	--bbc-btn-bg: rgba(255, 255, 255, .08);
	--bbc-btn-bd: rgba(255, 255, 255, .22);
	--bbc-red: #dc2626;
	position: relative;
	background: var(--bbc-bg);
	color: var(--bbc-fg);
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: .01em;
	text-align: left;
	box-sizing: border-box;
	z-index: 100000;
	-webkit-font-smoothing: antialiased;
}
.bbc-status[hidden] { display: none !important; }
.bbc-status *, .bbc-status *::before, .bbc-status *::after { box-sizing: border-box; }
.bbc-status::before {                  /* feine Akzentlinie */
	content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px;
	background: var(--bbc-line); opacity: .95;
}
.bbc-ico { flex: 0 0 auto; display: block; }

/* ---------- Positionen ---------- */
.bbc-status--top    { position: fixed; left: 0; right: 0; top: var(--wp-admin--admin-bar--height, 0px); box-shadow: 0 6px 24px rgba(15, 21, 34, .18); }
.bbc-status--top::before { top: auto; bottom: 0; }
.bbc-status--below  { position: relative; z-index: 99990; box-shadow: 0 6px 24px rgba(15, 21, 34, .14); }
.bbc-status--bottom { position: fixed; left: 0; right: 0; bottom: 0; padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -6px 24px rgba(15, 21, 34, .18); }
.bbc-status--inline { border-radius: 10px; overflow: hidden; z-index: 1; }
body.bbc-has-top    { padding-top: var(--bbc-top-h, 50px) !important; }
body.bbc-has-bottom { padding-bottom: var(--bbc-bottom-h, 50px) !important; }

/* ---------- Varianten ---------- */
.bbc-status--info {
	--bbc-bg: linear-gradient(100deg, #138c90 0%, #1ca3a8 55%, #23adb2 100%);
	--bbc-fg: #ffffff;
	--bbc-muted: rgba(255, 255, 255, .92);
	--bbc-line: #82c0c7;
	--bbc-btn-bg: rgba(255, 255, 255, .14);
	--bbc-btn-bd: rgba(255, 255, 255, .42);
}
.bbc-status--abgesagt {
	--bbc-bg: linear-gradient(180deg, #4a0f13 0%, #370a0d 100%);
	--bbc-btn-bg: rgba(255, 255, 255, .1);
}

/* ---------- Zeile ---------- */
.bbc-status__row {
	display: flex; align-items: center; gap: 18px;
	min-height: 50px; padding: 2px 18px 0;
	max-width: 1320px; margin: 0 auto;
}

/* ---------- Status-Chip ---------- */
.bbc-chip {
	display: inline-flex; align-items: center; gap: 9px; flex: 0 0 auto;
	height: 30px; padding: 0 14px 0 11px; border-radius: 999px;
	background: color-mix(in srgb, var(--bbc-c) 16%, transparent);
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bbc-c) 42%, transparent);
	color: #fff; font-weight: 600; font-size: 13.5px; white-space: nowrap;
}
.bbc-status--info .bbc-chip { background: rgba(255, 255, 255, .17); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .38); }
.bbc-chip__short { display: none; }

/* Pulsierender Punkt mit Ring */
.bbc-dot {
	position: relative; width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%;
	background: var(--bbc-c);
}
.bbc-dot::after {
	content: ""; position: absolute; inset: -4px; border-radius: 50%;
	border: 2px solid var(--bbc-c); opacity: 0;
	animation: bbc-ring 1.8s cubic-bezier(.2, .6, .4, 1) infinite;
}
.bbc-status--info .bbc-dot { background: #fff; --bbc-c: #fff; }
@keyframes bbc-ring {
	0%   { transform: scale(.6); opacity: .9; }
	100% { transform: scale(1.7); opacity: 0; }
}

/* ---------- Laufband ---------- */
.bbc-ticker {
	flex: 1 1 auto; min-width: 0; overflow: hidden; color: var(--bbc-muted);
	font-weight: 400;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent);
	        mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent);
}
.bbc-ticker--empty { visibility: hidden; }
.bbc-ticker__track {
	display: inline-flex; align-items: center; white-space: nowrap;
	animation: bbc-scroll var(--bbc-dur, 25s) linear infinite;
	will-change: transform;
}
.bbc-ticker__item { display: inline-flex; align-items: center; padding-right: 0; }
.bbc-ticker__lead { display: none; color: #fff; font-weight: 600; }
.bbc-ticker:hover .bbc-ticker__track { animation-play-state: paused; }
@keyframes bbc-scroll { to { transform: translateX(-50%); } }

/* Trennpunkte: kleine runde Punkte in Statusfarbe */
.bbc-sep {
	display: inline-block; width: 5px; height: 5px; margin: 0 16px; border-radius: 50%;
	background: var(--bbc-c); opacity: .75; font-size: 0; line-height: 0; flex: 0 0 auto;
}
.bbc-sep--end { margin: 0 22px; }
.bbc-status--info .bbc-sep { background: #fff; opacity: .6; }

.bbc-status__time { flex: 0 0 auto; font-size: 12px; font-weight: 400; color: var(--bbc-muted); opacity: .7; white-space: nowrap; }

/* ---------- Links im Laufband ---------- */
.bbc-status a.bbc-link {
	display: inline-flex; align-items: center;
	color: #fff !important; text-decoration: none !important;
	padding: 1px 9px; margin: 0 2px; border-radius: 5px;
	box-shadow: inset 0 0 0 1px var(--bbc-btn-bd);
	background: var(--bbc-btn-bg);
	font-weight: 600; white-space: nowrap;
	transition: background .15s ease;
}
.bbc-status a.bbc-link:hover { background: rgba(255, 255, 255, .2); }

/* ---------- Buttons rechts (6 px wie die Buttons auf baergloufcup.ch) ---------- */
.bbc-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.bbc-status a.bbc-btn {
	display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto;
	height: 34px; padding: 0 14px; border-radius: 6px;
	color: #fff !important; text-decoration: none !important;
	font-size: 13.5px; font-weight: 600; white-space: nowrap;
	transition: background .15s ease, box-shadow .15s ease, transform .15s ease;
}
.bbc-status a.bbc-btn:active { transform: translateY(1px); }
.bbc-status a.bbc-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.bbc-status a.bbc-btn--notfall {
	background: var(--bbc-btn-bg);
	box-shadow: inset 0 0 0 1px var(--bbc-btn-bd);
}
.bbc-status a.bbc-btn--notfall:hover { background: rgba(255, 255, 255, .2); }

.bbc-status a.bbc-btn--phone {
	background: linear-gradient(180deg, #e53935 0%, #c62828 100%);
	box-shadow: 0 0 0 0 rgba(229, 57, 53, .55), inset 0 1px 0 rgba(255, 255, 255, .18);
	animation: bbc-sos 2s ease-out infinite;
}
.bbc-status a.bbc-btn--phone:hover { background: linear-gradient(180deg, #d32f2f 0%, #b71c1c 100%); }
.bbc-btn__label { font-weight: 500; opacity: .92; }
.bbc-btn__label::after { content: ""; display: inline-block; width: 1px; height: 14px; background: rgba(255, 255, 255, .45); margin-left: 8px; vertical-align: -2px; }
@keyframes bbc-sos {
	0%   { box-shadow: 0 0 0 0 rgba(229, 57, 53, .55), inset 0 1px 0 rgba(255, 255, 255, .18); }
	70%  { box-shadow: 0 0 0 9px rgba(229, 57, 53, 0), inset 0 1px 0 rgba(255, 255, 255, .18); }
	100% { box-shadow: 0 0 0 0 rgba(229, 57, 53, 0), inset 0 1px 0 rgba(255, 255, 255, .18); }
}

/* ---------- Sanitätsnotruf-Streifen (nur Handy) ---------- */
.bbc-sosbar {
	display: none; align-items: center; gap: 12px;
	padding: 9px 16px; min-height: 46px;
	background: linear-gradient(90deg, #c62828 0%, #e53935 100%);
	color: #fff !important; text-decoration: none !important;
}
.bbc-sosbar__icon {
	display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
	width: 30px; height: 30px; border-radius: 6px; background: rgba(255, 255, 255, .18);
	animation: bbc-sos-soft 2s ease-out infinite;
}
.bbc-sosbar__text { display: flex; flex-direction: column; line-height: 1.15; flex: 1 1 auto; }
.bbc-sosbar__text span { font-size: 11.5px; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; opacity: .9; }
.bbc-sosbar__text strong { font-size: 16px; font-weight: 700; letter-spacing: .02em; }
@keyframes bbc-sos-soft {
	0%   { box-shadow: 0 0 0 0 rgba(255, 255, 255, .45); }
	70%  { box-shadow: 0 0 0 8px rgba(255, 255, 255, 0); }
	100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

/* ---------- Handy ---------- */
@media (max-width: 640px) {
	.bbc-status { font-size: 13.5px; }
	.bbc-status__row { gap: 10px; padding: 2px 12px 0; min-height: 50px; }
	.bbc-chip { height: 28px; padding: 0 11px 0 10px; }
	.bbc-chip__long, .bbc-status__time, .bbc-btn--phone { display: none !important; }
	.bbc-chip__short { display: inline; }
	.bbc-ticker__lead { display: inline; }
	.bbc-status a.bbc-btn { height: 32px; padding: 0 11px; gap: 7px; }
	.bbc-sosbar { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
	.bbc-dot::after, .bbc-btn--phone, .bbc-sosbar__icon { animation: none !important; }
	.bbc-ticker__track { animation: none; display: block; }
	.bbc-ticker__item { display: block; overflow: hidden; text-overflow: ellipsis; }
	.bbc-ticker__item[aria-hidden] { display: none; }
}
