/* Hitbarometer Airplay-Charts – Farben als Variablen, das Theme kann sie überschreiben. */
.hbc {
	--hbc-accent: var(--wp--preset--color--primary, #ff0078);
	--hbc-up: #16a34a;
	--hbc-down: #dc2626;
	--hbc-muted: color-mix(in srgb, currentColor 55%, transparent);
	--hbc-line: color-mix(in srgb, currentColor 12%, transparent);
	--hbc-bg: var(--wp--preset--color--base, #fff);
	--hbc-radius: 10px;
	margin-block: 1.5rem;
}
.hbc-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; }
.hbc-week { margin: 0; color: var(--hbc-muted); font-size: .95rem; }
.hbc-live { display: inline-flex; align-items: center; gap: .45em; padding: .2rem .7rem; border-radius: 999px; background: var(--hbc-accent); color: #fff; font-weight: 700; font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; }
/* Countdown-Rahmen um den Live-Badge: läuft bis zur nächsten Aktualisierung leer (Takt aus den Einstellungen). */
.hbc-live { position: relative; }
.hbc-live__ring { position: absolute; left: -5px; top: -5px; width: calc(100% + 10px); height: calc(100% + 10px); overflow: visible; pointer-events: none; }
.hbc-live__ring rect { fill: none; stroke: var(--hbc-accent); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; }
/* Kopf: Chartwoche links, „Zuletzt aktualisiert“ mittig, Live-Badge ganz rechts */
.hbc-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; column-gap: 1rem; }
.hbc-status { display: contents; }
.hbc-week { grid-column: 1; grid-row: 1; justify-self: start; white-space: nowrap; }
.hbc-updated { white-space: nowrap; }
.hbc-updated { grid-column: 2; grid-row: 1; justify-self: center; text-align: center; }
.hbc-live { grid-column: 3; grid-row: 1; justify-self: end; }
@media (max-width: 560px) {
	.hbc-head { grid-template-columns: 1fr auto; row-gap: .5rem; }
	.hbc-updated { grid-column: 1 / -1; grid-row: 2; justify-self: start; text-align: left; }
	.hbc-week { white-space: normal; }
	.hbc-live { grid-column: 2; }
}
.hbc-updated { font-size: .8rem; color: var(--hbc-muted); font-variant-numeric: tabular-nums; }
.hbc-live__dot { width: .55em; height: .55em; border-radius: 50%; background: #22e06b; animation: hbc-pulse 1.6s ease-out infinite; }
@keyframes hbc-pulse { 0% { box-shadow: 0 0 0 0 rgba(34,224,107,.75); } 70% { box-shadow: 0 0 0 .5em rgba(34,224,107,0); } 100% { box-shadow: 0 0 0 0 rgba(34,224,107,0); } }
/* Infobox über der Liste (Text in den Einstellungen) */
.hbc-info { --hbc-accent: var(--wp--preset--color--primary, #ff0078); display: flex; gap: .7rem; align-items: flex-start; margin: 0 0 1rem; padding: .8rem .9rem; border-left: 3px solid var(--hbc-accent); border-radius: 6px; background: color-mix(in srgb, var(--hbc-accent) 7%, transparent); font-size: .85rem; line-height: 1.45; }
.hbc-info__icon { flex: none; margin-top: .05rem; color: var(--hbc-accent); }
.hbc-info p { margin: 0; }
.hbc-info strong { display: block; margin-bottom: .15rem; }
.hbc-info--side { margin-bottom: var(--wp--preset--spacing--40, 1.25rem); }
/* Eigene Seitenleiste der Charts-Seite */
.hbc-side { --hbc-accent: var(--wp--preset--color--primary, #ff0078); --hbc-up: #16a34a; --hbc-down: #dc2626; --hbc-muted: color-mix(in srgb, currentColor 55%, transparent); }
.hbc-legend { padding: 1rem 1.1rem; border-radius: 10px; background: var(--wp--preset--color--surface, #f6f6f8); font-size: .85rem; line-height: 1.45; }
.hbc-legend__title { margin: 0 0 .6rem; font-size: 1.05rem; text-transform: uppercase; letter-spacing: .02em; }
.hbc-legend ul { list-style: none; margin: 0 0 .7rem; padding: 0; display: grid; gap: .45rem; }
.hbc-legend li { display: grid; grid-template-columns: 2.6rem 1fr; align-items: center; gap: .5rem; }
.hbc-legend li > .hbc-move { justify-self: center; display: inline-flex; align-items: center; justify-content: center; gap: .2em; min-width: 2.2rem; }
.hbc-legend li > .hbc-move--new, .hbc-legend li > .hbc-move--re { min-width: 0; display: inline-block; }
.hbc-legend p { margin: 0; color: var(--hbc-muted); }
/* Vergangene Chartwochen */
.hbc-weeks { margin-top: var(--wp--preset--spacing--40, 1.25rem); font-size: .88rem; }
.hbc-weeks__title { margin: 0 0 .5rem; font-size: 1.05rem; text-transform: uppercase; letter-spacing: .02em; }
.hbc-weeks ul { list-style: none; margin: 0; padding: 0; }
.hbc-weeks li { border-bottom: 1px solid color-mix(in srgb, currentColor 12%, transparent); }
.hbc-weeks a { display: flex; align-items: center; gap: .6rem; padding: .5rem 0; color: inherit; text-decoration: none; }
.hbc-weeks a:hover .hbc-weeks__kw, .hbc-weeks a:focus-visible .hbc-weeks__kw { color: var(--hbc-accent); }
.hbc-weeks__kw { min-width: 3.4rem; font-weight: 800; }
.hbc-weeks__date { color: var(--hbc-muted); font-variant-numeric: tabular-nums; }
.hbc-weeks__live { margin-left: auto; padding: .15rem .5rem; border-radius: 999px; background: var(--hbc-accent); color: #fff; font-size: .7rem; font-weight: 700; text-transform: uppercase; }
.hbc-weeks li.is-active .hbc-weeks__kw { color: var(--hbc-accent); }
/* Laufende Woche: kein Link, Klick zeigt einen kleinen Hinweis */
.hbc-weeks__now { position: relative; }
/* Abgeschlossene Woche: „Endstand“ statt Live-Badge */
.hbc-endbox { grid-column: 3; grid-row: 1; justify-self: end; display: inline-flex; align-items: center; gap: .5rem; }
@media (max-width: 560px) { .hbc-endbox { grid-column: 2; } }
.hbc-pdf { display: inline-flex; align-items: center; gap: .35em; padding: .2rem .75rem; border-radius: 999px; background: var(--hbc-accent); color: #fff !important; font-weight: 700; font-size: .8rem; letter-spacing: .04em; text-decoration: none; }
.hbc-pdf:hover, .hbc-pdf:focus-visible { filter: brightness(1.12); }
.hbc-final { display: inline-flex; align-items: center; padding: .2rem .7rem; border: 1px solid var(--hbc-muted); border-radius: 999px; color: var(--hbc-muted); font-weight: 700; font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; }
.hbc-weeks__btn { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .5rem 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: help; }
.hbc-weeks__btn:focus-visible { outline: 3px solid var(--hbc-accent); outline-offset: 2px; border-radius: 4px; }
.hbc-weeks__tip { position: absolute; z-index: 20; top: calc(100% + 8px); left: 0; right: 0; padding: .7rem .85rem; border-radius: 8px; background: #1d1d22; color: #f2f2f5; font-size: .82rem; line-height: 1.45; box-shadow: 0 8px 24px rgba(0,0,0,.28); }
.hbc-weeks__tip::before { content: ""; position: absolute; top: -6px; left: 1.4rem; width: 12px; height: 12px; background: inherit; transform: rotate(45deg); }
.hbc-weeks__tip[hidden] { display: none; }
.hbc-weeks__tip a { color: #ff5aa8; font-weight: 700; }
.hbc-demo { margin: 0 0 .75rem; padding: .5rem .75rem; border-radius: 8px; background: #fef3c7; color: #78350f; font-size: .85rem; }

.hbc-list { list-style: none; margin: 0; padding: 0; }
/* Filter nach Label */
.hbc-filter { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1rem; margin: 0 0 .75rem; font-size: .85rem; }
.hbc-filter__label[hidden] { display: none; }
/* Ansicht-Umschalter rechts in der Filterzeile */
.hbc-popout-btn { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 36px; height: 36px; padding: 0; border: 1px solid var(--hbc-line); border-radius: 50%; background: transparent; color: inherit; font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; }
.hbc-popout-btn:hover, .hbc-popout-btn:focus-visible { border-color: var(--hbc-accent); color: var(--hbc-accent); }
.hbc-view { margin-left: auto; display: inline-flex; padding: 3px; border: 1px solid var(--hbc-line); border-radius: 999px; }
.hbc-view__btn { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .75rem; border: 0; border-radius: 999px; background: transparent; color: inherit; font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; }
.hbc-view__btn[aria-pressed="true"] { background: var(--hbc-accent); color: #fff; }
.hbc-view__btn:focus-visible { outline: 3px solid var(--hbc-accent); outline-offset: 2px; }

/* Kompakte Ansicht: eine Zeile pro Platz, ohne Cover und Label, Punkte als „P“ */
.hbc--compact .hbc-item { grid-template-columns: 2.2rem 2.6rem minmax(0, 1fr) auto auto; gap: .6rem; padding: .32rem .5rem; }
.hbc--compact .hbc-sharebtn { width: 28px; height: 28px; }
.hbc--compact .hbc-sharebtn svg { width: 15px; height: 15px; }
.hbc--compact .hbc-cover { display: none; }
.hbc--compact .hbc-rank { font-size: 1.05rem; }
.hbc--compact .hbc-main { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbc--compact .hbc-artist, .hbc--compact .hbc-title { display: inline; }
.hbc--compact .hbc-artist::after { content: " – "; font-weight: 400; }
.hbc--compact .hbc-label { display: inline; margin: 0 0 0 .5em; font-size: .78rem; color: var(--hbc-muted); }
.hbc--compact .hbc-points { display: flex; align-items: baseline; gap: .25em; }
.hbc--compact .hbc-points b { display: inline; font-size: .9rem; }
.hbc--compact .hbc-points small { display: none; }
.hbc--compact .hbc-points b::after { content: " P"; font-weight: 400; color: var(--hbc-muted); }
@media (max-width: 560px) {
	.hbc--compact .hbc-item { grid-template-columns: 1.8rem 2.2rem minmax(0, 1fr) auto auto; gap: .45rem; padding: .32rem .25rem; }
	.hbc--compact .hbc-points { grid-column: auto; grid-row: auto; }
	.hbc--compact .hbc-sharebtn { grid-column: auto; grid-row: auto; }
}
.hbc-filter__label { display: inline-flex; align-items: center; gap: .5rem; flex: 0 1 auto; min-width: 0; font-weight: 700; }
.hbc-filter__select { width: 15rem; min-width: 8rem; max-width: 100%; padding: .4rem 2rem .4rem .7rem; border: 1px solid var(--hbc-line); border-radius: 999px; background-color: var(--hbc-bg); color: inherit; font: inherit; font-weight: 400; cursor: pointer; }
.hbc-filter__select:focus-visible { outline: 3px solid var(--hbc-accent); outline-offset: 2px; }
.hbc-filter__count { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--hbc-muted); }
.hbc-view, .hbc-popout-btn { flex: none; }
/* Ab Tablet: Filter, Zähler, Umschalter und Ausklinken immer in einer Zeile (Zähler kürzt sich notfalls) */
@media (min-width: 561px) { .hbc-filter { flex-wrap: nowrap; column-gap: .75rem; } }
.hbc-item--hidden, .hbc-ad--hidden { display: none !important; }
@media (max-width: 560px) { .hbc-filter__label { flex: 1 1 100%; } .hbc-filter__select { flex: 1; min-width: 0; } }
/* Werbung zwischen den Plätzen: 468 × 60, höchstens 728 × 90, mittig */
.hbc-ad { display: flex; justify-content: center; padding: .9rem 0; border-bottom: 1px solid var(--hbc-line); }
.hbc-ad .hb-ad-slot { width: 100%; max-width: 728px; margin: 0 auto; }
.hbc-ad .hb-ad-slot__box { display: flex; justify-content: center; }
.hbc-ad img { display: block; max-width: min(100%, 728px); max-height: 90px; width: auto; height: auto; margin-inline: auto; }
.hbc-item {
	position: relative; display: grid; grid-template-columns: 2.4rem 2.6rem 56px minmax(0, 1fr) auto auto; align-items: center; gap: .75rem;
	padding: .6rem .5rem; border-bottom: 1px solid var(--hbc-line); border-radius: var(--hbc-radius); background: var(--hbc-bg);
	transition: box-shadow .4s ease;
}
.hbc-item--changed { box-shadow: inset 0 0 0 2px var(--hbc-accent); }
.hbc-item--rising { z-index: 3; box-shadow: 0 10px 28px rgba(0,0,0,.22), inset 0 0 0 2px var(--hbc-accent); }
.hbc-item { will-change: transform; }
.hbc-rank { font-family: var(--wp--preset--font-family--display, inherit); font-weight: 800; font-size: 1.6rem; line-height: 1; text-align: center; }
.hbc-move { font-size: .78rem; font-weight: 700; text-align: center; white-space: nowrap; color: var(--hbc-muted); }
.hbc-move--up { color: var(--hbc-up); }
.hbc-move--down { color: var(--hbc-down); }
/* NEU/RE: Schrift optisch mittig – Zeilenbox auf Versalhöhe gekürzt (text-box), dann gleiche Abstände oben/unten.
   Links .05em mehr Abstand, weil letter-spacing auch hinter dem letzten Buchstaben Platz lässt. */
.hbc-move--new, .hbc-move--re { display: inline-block; text-align: center; justify-self: center; align-self: center; padding: .38em .55em .38em .6em; color: #fff; background: var(--hbc-accent); border-radius: 999px; font-size: .68rem; font-weight: 800; line-height: 1; letter-spacing: .05em; text-box: trim-both cap alphabetic; }

.hbc-cover { display: block; width: 56px; height: 56px; border-radius: 6px; overflow: hidden; background: var(--hbc-line); }
.hbc-cover img { display: block; width: 56px; height: 56px; object-fit: cover; }
.hbc-cover--none { background: linear-gradient(135deg, var(--hbc-line), transparent); }

.hbc-main { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
/* Ganze Zeile öffnet das Fenster zum Titel: unsichtbarer Knopf über der Zeile, Hover hebt die Zeile leicht ab */
.hbc-open { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; border-radius: inherit; background: transparent; cursor: pointer; }
.hbc-open:focus-visible { outline: 3px solid var(--hbc-accent); outline-offset: -3px; }
.hbc-item:hover { background: color-mix(in srgb, var(--hbc-accent) 9%, var(--hbc-bg)); }
/* Teilen-Knopf je Zeile: liegt über der Klickfläche der Zeile */
.hbc-sharebtn { position: relative; z-index: 2; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; margin: 0; padding: 0; border: 1px solid var(--hbc-line); border-radius: 50%; background: var(--hbc-bg); color: var(--hbc-muted); cursor: pointer; transition: color .15s, border-color .15s, background .15s; }
.hbc-sharebtn:hover, .hbc-sharebtn:focus-visible { color: #fff; border-color: var(--hbc-accent); background: var(--hbc-accent); }
.hbc-sharebtn:focus-visible { outline: 3px solid var(--hbc-accent); outline-offset: 2px; }
.hbc-artist { font-weight: 700; }
.hbc-title, .hbc-artist { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbc-label { margin-top: .15rem; font-size: .78rem; color: var(--hbc-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbc-points { text-align: right; line-height: 1.1; }
.hbc-points b { display: block; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.hbc-points small { font-size: .7rem; color: var(--hbc-muted); text-transform: uppercase; letter-spacing: .04em; }
/* Geteilter Platz: Zahl nur beim ersten Titel */
.hbc--ties-grey .hbc-item--tie .hbc-rank { color: var(--hbc-muted); opacity: .6; }
.hbc--ties-arrow .hbc-item--tie .hbc-rank { position: relative; align-self: stretch; min-height: 1.6rem; font-size: 0 !important; } /* Zahl bleibt für Screenreader */
.hbc--ties-arrow .hbc-item--tie .hbc-rank::before { content: ""; position: absolute; inset: 0; margin: auto; width: 1.1rem; height: 1.1rem; background: var(--hbc-muted);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3v9a3 3 0 0 0 3 3h11'/%3E%3Cpath d='M15 10l5 5-5 5'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3v9a3 3 0 0 0 3 3h11'/%3E%3Cpath d='M15 10l5 5-5 5'/%3E%3C/svg%3E") center / contain no-repeat; }
.hbc-info--period { margin: 1rem 0 0; }
.hbc-empty { margin: 1rem 0; padding: 1rem; border: 1px dashed var(--hbc-line); border-radius: 8px; color: var(--hbc-muted); text-align: center; }
.hbc-foot { margin-top: .75rem; font-size: .8rem; color: var(--hbc-muted); }

@media (max-width: 560px) {
	.hbc-item { grid-template-columns: 2rem 2.2rem 56px minmax(0, 1fr); gap: .55rem; padding: .55rem .25rem; }
	.hbc-rank { font-size: 1.35rem; }
	.hbc-points { grid-column: 4; grid-row: 2; text-align: left; display: flex; align-items: baseline; gap: .3em; }
	.hbc-sharebtn { grid-column: 4; grid-row: 2; justify-self: end; width: 32px; height: 32px; }
	.hbc-points b { display: inline; font-size: .9rem; }
}

/* Lightbox */
.hbc-lightbox { box-sizing: border-box; inset: 0; max-width: none; max-height: none; width: 100%; height: 100%; margin: 0; padding: 1rem; border: 0; background: transparent; display: none; place-items: center; }
.hbc-lightbox[open] { display: grid; }
.hbc-lightbox::backdrop { background: rgba(0,0,0,.9); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.hbc-lightbox__inner { position: relative; width: min(92vw, 600px, calc(100dvh - 15rem)); min-width: min(92vw, 300px); color: #fff; text-align: center; }
.hbc-lightbox__img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 10px; background: #111; }
.hbc-lightbox__text { margin-top: .9rem; }
.hbc-lightbox__text p { margin: .2rem 0; }
.hbc-lightbox__label { font-size: .85rem; opacity: .75; }
.hbc-lightbox__link { display: inline-block; margin-top: .5rem; padding: .5rem 1.1rem; border-radius: 999px; background: #a238ff; color: #fff !important; font-weight: 700; text-decoration: none; }
.hbc-lightbox__link--apple { background: #000; border: 1px solid #fff; }
.hbc-lightbox__links { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: .5rem; }
.hbc-lightbox__links .hbc-lightbox__link { margin-top: 0; }
.hbc-lightbox__link--amazon { background: #ff9900; color: #111 !important; }
.hbc-lightbox__note { margin-top: .6rem !important; font-size: .72rem; opacity: .65; }
.hbc-lightbox__img[hidden] { display: none; }
/* Teilen-Grafik */
.hbc-share-btn { border: 1px solid #fff !important; background: transparent; font: inherit; font-weight: 700; cursor: pointer; }
.hbc-share-btn:hover, .hbc-share-btn:focus-visible { background: rgba(255,255,255,.12); }
.hbc-lightbox.is-share .hbc-lightbox__img, .hbc-lightbox.is-share .hbc-lightbox__text { display: none; }
.hbc-share[hidden] { display: none; }
.hbc-share__img { display: block; width: auto; max-width: 100%; max-height: calc(100dvh - 9rem); aspect-ratio: 4 / 5; margin: 0 auto; border-radius: 8px; background: #0d0d0f; }
.hbc-share__img:not([src]) { width: min(100%, 320px); }
.hbc-share__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin: .8rem 0 0; }
.hbc-share__actions button.hbc-lightbox__link { margin-top: 0; border: 0; font: inherit; font-weight: 700; cursor: pointer; }
.hbc-share__go { background: var(--wp--preset--color--primary, #ff0078) !important; }
.hbc-share__save { background: #2a2a31 !important; }
.hbc-share__back { background: transparent !important; border: 1px solid rgba(255,255,255,.5) !important; }
.hbc-share__wait { font-size: .9rem; opacity: .8; }
.hbc-lightbox__img { transition: opacity .2s ease; }
.hbc-lightbox__img.is-loading { opacity: 0; }
.hbc-lightbox__close { position: absolute; top: -2.6rem; right: 0; width: 2.4rem; height: 2.4rem; border: 0; border-radius: 50%; background: rgba(255,255,255,.15); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.hbc-lightbox__close:hover, .hbc-lightbox__close:focus-visible { background: var(--wp--preset--color--primary, #ff0078); }

@media (prefers-reduced-motion: reduce) { .hbc-live__dot { animation: none; } .hbc-item { transition: none; } }
