/* Terugluisteren – Radio Enhunze. Change the colors here to restyle the site. */
:root {
  --bg: #f6f5f2;
  --surface: #ffffff;
  --text: #1d1d1f;
  --muted: #6b6b70;
  --line: #e3e1dc;
  --accent: #c8102e;
  --accent-text: #ffffff;
  --radius: 10px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141416;
    --surface: #1e1e21;
    --text: #ececef;
    --muted: #9a9aa2;
    --line: #2e2e33;
    --accent: #ff4d5e;
    --accent-text: #141416;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
body.has-player { padding-bottom: 96px; }
a { color: var(--accent); }
h1 { margin: 0 0 4px; font-size: 1.8rem; line-height: 1.2; }
h2 { font-size: 1.15rem; margin: 28px 0 12px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

.site-header {
  display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  padding: 12px max(16px, calc((100% - 1100px) / 2));
  background: var(--surface); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 5;
}
.brand { display: flex; gap: 10px; align-items: center; text-decoration: none; color: var(--text); }
.brand small { display: block; color: var(--muted); font-size: .8rem; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-text); font-weight: 700;
}
#search {
  flex: 1 1 220px; max-width: 360px; padding: 9px 12px; font: inherit;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--text);
}

main { max-width: 1100px; margin: 0 auto; padding: 8px 16px 40px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; color: var(--text); display: flex; flex-direction: column;
}
.card:hover { border-color: var(--accent); }
.card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 2px; }
.cover { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.cover-blank {
  display: grid; place-items: center; font-size: 2.4rem; font-weight: 700;
  background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--accent);
}
.cover-lg { width: 200px; border-radius: var(--radius); flex: none; }

.back { display: inline-block; margin: 16px 0 8px; text-decoration: none; }
.program-head { display: flex; gap: 24px; align-items: flex-start; margin-top: 8px; }
.presenter { margin: 0 0 4px; font-weight: 600; }
.prog-desc { white-space: pre-line; }

.episodes { list-style: none; margin: 0; padding: 0; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); }
.episode { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-top: 1px solid var(--line); }
.episode:first-child { border-top: 0; }
.play {
  flex: none; width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--accent); color: var(--accent-text); font-size: 1rem;
}
.ep-body { flex: 1; min-width: 0; }
.ep-date { font-size: .85rem; color: var(--muted); }
.ep-date::first-letter { text-transform: uppercase; }
.player[hidden] { display: none; }
.ep-title { font-weight: 600; overflow-wrap: anywhere; }
.ep-title a { color: inherit; }
.ep-desc { margin: 4px 0; white-space: pre-line; }
.download { flex: none; text-decoration: none; font-size: 1.3rem; color: var(--muted); padding: 6px; }

.player {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
  padding: 10px max(16px, calc((100% - 1100px) / 2));
  background: var(--surface); border-top: 1px solid var(--line);
}
.player-info { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; }
.player-info > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player audio { flex: 2 1 300px; width: 100%; }

@media (max-width: 600px) {
  .program-head { flex-direction: column; }
  .cover-lg { width: 140px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  body.has-player { padding-bottom: 130px; }
}

/* --- beheer --- */
.admin main { max-width: 1100px; }
.admin-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 16px 0; }
.prog-admin {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin-bottom: 16px;
}
.prog-admin h3 { margin: 0 0 4px; }
.prog-admin .folder { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 160px 1fr; gap: 16px; margin-top: 12px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.fields .wide { grid-column: 1 / -1; }
label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--muted); }
label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); }
input[type=text], input[type=url], textarea {
  font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; width: 100%;
}
textarea { min-height: 80px; resize: vertical; }
.btn {
  font: inherit; cursor: pointer; border-radius: 8px; padding: 7px 14px;
  border: 1px solid var(--accent); background: var(--accent); color: var(--accent-text);
}
.btn.secondary { background: transparent; color: var(--accent); }
.status { font-size: .85rem; color: var(--muted); }
details { margin-top: 12px; }
summary { cursor: pointer; font-weight: 600; }
.ep-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: .9rem; }
.ep-table th, .ep-table td { text-align: left; padding: 6px; border-top: 1px solid var(--line); vertical-align: top; }
.ep-table .file { font-family: ui-monospace, Consolas, monospace; font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; }
.badge { font-size: .75rem; padding: 1px 6px; border-radius: 10px; border: 1px solid var(--line); color: var(--muted); }
.badge.warn { border-color: #d98f00; color: #d98f00; }
@media (max-width: 700px) {
  .form-grid, .fields { grid-template-columns: 1fr; }
  .ep-table .hide-sm { display: none; }
}
