/* ── Series mood image ([series_mood_image] shortcode) ───────────────────────── */
.series-mood-wrap {
    margin: 0;
    line-height: 0; /* collapse whitespace gap below inline image */
    overflow: hidden;
}

.series-mood-image {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* ── Chapter navigation bar ─────────────────────────────────────────────────── */
.story-chapter-nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    align-items: center;
    margin-top: var(--wp--preset--spacing--x-large, 3rem);
    padding: var(--wp--preset--spacing--medium, 1.5rem) var(--wp--preset--spacing--large, 2rem);
    background: var(--wp--preset--color--primary-accent, #F3E5DB);
    border-radius: 6px;
}

.story-chapter-nav__link {
    font-weight: 600;
    text-decoration: none;
    color: var(--wp--preset--color--primary, #721628);
    transition: color 0.15s;
}
.story-chapter-nav__link:hover {
    color: var(--wp--preset--color--primary-alt, #D25E5E);
}

.story-chapter-nav__prev  { text-align: left; }
.story-chapter-nav__series { text-align: center; }
.story-chapter-nav__next  { text-align: right; }

.story-chapter-nav__link--empty {
    display: block;
}

/* ── Reading typography ─────────────────────────────────────────────────────── */
.single-story .entry-content,
.single-story .wp-block-post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    /* Disable text selection — reinforced by story-protect.js */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* ── Heat level (story_heat taxonomy) ────────────────────────────────────────── */
/* Container only. The rating itself — the five chillies and their colours — is
   owned by .story-heat-terms in ollie-child/style.css. Do not give the link a
   background here: it sits behind the chillies and hides them. */
.taxonomy-story_heat {
    display: inline-flex;
    align-items: center;
    gap: 0;
    margin: 0;
}

.taxonomy-story_heat a,
.taxonomy-story_heat span {
    text-decoration: none;
    white-space: nowrap;
}

/* ── Story archive / series list cards ──────────────────────────────────────── */
.story-card-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
    font-size: 0.85rem;
    color: var(--wp--preset--color--warm-grey, #c5b0a8);
    margin-bottom: 0.25rem;
}

.story-series-badge {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    background: var(--wp--preset--color--secondary, #E0A382);
    color: var(--wp--preset--color--main, #000);
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
}
.story-series-badge:hover {
    background: var(--wp--preset--color--primary, #721628);
    color: var(--wp--preset--color--base, #F3E5DB);
}

/* ── Series chapter list (shortcode) ────────────────────────────────────────── */
.story-chapter-list {
    margin: 0;
}

.story-chapter-list__item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--wp--preset--color--primary-accent, #F3E5DB);
}

.story-chapter-list__title {
    font-weight: 600;
    font-size: 1rem;
    flex: 1;
}

a.story-chapter-list__title {
    color: var(--wp--preset--color--primary, #721628);
    text-decoration: none;
}
a.story-chapter-list__title:hover {
    color: var(--wp--preset--color--primary-alt, #D25E5E);
}

.story-chapter-list__date {
    font-size: 0.85rem;
    color: var(--wp--preset--color--warm-grey, #c5b0a8);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Upcoming / scheduled chapters */
.story-chapter-list__item--upcoming {
    opacity: 0.55;
}

.story-chapter-list__coming {
    font-size: 0.85rem;
    color: var(--wp--preset--color--primary-alt, #D25E5E);
    font-style: italic;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Genre → forum link ([genre_forum_link] shortcode) ──────────────────────── */
.genre-forum-link {
    margin: 0;
}
.genre-forum-link__anchor {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--wp--preset--color--secondary, #E0A382);
    text-decoration: none;
}
.genre-forum-link__anchor:hover {
    text-decoration: underline;
}

/* ── Active series grid (homepage shortcode) ─────────────────────────────────── */
.active-series-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.active-series-card {
    background: var(--wp--preset--color--base, #fff);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: box-shadow 0.2s;
}
.active-series-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.14);
}

.active-series-card__cover-wrap {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}
.active-series-card__cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.active-series-card:hover .active-series-card__cover {
    transform: scale(1.04);
}

.active-series-card__body {
    padding: 1.2rem 1.4rem 1.4rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.5rem;
}

.active-series-card__title {
    font-family: var(--wp--preset--font-family--secondary, serif);
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}
.active-series-card__title a {
    color: var(--wp--preset--color--primary, #721628);
    text-decoration: none;
}
.active-series-card__title a:hover {
    color: var(--wp--preset--color--primary-alt, #D25E5E);
}

.active-series-card__desc {
    font-size: 0.9rem;
    color: var(--wp--preset--color--main, #333);
    margin: 0;
    line-height: 1.5;
    flex: 1;
    /* clamp to 3 lines */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.active-series-card__meta {
    font-size: 0.8rem;
    color: var(--wp--preset--color--warm-grey, #c5b0a8);
    margin: 0;
}

.active-series-card__cta {
    display: inline-block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--wp--preset--color--primary, #721628);
    text-decoration: none;
}
.active-series-card__cta:hover {
    color: var(--wp--preset--color--primary-alt, #D25E5E);
}
