/* SummerToons — "Bölümler" chapter list card redesign (2026-09-18, r2)
   Loaded AFTER mauve-toons.css (and the other -rN override files), same
   selectors/specificity, so it overrides by plain source order — no new
   !important beyond what the rules being overridden already use.

   WHY THIS IS A SEPARATE, REVISIONED FILE: mauve-toons.css is served
   through Cloudflare with a 10-year cache that ignores the `?ver=` query
   string, so an in-place edit to that file does not reliably reach real
   visitors. This file — a fresh URL Cloudflare has never cached — is what
   actually delivers the change. r1 is left in place on disk, unreferenced.

   r1 recap: fixed the grid (was forced to 1 column everywhere by a later
   rule in mauve-toons.css), gave 2 columns at >=901px, bigger cover
   (78→100px), bigger card min-height, resume-row wrap threshold raised to
   account for narrower 2-col cells.

   r2 (this revision): the owner asked for 2 columns on MOBILE too — r1's
   own `@media (max-width:900px)` was still forcing 1 column back. Rather
   than squeeze the desktop HORIZONTAL card (image left, text right) into a
   ~160px-wide mobile cell, the card's internal layout switches to VERTICAL
   at <=900px (image on top spanning the card width, info stacked below) —
   a normal responsive-card pattern, not a compressed version of the
   desktop card. Nothing about chapter data, order, links, reading-progress
   state, or "new chapter" detection is touched — only CSS layout of the
   existing markup and the reading-state classes mauve-reading.js already
   adds (`.st-ch-read`, `.st-ch-current`, `.st-ch-new`) are restyled. */

/* ---- 2-column grid at EVERY width now (this is the actual fix) ---- */
body.mauve-series-page .postbody.full:has(.tsinfo.bixbox) .eplister ul {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px !important;
}
@media (max-width: 900px) {
  body.mauve-series-page .postbody.full:has(.tsinfo.bixbox) .eplister ul {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
}
/* minmax(0, 1fr) on both tracks is what guarantees the grid can NEVER
   overflow the viewport, at any width down to the narrowest real phones —
   each column is forced to fit the available space, never its content's
   intrinsic width. */

/* `.eplister li` keeps `position:relative` from mauve-toons.css unchanged —
   required for the "YENİ" badge and read-checkmark, both position:absolute
   relative to the <li> itself. */

/* =====================================================================
   DESKTOP (>=901px) — unchanged from r1, restated here since this file
   fully replaces r1 as the one actually served to visitors.
   ===================================================================== */
.mauve-chapter-cover {
  flex: 0 0 78px;
  width: 78px;
  height: 78px;
  border-radius: 12px;
}
@media (min-width: 901px) {
  .mauve-chapter-cover {
    flex-basis: 100px;
    width: 100px;
    height: 100px;
    border-radius: 14px;
  }
}

body.mauve-series-page .postbody.full:has(.tsinfo.bixbox) .eplister .eph-num > a {
  min-height: 94px !important;
  padding: 11px !important;
  gap: 14px !important;
}
@media (min-width: 901px) {
  body.mauve-series-page .postbody.full:has(.tsinfo.bixbox) .eplister .eph-num > a {
    min-height: 122px !important;
    padding: 13px !important;
    gap: 16px !important;
  }
}

body.mauve-series-page .postbody.full:has(.tsinfo.bixbox) .eplister .chapternum {
  font-size: 16px !important;
}
@media (min-width: 901px) {
  body.mauve-series-page .postbody.full:has(.tsinfo.bixbox) .eplister .chapternum {
    font-size: 17px !important;
  }
}

/* =====================================================================
   MOBILE / TABLET (<=900px) — NEW in r2: vertical card, image on top.
   Overrides the horizontal (image-left, text-right) layout above for this
   range only. Every property the desktop rules set for `.eph-num > a` and
   `.mauve-chapter-cover` is re-declared here for this range so nothing
   leaks through half-configured.
   ===================================================================== */
@media (max-width: 900px) {
  body.mauve-series-page .postbody.full:has(.tsinfo.bixbox) .eplister .eph-num > a {
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    min-height: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
    overflow: hidden; /* clips the top image to the card's own rounded corners */
  }

  /* Image becomes a full-width "banner" across the top of the card instead
     of a small square box on the side — this is what keeps it large and
     sharp instead of shrinking back to icon size. */
  .mauve-chapter-cover {
    flex: none !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 10 !important;
    border-radius: 0 !important; /* the card (`.eph-num > a`, overflow:hidden above) supplies the rounding */
  }

  .mauve-chapter-copy {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 10px 10px;
    gap: 4px;
  }

  body.mauve-series-page .postbody.full:has(.tsinfo.bixbox) .eplister .chapternum {
    font-size: 14px !important;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  body.mauve-series-page .postbody.full:has(.tsinfo.bixbox) .eplister .chapterdate {
    font-size: 11px !important;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Read checkmark: with a tall image-on-top card, `top:50%` (the desktop/
     base rule) would float mid-image instead of near the text — anchor it
     to the bottom-right of the text area instead. Same icon, same meaning,
     just repositioned for the taller card shape. */
  body.mauve-series-page .postbody.full:has(.tsinfo.bixbox) .eplister li.st-ch-read::after {
    top: auto !important;
    bottom: 10px !important;
    transform: none !important;
  }

  /* Comfortable touch target: the whole card link, not just the text line. */
  body.mauve-series-page .postbody.full:has(.tsinfo.bixbox) .eplister .eph-num > a {
    min-height: 44px !important; /* satisfied many times over by the image + text stack, floor only */
  }
}

/* ---- last-read "Devam et" resume row ----
   At <=900px the card itself is now a column (image, then text). The
   resume group (progress bar + % + pill), appended as a sibling of the
   link inside `.eph-num`, needs the same column treatment so it sits as
   its own full-width row under the card rather than trying to sit beside
   a now-vertical link. */
@media (max-width: 900px) {
  body.mauve-series-page .postbody.full:has(.tsinfo.bixbox) .eplister li.st-ch-current .eph-num {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 6px !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
  }
  body.mauve-series-page .postbody.full:has(.tsinfo.bixbox) .eplister li.st-ch-current .eph-num > a {
    flex: none !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  body.mauve-series-page .postbody.full:has(.tsinfo.bixbox) .eplister li.st-ch-current .st-ch-resume-group {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 10px 9px !important;
    align-items: center !important;
    justify-content: space-between !important;
    overflow: visible !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  body.mauve-series-page .postbody.full:has(.tsinfo.bixbox) .eplister li.st-ch-current,
  body.mauve-series-page .postbody.full:has(.tsinfo.bixbox) .eplister li.st-ch-current .chbox {
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
  }
}

/* At >900px this is unchanged from r1: wrap the resume row onto its own
   line up to 1400px (a 2-col cell only gets wide enough to fit it inline
   above that), full inline row above 1400px. */
@media (min-width: 901px) and (max-width: 1400px) {
  body.mauve-series-page .postbody.full:has(.tsinfo.bixbox) .eplister li.st-ch-current .eph-num {
    flex-wrap: wrap !important;
    row-gap: 8px !important;
    align-items: flex-start !important;
    align-content: flex-start !important;
    overflow: visible !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }
  body.mauve-series-page .postbody.full:has(.tsinfo.bixbox) .eplister li.st-ch-current .eph-num > a {
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  body.mauve-series-page .postbody.full:has(.tsinfo.bixbox) .eplister li.st-ch-current .st-ch-resume-group {
    order: 2 !important;
    display: flex !important;
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    align-items: center !important;
    justify-content: flex-end !important;
    overflow: visible !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  body.mauve-series-page .postbody.full:has(.tsinfo.bixbox) .eplister li.st-ch-current,
  body.mauve-series-page .postbody.full:has(.tsinfo.bixbox) .eplister li.st-ch-current .chbox {
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
  }
}
/* No explicit "un-wrap" rule needed above 1400px: flexbox's default
   flex-wrap is `nowrap`, and nothing else sets it otherwise for that
   range, so the resume row is inline again automatically. */
