/* ============================================================
   APPICS Webversion — Favoriten UI-Modul (isoliert)
   Daten-Quelle: app.js viewLiked() (geupvotete Posts). KEINE Favoriten-
   Figma-Ref → Sandros Design-SPRACHE, Parität zu notif-ui/quests-ui.

   Alles unter `.fx` gescoped, damit das Modul die App-Styles nicht berührt.
   Sandro-Sprache: Panels #1b1d2a, keine Card-Borders, weiße Buttons, Lucide-
   Icons, hell + dunkel (.fx-light). Favoriten sind ein Bild-Grid — die Kachel
   ist das Cover, kein Rahmen/Kasten.
   ============================================================ */
.fx {
  --fx-bg: #12131c;
  --fx-panel: #1b1d2a;
  --fx-ink: #eef0f6;
  --fx-muted: #8e92b2;
  --fx-line: rgba(255, 255, 255, .07);
  --fx-teal: #7fe3d6;          /* Fokus-Ring / Marker (Parität zum notif-ui-Teal) */
  --fx-btn-bg: #ffffff;
  --fx-btn-ink: #14141e;
  --fx-radius: 14px;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--fx-ink);
  background: var(--fx-bg);
  box-sizing: border-box;
  display: block;
}
.fx *, .fx *::before, .fx *::after { box-sizing: border-box; }

.fx.fx-light {
  --fx-bg: #ffffff;
  --fx-panel: #f1f2f7;
  --fx-ink: #1a1c26;
  --fx-muted: #6b6f8e;
  --fx-line: rgba(20, 22, 40, .08);
  --fx-teal: #0b7a72;          /* mint auf Weiß trägt zu wenig Kontrast → AA-Teal */
}

.fx .fx-ic { width: 18px; height: 18px; display: block; }

/* ---------- Kopf: Zurück-Pfeil + Titel ---------- */
.fx-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px 10px;
}
.fx .fx-back {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; flex: 0 0 auto;
  background: transparent; color: var(--fx-ink);
  border: 0; border-radius: 999px; cursor: pointer;
  transition: background .12s ease;
}
.fx .fx-back:hover { background: var(--fx-line); }
.fx .fx-back .fx-ic { width: 22px; height: 22px; }
.fx .fx-back:focus-visible {
  outline: 2px solid var(--fx-teal); outline-offset: 2px;
}
.fx .fx-title { margin: 0; font: 700 20px/1.2 'Inter', system-ui, sans-serif; }

/* ---------- Grid ---------- */
.fx-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 4px 16px 24px;
}
@media (min-width: 720px) {
  .fx-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}
@media (min-width: 1080px) {
  .fx-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Kachel ---------- */
.fx .fx-card {
  display: block; text-decoration: none; color: inherit;
  border-radius: var(--fx-radius);
  overflow: hidden;
  background: var(--fx-panel);
  cursor: pointer;                    /* <div> hat keinen Anchor-Default-Cursor */
  transition: transform .12s ease;
}
.fx .fx-card:hover { transform: translateY(-2px); }
.fx .fx-card:active { transform: translateY(0); }
.fx .fx-card:focus-visible {
  outline: 2px solid var(--fx-teal); outline-offset: 2px;
}

.fx-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--fx-panel);
}
.fx-cover {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
/* Ruhiger „favorisiert"-Marker unten rechts über dem Cover — kein lauter Kasten. */
.fx-fav {
  position: absolute; right: 8px; bottom: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 999px;
  background: rgba(18, 19, 28, .55);
  color: #ff5b7f;                     /* gefülltes Herz-Rot, favorisiert-Signal */
  backdrop-filter: blur(6px);
}
.fx-fav .fx-ic { width: 16px; height: 16px; fill: currentColor; stroke: currentColor; }

.fx-cap { padding: 10px 12px 12px; }
.fx-name {
  display: block;
  font: 700 14px/1.3 'Inter', system-ui, sans-serif;
  color: var(--fx-ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fx-ctitle {
  display: block; margin-top: 2px;
  font: 400 13px/1.35 'Inter', system-ui, sans-serif;
  color: var(--fx-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---------- Leerzustand ---------- */
.fx-empty {
  grid-column: 1 / -1;
  padding: 48px 8px; text-align: center;
  color: var(--fx-muted);
  font: 400 14px/1.5 'Inter', system-ui, sans-serif;
}

@media (prefers-reduced-motion: reduce) {
  .fx .fx-card, .fx .fx-back { transition: none; }
}
