/* "Für dich" (inc/for-you.php, assets/js/for-you.js): home tabs, /fuer-dich/, heart buttons, entry points.
   Uses the tokens of main.css, so dark mode and section colours carry over. */

.fy[hidden], .fy [hidden], .fy-manage [hidden], .fy-dates[hidden], .fy-next[hidden], .tool-fy[hidden], .npanel[hidden] { display: none !important; }
.js .fy-nojs { display: none; }

/* Heart icon: outline, filled when pressed */
.ico-heart { flex: none; }
[aria-pressed="true"] > .ico-heart, .tool-fy[aria-current] .ico-heart, .fy-entry .ico-heart { fill: currentColor; }
.is-bump > .ico-heart { animation: bump .4s cubic-bezier(.2, 1.6, .4, 1); }

/* Heart chips (teaser, popular series, search results) */
.fy-chip { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font: inherit; font-family: var(--f-mono); font-size: 12px; font-weight: 500; line-height: 1.3; }
.fy-chip .ico { width: 15px; height: 15px; color: var(--red-t); }
.fy-chip[aria-pressed="true"] { background: var(--red); color: var(--on-red); }
.fy-chip[aria-pressed="true"] .ico { color: inherit; }

/* ---------- Home: tabs „Neueste“ / „Für dich“ in the news section (front-page.php) ---------- */
/* Which panel shows is decided by html.fy-tab (set before first paint by inc/for-you.php, then by for-you.js), so the
   section never jumps between panels; for-you.js also puts [hidden] on the inactive panel. */
.npanel-fy { display: none; }
.fy-tab .npanel-fy { display: block; }
.fy-tab .npanel-new { display: none; }

.ntabs { display: flex; gap: 4px 30px; align-items: flex-end; margin: -8px 0 28px; border-bottom: 2.5px solid var(--ink); }
.ntab { position: relative; display: inline-flex; align-items: center; gap: 9px; margin: 0; padding: 8px 2px 13px; border: 0; background: none; color: var(--mute); font-weight: 900; font-stretch: 72%; font-size: clamp(24px, 2.5vw, 34px); line-height: 1; letter-spacing: -.005em; text-transform: uppercase; cursor: pointer; transition: color .15s; }
.ntab::after { content: ""; position: absolute; left: -5px; right: -5px; bottom: -2.5px; height: 7px; background: var(--red); transform: scaleX(0) skewX(-14deg); transform-origin: left center; transition: transform .2s cubic-bezier(.2, .8, .2, 1); }
.ntab .ico-heart { width: .78em; height: .78em; color: var(--red-t); }
.ntab:hover { color: var(--ink); }
.ntab:focus-visible { outline-offset: 4px; }
/* Selected tab (follows html.fy-tab, so it is right before the script runs; aria-selected mirrors it) */
html:not(.fy-tab) .ntab[data-tab="new"], html.fy-tab .ntab[data-tab="fy"] { color: var(--ink); }
html:not(.fy-tab) .ntab[data-tab="new"]::after, html.fy-tab .ntab[data-tab="fy"]::after { transform: scaleX(1) skewX(-14deg); }
html.fy-tab .ntab[data-tab="fy"] .ico-heart { fill: currentColor; }
@media (max-width: 640px) { .ntabs { gap: 4px 22px; margin-bottom: 22px; } .ntab { font-size: 26px; } }

/* „Für dich“ panel */
.fy-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-bottom: 30px; }
.fy-bar .chips { margin-bottom: 0; }
.fy-chips .chip { cursor: pointer; font: inherit; font-family: var(--f-mono); font-size: 12px; font-weight: 500; }
.fy-chips .chip[aria-pressed="true"] { background: var(--red); color: var(--on-red); }
.fy-manage-link, .fy-all, .fy-more-shows { font-family: var(--f-mono); font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.fy-manage-link:hover, .fy-all:hover, .fy-more-shows:hover { background: var(--tint); }
.fy-msg { padding: 40px 24px; text-align: center; border: 2.5px dashed var(--ink); font-family: var(--f-mono); font-size: 13.5px; }
.fy-grid[aria-busy="true"] { opacity: .55; transition: opacity .2s; }
.fy-retry { margin-left: 8px; background: var(--ink); color: var(--paper); border: 0; padding: 5px 10px; font: inherit; cursor: pointer; }
.fy-more { margin-top: 48px; }
.fy-more .more-end:empty { display: none; }
/* Home panel: messages are one line above the grid, never a big empty box */
.npanel-fy .fy-msg { margin: 0 0 26px; padding: 10px 14px; text-align: left; border: 0; border-left: 4px solid var(--red); background: var(--paper-2); font-size: 12.5px; line-height: 1.5; }
.npanel-fy .fy-grid:empty { display: none; }

/* Readers who follow nothing yet: one compact row (a line of text, heart chips of popular series) */
.fy-teaser { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px 26px; margin-bottom: 30px; padding: 12px 0 14px; border-bottom: 1.5px dashed var(--mute); }
.fy-tp { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; line-height: 1.35; }
.fy-tp .ico { flex: none; width: 24px; height: 24px; color: var(--red-t); fill: currentColor; }
.fy-tp b { font-weight: 900; font-stretch: 80%; text-transform: uppercase; font-size: 17px; }
.fy-tp small { display: block; font-family: var(--f-mono); font-size: 11px; color: var(--mute); }
.fy-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.fy-pick-row { display: flex; align-items: center; gap: 14px; min-width: 0; }
.fy-pick-row .fy-pick { flex: 0 1 auto; min-width: 0; flex-wrap: nowrap; overflow-x: auto; padding: 4px 2px; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); padding-right: 36px; }
.fy-pick-row .fy-pick::-webkit-scrollbar { display: none; }
.fy-pick-row .fy-chip { flex: none; }
.fy-more-shows { flex: none; white-space: nowrap; }
@media (max-width: 900px) {
  .fy-teaser { grid-template-columns: minmax(0, 1fr); }
  .fy-pick-row { flex-wrap: wrap; }
  .fy-pick-row .fy-pick { flex-basis: 100%; margin-inline: -16px; padding-inline: 16px 36px; }
}

/* Card already in the Merkliste: a small tag on the picture */
.fy .card.is-saved .media[data-fy-saved]:not([data-fy-saved=""])::after { content: attr(data-fy-saved); position: absolute; z-index: 3; right: 12px; top: 14px; background: var(--ink); color: var(--paper); font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; padding: 3px 8px; transform: rotate(4deg); pointer-events: none; }

/* ---------- Series page: "Ohne Push folgen" next to the plugin's "Folgen" ---------- */
.fy-follow-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 16px; }
.fy-heart.go { display: inline-flex; align-items: center; gap: 8px; border-radius: 0; font-size: 17px; padding: 11px 16px; background: var(--paper); color: var(--ink); border-color: var(--ink); box-shadow: 5px 5px 0 var(--hk, var(--ink)); }
.fy-heart.go .ico { width: 20px; height: 20px; margin: 0; color: var(--red); }
.fy-heart.go[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.ph.v-ink .fy-heart.go { box-shadow: 5px 5px 0 var(--red); }
.ph.v-ink .fy-heart.go[aria-pressed="true"] { background: var(--red); color: var(--on-red); border-color: var(--paper); }
.ph.v-ink .fy-heart.go[aria-pressed="true"] .ico { color: inherit; }

/* ---------- Entry points ---------- */
.fy-entry { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; margin: 0 0 18px; padding: 12px 14px; border: 2.5px solid var(--ink); box-shadow: 5px 5px 0 var(--red); background: var(--paper); transition: transform .15s; }
.fy-entry:hover, .fy-entry:focus-visible { transform: rotate(-1deg); background: var(--tint); }
.fy-entry > .ico-heart { width: 26px; height: 26px; color: var(--red-t); }
.fy-entry > .ico:last-child { width: 20px; height: 20px; }
.fy-entry-t { display: grid; gap: 2px; }
.fy-entry-t b { font-weight: 900; font-stretch: 75%; font-size: 22px; line-height: 1; text-transform: uppercase; }
.fy-entry-t small { font-family: var(--f-mono); font-size: 11.5px; color: var(--mute); }
@media (max-width: 560px) { .tool-fy { display: none !important; } }

/* ---------- /fuer-dich/ ---------- */
.fy-hero .cp-in { min-height: 0; gap: 22px; }
.fy-hero .secnav .go { display: inline-flex; align-items: center; gap: 8px; box-shadow: 5px 5px 0 var(--paper); }
.fy-hero .secnav .go .ico { margin: 0; }
.fy-hero .cp-count:empty { display: none; }
.fy-note { max-width: 62ch; font-size: 17px; font-weight: 500; margin-bottom: 22px; }
.fy-all-shows { list-style: none; margin: 0 0 30px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }

.fy-manage { background: var(--paper-2); }
.fy-m-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px 56px; align-items: start; }
@media (max-width: 900px) { .fy-m-grid { grid-template-columns: 1fr; } }
.fy-push-note { margin: 0 0 14px; padding: 10px 14px; border-left: 4px solid var(--red); background: var(--paper); font-family: var(--f-mono); font-size: 12.5px; line-height: 1.5; }
.fy-list { list-style: none; margin: 0; padding: 0; display: grid; border-top: 2.5px solid var(--ink); }
.fy-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1.5px solid var(--ink); }
.fy-row > span.it:hover { border-color: transparent; background: none; }
.fy-list-empty { padding: 26px 20px; border: 2.5px dashed var(--ink); font-family: var(--f-mono); font-size: 13.5px; line-height: 1.55; }

.fy-bell { display: inline-flex; align-items: center; gap: 6px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); color: var(--ink); padding: 5px 11px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; cursor: pointer; transition: background .15s; }
.fy-bell .ico { width: 15px; height: 15px; }
.fy-bell .fy-bell-l, .fy-bell[aria-pressed="true"] .fy-bell-off { display: none; }
.fy-bell[aria-pressed="true"] .fy-bell-l { display: inline; }
.fy-bell[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.fy-bell[aria-pressed="true"] .ico { fill: currentColor; }
.fy-bell:hover { background: var(--tint); color: var(--ink); }
.fy-bell[aria-busy="true"] { opacity: .6; cursor: progress; }
.fy-x { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--red-t); cursor: pointer; transition: background .15s, transform .15s; }
.fy-x .ico { width: 21px; height: 21px; }
.fy-x:hover { background: var(--tint); transform: rotate(-8deg); }
@media (max-width: 480px) { .fy-row .it { grid-template-columns: 48px minmax(0, 1fr); gap: 10px; } .fy-row .it-img { width: 48px; height: 48px; } }

.fy-m-add { display: grid; gap: 12px; align-content: start; }
.fy-q-wrap { display: flex; align-items: center; gap: 10px; border-bottom: 2.5px solid var(--ink); }
.fy-q-wrap .ico { flex: none; width: 22px; height: 22px; color: var(--red-t); }
.fy-q { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); padding: 8px 2px; font: inherit; font-size: 22px; font-weight: 700; outline: none; border-radius: 0; }
.fy-q::placeholder { color: var(--ph-c, #8A8480); font-weight: 500; }
.fy-q-wrap:focus-within { box-shadow: 0 2.5px 0 var(--ink); }
.fy-results { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.fy-results:empty { display: none; }
.fy-results li { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 6px 0; }
.fy-results .it-img { width: 48px; height: 48px; }
.fy-results .fy-r-msg { display: block; font-family: var(--f-mono); font-size: 13px; color: var(--mute); }
.fy-m-add .ls-h { margin-top: 14px; font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
