/* Podcast Grabber. Type, neutrals and shapes from ../theme.css, with a blue accent of its own. */
:root {
  --bg: var(--wl-bg); --panel: var(--wl-surface); --well: var(--wl-surface-2); --edge: var(--wl-edge);
  --ink: var(--wl-ink); --ink-2: var(--wl-ink-2); --ink-3: var(--wl-ink-3);
  --accent: #0b5f8c; --accent-ink: #ffffff; --accent-soft: #e3f0f8; --mark: #fff6d6;
  --bad: #b3261e; --bad-soft: #fdecea;
  --body: var(--wl-font);
  --mono: var(--wl-mono);
}
:root:not([data-theme="light"]) {
  --accent: #5cbcf2; --accent-ink: #0b1a24; --accent-soft: #15293a; --mark: #2e2a17;
  --bad: #ff8a7a; --bad-soft: #35191a;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

.bar { display: flex; align-items: center; gap: 12px; max-width: 860px; margin: 0 auto; padding: 18px clamp(16px, 4vw, 32px) 0; }
.bar .wl-theme { margin-left: auto; }   /* the shared light/dark button (../theme.js) */
.home { display: grid; place-items: center; width: 38px; height: 38px; border-radius: var(--wl-pill); color: var(--ink-2); background: var(--panel); transition: background-color .15s, color .15s; }
.home:hover { color: var(--ink); background: var(--well); }
.home svg { width: 18px; height: 18px; }
h1 { margin: 0; font: 750 22px/1.1 var(--body); letter-spacing: -.03em; }

.page { max-width: 860px; margin: 0 auto; padding: clamp(24px, 5vw, 44px) clamp(16px, 4vw, 32px) 64px; display: flex; flex-direction: column; gap: 22px; }

.find { padding: clamp(18px, 4vw, 28px); background: var(--panel); border-radius: var(--wl-radius); }
.find label { display: block; margin-bottom: 10px; font: 650 17px/1.3 var(--body); letter-spacing: -.02em; color: var(--ink); }
.row { display: flex; gap: 8px; }
input[type=text], input[type=search] { flex: 1; min-width: 0; padding: 12px 14px; font: inherit; color: var(--ink); background: var(--bg); border: 0; border-radius: var(--wl-radius-sm); box-shadow: inset 0 0 0 1px var(--edge); }
input::placeholder { color: var(--ink-3); }
input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }
.hint { margin: 10px 0 0; font-size: 14px; color: var(--ink-3); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 18px; font: 600 14px/1.2 var(--body); color: var(--ink); background: var(--panel); border: 0; border-radius: var(--wl-pill); cursor: pointer; text-decoration: none; white-space: nowrap; transition: background-color .15s, color .15s, filter .15s; }
.btn:hover { background: var(--well); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.1); background: var(--accent); color: var(--accent-ink); }
.btn svg { width: 16px; height: 16px; }

.status { margin: 0; padding: 14px 18px; background: var(--panel); border-radius: var(--wl-radius-md); color: var(--ink-2); }
.status.error { background: var(--bad-soft); color: var(--bad); }

.results { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.results button { width: 100%; display: flex; align-items: center; gap: 14px; padding: 10px; text-align: left; font: inherit; color: inherit; background: var(--panel); border: 0; border-radius: var(--wl-radius-md); cursor: pointer; transition: background-color .15s, box-shadow .15s; }
.results button:hover { background: var(--well); }
.results img { width: 56px; height: 56px; flex: none; border-radius: 10px; object-fit: cover; background: var(--well); }
.results strong { display: block; font-weight: 600; letter-spacing: -.01em; }
.results span { font-size: 14px; color: var(--ink-3); }

.show { display: flex; flex-direction: column; gap: 18px; }
.show-head { display: flex; gap: 20px; align-items: center; }
.show-head img { width: 120px; height: 120px; flex: none; border-radius: var(--wl-radius-md); object-fit: cover; box-shadow: var(--wl-shadow); }
.show-head h2 { margin: 0; font: 800 clamp(26px, 5vw, 38px)/1.08 var(--body); letter-spacing: -.04em; overflow-wrap: anywhere; }
.author { margin: 6px 0 0; color: var(--ink-2); font-weight: 500; }
.meta { margin: 4px 0 0; font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.tools { display: flex; gap: 8px; flex-wrap: wrap; }
.tools .filter { flex: 1 1 220px; background: var(--panel); box-shadow: none; }
.tools .filter:focus { box-shadow: inset 0 0 0 2px var(--accent); }
.btn:disabled { opacity: .5; cursor: default; }
.bulk-status { margin: -6px 0 0; font-size: 14px; line-height: 1.4; color: var(--ink-2); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.bulk-status:empty { display: none; }

.episodes { list-style: none; margin: 0; padding: 4px 0; border-radius: var(--wl-radius); background: var(--panel); }
.ep { display: flex; gap: 14px; align-items: center; margin: 0 8px; padding: 14px 10px; border-top: 1px solid var(--edge); }
.ep:first-child { border-top: 0; }
.ep.target { background: var(--mark); border-radius: var(--wl-radius-md); border-top-color: transparent; }
.ep.target + .ep { border-top-color: transparent; }
.ep-text { flex: 1; min-width: 0; }
.ep-title { margin: 0; font-weight: 600; letter-spacing: -.01em; overflow-wrap: anywhere; }
.ep-meta { margin: 2px 0 0; font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ep details { margin-top: 4px; font-size: 14px; color: var(--ink-2); }
.ep summary { cursor: pointer; color: var(--accent); font-size: 13px; font-weight: 500; }
.ep details p { margin: 6px 0 0; white-space: pre-line; max-height: 16em; overflow: auto; }
.ep .btn.primary { padding: 9px 16px; }
#more { align-self: center; }

@media (max-width: 520px) {
  .show-head img { width: 84px; height: 84px; }
  .ep { flex-wrap: wrap; }
  .ep .btn { width: 100%; }
}
