/* Shared content cards and the provider preview (content-cards.js), used by
   the Kiemelt admin and the Kedvencek page. Pages define the colour tokens:
   --card, --gold, --muted, --error. */
#grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
@media (max-width: 520px) { #grid { grid-template-columns: 1fr; gap: 12px; } }
.card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--card);
  border: 2px solid #667797;
  border-radius: 12px;
  overflow: hidden;
}
.thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #0b1220;
  cursor: pointer;
}
.thumb:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .placeholder {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 40px;
}
.thumb .placeholder { flex-direction: column; gap: 4px; background: linear-gradient(135deg, #1d3063, #0b1220); }
.thumb .placeholder-okru { background: linear-gradient(135deg, #3a2a12, #0b1220); }
.thumb .placeholder-youtube { background: linear-gradient(135deg, #3a1414, #0b1220); }
.thumb .placeholder-label { font-size: 14px; font-weight: 600; letter-spacing: 0.04em; }
.thumb .source {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}
.thumb .source-okru { background: rgba(238, 130, 8, 0.92); color: #18233a; }
.thumb .source-videa { background: rgba(218, 25, 50, 0.92); }
.thumb .source-youtube { background: rgba(0, 0, 0, 0.85); }
.thumb .duration {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}
.card .body { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px 12px; flex: 1; }
.card .title { margin: 0; font-size: 16px; line-height: 1.3; overflow-wrap: anywhere; }
.card .id { color: var(--muted); font-size: 12px; }
.card .note { color: var(--error); font-size: 13px; }
.card .note:empty { display: none; }
.card .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: auto; padding-top: 6px; }
.card .original { color: var(--gold); font-size: 14px; font-weight: 600; }
.card .original:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.preview {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(8, 12, 24, 0.82);
}
.preview-panel {
  width: min(960px, 100%);
  max-height: 100%;
  overflow: auto;
  background: var(--ink);
  border-radius: 14px;
  padding: 14px;
}
.preview-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.preview-head h3 { flex: 1; margin: 0; font-size: 18px; overflow-wrap: anywhere; }
.preview-head .close { flex: none; }
.preview-head { flex-wrap: wrap; }
/* Folder playlist navigation (Előző · 2 / 5 · Következő). */
.preview-nav { display: flex; flex: none; align-items: center; gap: 8px; }
.preview-nav button { min-height: 40px; padding: 6px 12px; font-size: 14px; }
.preview-position { min-width: 4ch; text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; }
/* At least 200 px tall even on narrow phones (YouTube's minimum player viewport). */
.preview-frame { position: relative; aspect-ratio: 16 / 9; min-height: 200px; background: #000; border-radius: 8px; overflow: hidden; }
.preview-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.preview-hint { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
