/* =========================================================================
   MarineTL | Premium Latest Chapters list v2.7.2
   Loaded by the plugin; no Additional CSS is required.
   Scope: Fictioneer .latest-chapters only. Existing vertical Splide shortcodes
   continue to work automatically; class="mtl-latest" can opt in explicitly.
   ========================================================================= */

/* ---- Tokens ---- */
.latest-chapters:is(.mtl-latest, .splide--ttb) {
  --mtl-row: rgb(255 255 255 / 5%);
  --mtl-row-hover: rgb(232 196 138 / 9%);
  --mtl-line: rgb(232 196 138 / 22%);
  --mtl-line-hover: rgb(246 226 186 / 62%);
  --mtl-gold: #e8c48a;
  --mtl-gold-hi: #f6e2ba;
  --mtl-ring: rgb(232 196 138 / 32%);
  --mtl-shadow: 0 12px 24px -18px rgb(0 0 0 / 80%);
  --mtl-ease: cubic-bezier(.2, .75, .2, 1);
}
:root[data-mode="light"] .latest-chapters:is(.mtl-latest, .splide--ttb) {
  --mtl-row: rgb(255 255 255 / 78%);
  --mtl-row-hover: rgb(154 106 34 / 8%);
  --mtl-line: rgb(154 106 34 / 24%);
  --mtl-line-hover: rgb(154 106 34 / 60%);
  --mtl-gold: #9a6a22;
  --mtl-gold-hi: #86581a;
  --mtl-ring: rgb(154 106 34 / 30%);
  --mtl-shadow: 0 12px 22px -18px rgb(30 38 46 / 55%);
}

/* ---- The scroll window: last row fades out instead of being cut off ---- */
.latest-chapters:is(.mtl-latest, .splide--ttb) .splide__track {
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 46px), transparent 100%);
  mask-image: linear-gradient(180deg, #000 calc(100% - 46px), transparent 100%);
  padding-block: 2px;
}
/* Never fade the active keyboard target/focus ring. */
.latest-chapters:is(.mtl-latest, .splide--ttb) .splide__track:focus-within {
  -webkit-mask-image: none;
  mask-image: none;
}

/* ---- Row: the list item IS the card. Keep Fictioneer cover/title layout intact. ---- */
.latest-chapters:is(.mtl-latest, .splide--ttb) .splide__slide {
  position: relative;
  box-sizing: border-box;
  overflow: hidden;
  padding-right: 38px !important;
  border: 1px solid var(--mtl-line) !important;
  border-radius: 16px !important;
  clip-path: none !important;
  background: var(--mtl-row) !important;
  box-shadow: var(--mtl-shadow) !important;
  transition: background .25s ease, border-color .25s ease, box-shadow .3s ease;
}

/* Chevron: drawn in CSS, no extra markup. */
.latest-chapters:is(.mtl-latest, .splide--ttb) .splide__slide::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 18px;
  width: 8px;
  height: 8px;
  border-top: 2px solid var(--mtl-gold);
  border-right: 2px solid var(--mtl-gold);
  border-radius: 1px;
  opacity: .55;
  pointer-events: none;
  transform: translateY(-50%) rotate(45deg);
  transition: transform .3s var(--mtl-ease), opacity .25s ease;
}

/* ---- Title ---- */
.latest-chapters:is(.mtl-latest, .splide--ttb) .splide__slide a {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .005em;
  line-height: 1.3;
  text-wrap: pretty;
  transition: color .2s ease;
}

/* ---- Hover / keyboard focus ---- */
@media (hover: hover) {
  .latest-chapters:is(.mtl-latest, .splide--ttb) .splide__slide:hover {
    background: var(--mtl-row-hover) !important;
    border-color: var(--mtl-line-hover) !important;
  }
  .latest-chapters:is(.mtl-latest, .splide--ttb) .splide__slide:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(3px) rotate(45deg);
  }
  .latest-chapters:is(.mtl-latest, .splide--ttb) .splide__slide:hover a { color: var(--mtl-gold-hi); }
}
.latest-chapters:is(.mtl-latest, .splide--ttb) .splide__slide:focus-within {
  outline: 2px solid var(--mtl-gold);
  outline-offset: -2px;
}

/* ---- Desktop arrows (hidden on mobile by the shortcode's Splide settings) ---- */
.latest-chapters:is(.mtl-latest, .splide--ttb) .splide__arrow {
  border: 1px solid var(--mtl-ring);
  border-radius: 12px;
  background: rgb(9 15 20 / 72%);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 22px -10px rgb(0 0 0 / 60%);
  opacity: 1;
}
.latest-chapters:is(.mtl-latest, .splide--ttb) .splide__arrow svg { fill: var(--mtl-gold); }
.latest-chapters:is(.mtl-latest, .splide--ttb) .splide__arrow:disabled { opacity: .35; }

@media (prefers-reduced-motion: reduce) {
  .latest-chapters:is(.mtl-latest, .splide--ttb) .splide__slide,
  .latest-chapters:is(.mtl-latest, .splide--ttb) .splide__slide::after,
  .latest-chapters:is(.mtl-latest, .splide--ttb) .splide__slide a { transition: none !important; }
}
