@charset "utf-8";
/* Episode list styles (includes/functions/listing.php, chosen in Charlie's Lab)
   and the sticky filter bar (views/_series_filter.php). Loaded on every public
   page after default.css; dark / high-contrast overrides are at the bottom,
   keyed on the <body> class (re-theme-dark, re-theme-highcontrast). */

/* ─── Filter bar ─────────────────────────────────────────────────────────── */
.reFilterLabel { display: block; font-weight: bold; margin-top: 4px; }
.reFilterBar { position: -webkit-sticky; position: sticky; top: 0; z-index: 40; background: #fff; padding: 6px 0 4px; margin: 0 -5px; padding-left: 5px; padding-right: 5px; }
.reFilterBar.isStuck { box-shadow: 0 3px 6px -3px rgba(0, 0, 0, .25); border-bottom: 1px solid #e3e3e3; }
.reFilterRow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.reFilterBox { position: relative; flex: 0 1 560px; min-width: 220px; }
.reFilterBox input { width: 100%; box-sizing: border-box; font-size: 1.25em; padding: .45em 2.4em .45em .7em; border: 2px solid #9ccc9c; border-radius: 8px; color: #222; background: #fff; }
.reFilterBar.isStuck .reFilterBox input { font-size: 1.1em; padding-top: .3em; padding-bottom: .3em; }
.reFilterBox input:focus { outline: none; border-color: #009933; box-shadow: 0 0 0 3px rgba(0, 153, 51, .15); }
.reFilterBox input::-webkit-search-cancel-button { display: none; }
.reFilterClear { position: absolute; right: .35em; top: 50%; transform: translateY(-50%); width: 1.8em; height: 1.8em; border: 0; border-radius: 50%; background: #e6e6e6; color: #444; font-size: 1.1em; line-height: 1; cursor: pointer; padding: 0; }
.reFilterClear:hover, .reFilterClear:focus { background: #009933; color: #fff; }
.reFilterClear[hidden] { display: none; }
.reFilterBar .filterCount { color: #777; font-size: 90%; }

/* ─── Buttons shared by the new styles ───────────────────────────────────── */
/* Play: a green pill. Download: a small square with a download icon (the word
   "Download" is kept for screen readers, and the tooltip gives the file size). */
.reEpBtns { display: flex; gap: 10px; flex-shrink: 0; align-items: center; }
.reEpBtns a { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; height: 2em; white-space: nowrap; text-decoration: none; font-weight: bold; font-size: 90%; line-height: 1; }
.reEpBtns a.reEpPlay, .reEpBtns a.reEpPlay:visited { padding: 0 1em; border-radius: 999px; border: 0; background: #3a7a3a; color: #fff; }
.reEpBtns a.reEpPlay:hover, .reEpBtns a.reEpPlay:focus-visible { background: #1b5e20; color: #fff; }
.reEpBtns a.reEpDl, .reEpBtns a.reEpDl:visited { width: 2em; padding: 0; border-radius: 3px; border: 1px solid #d6d6d6; background: #f6f6f6; color: #666; }
.reEpBtns a.reEpDl:hover, .reEpBtns a.reEpDl:focus-visible { border-color: #3a7a3a; background: #eef8ee; color: #1b5e20; }
.reEpBtns a.reEpDl svg { width: 1.15em; height: 1.15em; }
.reEpDlText { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.reEp .reEpSeries { font-weight: bold; }
.reEp .reEpTitle { font-weight: bold; color: #000; }
.reEp .reEpMeta { color: #666; font-size: 88%; margin-top: 2px; }
.reEp .reEpMeta > span, .reEp .reEpMeta > a { white-space: nowrap; }
.reEp .reEpMeta > .reEpSep { white-space: normal; }   /* the line breaks between details, never inside one */
.reEp .reEpMain, .reEp .reEpTitle { min-width: 0; overflow-wrap: anywhere; }
.reEp .reEpNum { color: #666; font-size: 88%; }

/* ─── Compact ────────────────────────────────────────────────────────────── */
.reEpC { display: flex; align-items: center; gap: 12px; padding: 7px 4px; border-bottom: 1px solid #eaeaea; text-align: left; }
.reEpC:hover { background: #f9f9f9; }
.reEpC .reEpMain { flex: 1 1 auto; min-width: 0; }
.reEpC .reEpSeries { display: block; font-size: 90%; }

/* ─── One line ───────────────────────────────────────────────────────────── */
.reEpL { display: grid; grid-template-columns: 6.6em minmax(0, 1fr) 5.2em auto; gap: 10px; align-items: center; padding: 4px 4px; border-bottom: 1px solid #eee; text-align: left; }
.reEpL:hover { background: #f9f9f9; }
.reEpL .reEpDate { color: #666; font-size: 88%; font-variant-numeric: tabular-nums; }
.reEpL .reEpWhat { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reEpL .reEpLen { color: #666; font-size: 88%; text-align: right; font-variant-numeric: tabular-nums; }
.reEpL .reEpBtns a { height: 1.8em; }
.reEpL .reEpBtns a.reEpDl { width: 1.8em; }
.reEpL .reEpDash { color: #999; }

/* ─── Cards ──────────────────────────────────────────────────────────────── */
.reEps-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin: 10px 0; }
.reEpK { min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; border: 1px solid #e3dccb; border-radius: 10px; padding: 10px 12px; background: #fffdf7; text-align: left; }
.reEpK:hover { border-color: #9ccc9c; }
.reEpK .reEpSeries { display: block; font-size: 90%; }
.reEpK .reEpBtns a.reEpPlay { flex: 1; }

/* ─── Narrow screens ─────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .reEpC { flex-wrap: wrap; }
    .reEpC .reEpBtns { width: 100%; }
    /* Bigger targets on a phone: a wide Play pill and a matching square. */
    .reEpC .reEpBtns a { height: 2.5em; }
    .reEpC .reEpBtns a.reEpPlay { flex: 1; }
    .reEpC .reEpBtns a.reEpDl { width: 2.5em; }
    .reEpL { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; padding: 6px 4px; }
    .reEpL .reEpWhat { grid-column: 1 / -1; grid-row: 1; white-space: normal; }
    .reEpL .reEpDate { grid-row: 2; grid-column: 1; }
    .reEpL .reEpLen { display: none; }
    .reEpL .reEpBtns { grid-row: 2; grid-column: 2; }
}

/* ─── Dark ───────────────────────────────────────────────────────────────── */
.re-theme-dark .reFilterBar { background: #222; }
.re-theme-dark .reFilterBar.isStuck { border-bottom-color: #444; box-shadow: 0 3px 6px -3px rgba(0, 0, 0, .8); }
.re-theme-dark .reFilterBox input { background: #333; color: #eee; border-color: #3c6e3c; }
.re-theme-dark .reFilterClear { background: #555; color: #eee; }
.re-theme-dark .reEp .reEpTitle { color: #ddd; }
.re-theme-dark .reEp .reEpMeta, .re-theme-dark .reEp .reEpNum, .re-theme-dark .reEpL .reEpDate, .re-theme-dark .reEpL .reEpLen { color: #999; }
.re-theme-dark .reEpC, .re-theme-dark .reEpL { border-bottom-color: #444; }
.re-theme-dark .reEpC:hover, .re-theme-dark .reEpL:hover { background: #333; }
.re-theme-dark .reEpK { background: #2a2a2a; border-color: #444; }
.re-theme-dark .reEpBtns a.reEpDl, .re-theme-dark .reEpBtns a.reEpDl:visited { background: #333; color: #bbb; border-color: #555; }
.re-theme-dark .reEpBtns a.reEpDl:hover { background: #333; }

/* ─── High contrast ──────────────────────────────────────────────────────── */
.re-theme-highcontrast .reFilterBox input { border-color: #000; }
.re-theme-highcontrast .reFilterBar.isStuck { border-bottom-color: #000; }
.re-theme-highcontrast .reEp .reEpMeta, .re-theme-highcontrast .reEp .reEpNum, .re-theme-highcontrast .reEpL .reEpDate, .re-theme-highcontrast .reEpL .reEpLen { color: #000; }
.re-theme-highcontrast .reEpC, .re-theme-highcontrast .reEpL { border-bottom-color: #000; }
.re-theme-highcontrast .reEpK { background: #fff; border-color: #000; }
.re-theme-highcontrast .reEpBtns a.reEpDl { border: 2px solid #000; background: #fff; }
.re-theme-highcontrast .reEpBtns a.reEpPlay, .re-theme-highcontrast .reEpBtns a.reEpPlay:visited { background: #000; color: #fff; }
.re-theme-highcontrast .reEpBtns a.reEpDl, .re-theme-highcontrast .reEpBtns a.reEpDl:visited { color: #000; }

/* Running number (Recent Additions) and the admins' Edit button. */
.reEpIdx { display: inline-block; min-width: 1.9em; margin-right: 6px; padding: 0 4px; border-radius: 4px; background: #eef3ee; color: #4a5a4a; font-size: 80%; font-weight: normal; text-align: center; font-variant-numeric: tabular-nums; vertical-align: 1px; }
.reEp .reEpSeriesLine .reEpSeries { display: inline; }
.reEpEdit { font: inherit; font-size: 85%; padding: 2px 10px; border: 1px solid #b08a2e; border-radius: 6px; background: #fff8e6; color: #6b4e00; cursor: pointer; white-space: nowrap; }
.reEpEdit:hover { background: #ffefc2; }
.reEpAdmin { margin-top: 4px; }
.reQuickEdit { border: 2px solid #b08a2e; border-radius: 10px; background: #fffaf0; padding: 10px 12px; margin: 4px 0 10px; text-align: left; }
.reQuickEdit label { display: block; font-size: 90%; color: #555; margin: 6px 0 2px; }
.reQuickEdit input[type=text] { width: 100%; box-sizing: border-box; font-size: 110%; padding: 6px 8px; border: 1px solid #aaa; border-radius: 6px; }
.reQuickEdit .reQeWhole { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0 0; color: #333; font-size: 95%; }
.reQuickEdit .reQeWhole input { width: 18px; height: 18px; margin-top: 2px; flex: 0 0 auto; }
.reQuickEdit .reQeRow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.reQuickEdit button { font: inherit; padding: 6px 16px; border-radius: 6px; cursor: pointer; border: 1px solid #2e7d32; background: #fff; color: #2e7d32; }
.reQuickEdit button.reQeSave { background: #2e7d32; color: #fff; font-weight: bold; }
.reQuickEdit .reQeMsg { color: #8a2b1f; font-weight: bold; }
.reEp.reEpSaved { animation: reEpSaved 2s ease-out; }
@keyframes reEpSaved { from { background: #d8f0d8; } to { background: transparent; } }
.re-theme-dark .reEpIdx { background: #2f3a2f; color: #bcd; }
.re-theme-dark .reQuickEdit { background: #2a2620; border-color: #8a6a1e; }
.re-theme-dark .reQuickEdit label, .re-theme-dark .reQuickEdit .reQeWhole { color: #ccc; }
.reEps-cards .reQuickEdit { grid-column: 1 / -1; }
