/* =========================================================
   SAGA STORIES — PUBLIC SINGLE SERIES
========================================================= */

/* =========================================================
   PAGE
========================================================= */

body.single-series,
body.single-comic,
body.single-novel {
    background: #f7f8fc;
}


/* =========================================================
   SERIES HERO
========================================================= */

.saga-series-hero {
    position: relative;

    min-height: 460px;

    display: flex;
    align-items: flex-end;

    background-color: #15151c;
    background-size: cover;
    background-position: center;

    overflow: hidden;
}


.saga-series-hero-overlay {
    width: 100%;
}


.saga-series-hero-content {
    width: min(
        1200px,
        calc(100% - 40px)
    );

    margin: 0 auto;

    padding: 80px 0 60px;
}


.saga-series-title {
    margin: 0 0 18px;

    color: #fff;

    font-size: clamp(
        2.75rem,
        6vw,
        5.5rem
    );

    font-weight: 900;

    line-height: 1;

    letter-spacing: -0.03em;

    text-shadow:
        0 4px 20px rgba(0,0,0,.35);
}


/* =========================================================
   STATUS
========================================================= */

.saga-series-status {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding: 9px 18px;

    border-radius: 999px;

    color: #fff;

    font-size: 13px;
    font-weight: 700;

    line-height: 1;

    letter-spacing: .06em;

    text-transform: uppercase;

    backdrop-filter: blur(10px);

    box-shadow:
        0 8px 24px rgba(0,0,0,.22);
}


.saga-series-status--ongoing {
    background:
        linear-gradient(
            135deg,
            #16a34a,
            #22c55e
        );
}


.saga-series-status--hiatus {
    background:
        linear-gradient(
            135deg,
            #f59e0b,
            #fb923c
        );
}


.saga-series-status--ended {
    background:
        linear-gradient(
            135deg,
            #dc2626,
            #ef4444
        );
}


/* =========================================================
   MAIN CONTAINER
========================================================= */

.saga-series-container {
    width: 100%;
}


.saga-series-layout {
    display: grid;

    grid-template-columns:
        minmax(0, 2fr)
        minmax(300px, 1fr);

    gap: 40px;

    width: min(
        1200px,
        calc(100% - 40px)
    );

    margin: 50px auto 70px;
}


/* =========================================================
   EPISODES
========================================================= */

.saga-series-episodes {
    min-width: 0;
}


.saga-series-section-header {
    margin-bottom: 22px;
}


.saga-series-section-title {
    margin: 0;

    color: #17171d;

    font-size: 28px;
    font-weight: 800;

    line-height: 1.2;
}


/* =========================================================
   CHAPTER WRAPPER
========================================================= */

.saga-series-chapter-wrapper {
    width: 100%;
}


/* =========================================================
   SORT CONTROLS
========================================================= */

.saga-series-chapter-sort {
    display: flex;

    align-items: center;

    gap: 8px;

    margin-bottom: 18px;

    padding: 5px;

    width: fit-content;

    border-radius: 14px;

    background: #eceef5;
}


.saga-series-sort-button {
    appearance: none;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding: 9px 18px;

    border: 0;
    border-radius: 10px;

    background: transparent;

    color: #666b78;

    font-family: inherit;

    font-size: 14px;
    font-weight: 700;

    line-height: 1;

    cursor: pointer;

    box-shadow: none;

    transition:
        background-color .2s ease,
        color .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
}


/* Normal hover */

.saga-series-sort-button:hover {
    background: #f7f4ff;

    color: #6f35e8;

    box-shadow: none;

    transform: none;
}


/* Active */

.saga-series-sort-button.active {
    background: #ffffff;

    color: #7a3cff;

    box-shadow:
        0 4px 12px rgba(0, 0, 0, .08);
}


/*
 * Active + hover.
 *
 * Keep the active button white instead of allowing
 * the theme to turn it dark.
 */

.saga-series-sort-button.active:hover {
    background: #ffffff;

    color: #6f35e8;

    box-shadow:
        0 4px 12px rgba(0, 0, 0, .08);
}

/* =========================================================
   CHAPTER LIST
========================================================= */

.saga-series-chapter-list {
    display: flex;

    flex-direction: column;

    gap: 12px;
}


/* =========================================================
   CHAPTER ITEM
========================================================= */

.saga-series-chapter {
    position: relative;

    display: flex;

    align-items: center;

    gap: 18px;

    width: 100%;

    min-height: 96px;

    padding: 12px 16px;

    border-radius: 18px;

    background: #fff;

    color: inherit;

    text-decoration: none;

    box-shadow:
        0 6px 20px rgba(0,0,0,.05);

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        background .2s ease;
}


.saga-series-chapter:hover {
    transform: translateY(-2px);

    background: #fff;

    color: inherit;

    text-decoration: none;

    box-shadow:
        0 12px 28px rgba(0,0,0,.10);
}


/* =========================================================
   CHAPTER THUMBNAIL
========================================================= */

.saga-series-chapter-thumb {
    flex: 0 0 76px;

    width: 76px;
    height: 76px;

    overflow: hidden;

    border-radius: 12px;

    background: #eceef2;
}


.saga-series-chapter-thumb img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}


.saga-series-chapter-thumb-placeholder {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    color: #8a8d96;

    font-size: 11px;
    font-weight: 600;

    text-align: center;
}


/* =========================================================
   CHAPTER META
========================================================= */

.saga-series-chapter-meta {
    min-width: 0;

    flex: 1;
}


.saga-series-chapter-number {
    display: block;

    margin-bottom: 4px;

    color: #7a3cff;

    font-size: 12px;
    font-weight: 700;

    line-height: 1.3;

    text-transform: uppercase;

    letter-spacing: .04em;
}


.saga-series-chapter-title {
    margin: 0;

    overflow: hidden;

    color: #20212a;

    font-size: 16px;
    font-weight: 700;

    line-height: 1.4;

    text-overflow: ellipsis;

    white-space: nowrap;
}


.saga-series-chapter-date {
    display: block;

    margin-top: 5px;

    color: #8a8d96;

    font-size: 12px;

    line-height: 1.3;
}


/* =========================================================
   LOCKED CHAPTER
========================================================= */

.saga-series-chapter--locked {
    background:
        linear-gradient(
            135deg,
            #fff,
            #faf9ff
        );
}


.saga-series-chapter-lock {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    flex: 0 0 36px;

    width: 36px;
    height: 36px;

    margin-left: auto;

    border-radius: 50%;

    background: #f0eaff;

    font-size: 16px;

    line-height: 1;
}


/* =========================================================
   EMPTY STATE
========================================================= */

.saga-series-empty {
    padding: 40px 24px;

    border-radius: 18px;

    background: #fff;

    color: #777;

    text-align: center;

    box-shadow:
        0 6px 20px rgba(0,0,0,.04);
}


.saga-series-empty p {
    margin: 0;
}


/* =========================================================
   PAGINATION
========================================================= */

.saga-series-pagination {
    display: flex;

    align-items: center;
    justify-content: center;

    flex-wrap: wrap;

    gap: 8px;

    margin-top: 26px;
}


.saga-series-page-button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-width: 40px;
    height: 40px;

    padding: 0 12px;

    border: 0;

    border-radius: 10px;

    background: #fff;

    color: #555;

    font-family: inherit;

    font-size: 14px;
    font-weight: 700;

    line-height: 1;

    cursor: pointer;

    box-shadow:
        0 5px 15px rgba(0,0,0,.06);

    transition:
        background .2s ease,
        color .2s ease,
        transform .2s ease;
}


.saga-series-page-button:hover:not(:disabled) {
    transform: translateY(-1px);

    background: #7a3cff;

    color: #fff;
}


.saga-series-page-button.active {
    background: #7a3cff;

    color: #fff;
}


.saga-series-page-button:disabled {
    opacity: .4;

    cursor: not-allowed;
}


/* =========================================================
   SIDEBAR
========================================================= */

.saga-series-sidebar {
    min-width: 0;
}


.saga-series-card {
    padding: 30px;

    border-radius: 26px;

    background: #fff;

    box-shadow:
        0 10px 30px rgba(0,0,0,.06);
}


/* =========================================================
   COVER
========================================================= */

.saga-series-cover-wrapper {
    width: 100%;

    margin-bottom: 24px;

    text-align: center;
}


.saga-series-cover {
    display: block;

    width: 190px;
    max-width: 100%;
    height: auto;

    margin: 0 auto;

    border-radius: 18px;

    box-shadow:
        0 14px 30px rgba(0,0,0,.14);
}


/* =========================================================
   CREATOR
========================================================= */

.saga-series-creator {
    display: flex;

    align-items: baseline;
    justify-content: center;

    flex-wrap: wrap;

    gap: 5px;

    margin-bottom: 18px;

    color: #666b78;

    font-size: 15px;

    line-height: 1.5;

    text-align: center;
}


.saga-series-creator-label {
    font-weight: 400;
}


.saga-series-creator-name {
    color: #20212a;

    font-weight: 700;
}


/* =========================================================
   PASS ACTIONS
========================================================= */

.saga-series-pass-actions {
    display: flex;

    flex-direction: column;

    gap: 10px;

    width: 100%;

    margin-bottom: 26px;
}


.saga-series-pass-button {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 100%;

    min-height: 50px;

    padding: 12px 18px;

    border-radius: 14px;

    font-size: 14px;
    font-weight: 700;

    line-height: 1;

    text-align: center;
    text-decoration: none;

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        background .2s ease;
}


.saga-series-pass-button:hover {
    transform: translateY(-1px);

    text-decoration: none;
}

/* ---------------------------------------------------------
   Creator Pass
--------------------------------------------------------- */

.saga-series-pass-button--creator {
    background:
        linear-gradient(
            135deg,
            #7a3cff,
            #944dff
        );

    color: #ffffff;

    box-shadow:
        0 8px 20px rgba(
            122,
            60,
            255,
            .20
        );
}


.saga-series-pass-button--creator:hover {
    background:
        linear-gradient(
            135deg,
            #8448ff,
            #9d5aff
        );

    color: #ffffff;

    box-shadow:
        0 10px 24px rgba(
            122,
            60,
            255,
            .24
        );

    transform: translateY(-1px);
}


/* ---------------------------------------------------------
   Premium Pass
--------------------------------------------------------- */

.saga-series-pass-button--premium {
    background:
        linear-gradient(
            135deg,
            #d4af37,
            #f3d675
        );

    color: #33270a;

    box-shadow:
        0 8px 20px rgba(
            212,
            175,
            55,
            .22
        );
}


.saga-series-pass-button--premium:hover {
    background:
        linear-gradient(
            135deg,
            #e0bd4d,
            #f6df83
        );

    color: #33270a;

    box-shadow:
        0 10px 24px rgba(
            212,
            175,
            55,
            .28
        );

    transform: translateY(-1px);
}


/* =========================================================
   GENRES
========================================================= */

.saga-series-genres {
    display: flex;

    align-items: center;

    justify-content: center;

    flex-wrap: wrap;

    gap: 7px;

    margin-bottom: 26px;
}


.saga-series-genre {
    display: inline-flex;

    align-items: center;

    padding: 6px 11px;

    border-radius: 999px;

    background: #f0eff5;

    color: #686574;

    font-size: 11px;
    font-weight: 700;

    line-height: 1;

    text-transform: uppercase;

    letter-spacing: .03em;
}


/* =========================================================
   SYNOPSIS
========================================================= */

.saga-series-synopsis {
    margin-top: 0;

    padding-top: 24px;

    border-top: 1px solid #ececf1;
}


.saga-series-synopsis-title {
    margin: 0 0 12px;

    color: #20212a;

    font-size: 18px;
    font-weight: 800;

    line-height: 1.3;
}


.saga-series-synopsis-content {
    color: #626571;

    font-size: 14px;

    line-height: 1.75;
}


.saga-series-synopsis-content p {
    margin: 0 0 14px;
}


.saga-series-synopsis-content p:last-child {
    margin-bottom: 0;
}


/* =========================================================
   READING ACTIONS
========================================================= */

.saga-series-actions {
    display: flex;

    flex-direction: column;

    gap: 12px;

    margin-top: 26px;
}


.saga-series-read-button {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 100%;

    min-height: 52px;

    padding: 12px 18px;

    border-radius: 14px;

    font-size: 15px;
    font-weight: 700;

    line-height: 1;

    text-align: center;

    text-decoration: none;

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        background .2s ease;
}


.saga-series-read-button:hover {
    transform: translateY(-2px);

    text-decoration: none;
}


.saga-series-read-button--primary {
    background:
        linear-gradient(
            135deg,
            #7a3cff,
            #944dff
        );

    color: #fff;

    box-shadow:
        0 8px 20px rgba(122,60,255,.20);
}


.saga-series-read-button--primary:hover {
    color: #fff;

    box-shadow:
        0 12px 26px rgba(122,60,255,.28);
}


.saga-series-read-button--secondary {
    background: #f0eff5;

    color: #55515f;
}


.saga-series-read-button--secondary:hover {
    background: #e7e5ed;

    color: #302d38;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 960px) {

    .saga-series-layout {
        grid-template-columns:
            minmax(0, 1.5fr)
            minmax(280px, 1fr);

        gap: 28px;
    }


    .saga-series-card {
        padding: 24px;
    }


    .saga-series-cover {
        width: 170px;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {

    .saga-series-hero {
        min-height: 380px;

        align-items: flex-end;
    }


    .saga-series-hero-content {
        width: calc(100% - 32px);

        padding: 60px 0 42px;
    }


    .saga-series-title {
        font-size: clamp(
            2.35rem,
            11vw,
            4rem
        );
    }


    .saga-series-layout {
        display: flex;

        flex-direction: column;

        width: calc(100% - 32px);

        margin: 32px auto 50px;

        gap: 28px;
    }


    /*
     * Sidebar first on mobile.
     *
     * Readers see the Series information and
     * primary reading actions before the episode list.
     */

    .saga-series-sidebar {
        order: 1;
    }


    .saga-series-episodes {
        order: 2;
    }


    .saga-series-card {
        padding: 24px 20px;

        border-radius: 22px;
    }


    .saga-series-section-title {
        font-size: 24px;
    }


    .saga-series-chapter-sort {
        width: 100%;
    }


    .saga-series-sort-button {
        flex: 1;

        text-align: center;
    }


    .saga-series-chapter {
        gap: 12px;

        min-height: 80px;

        padding: 10px 12px;

        border-radius: 14px;
    }


    .saga-series-chapter-thumb {
        flex-basis: 64px;

        width: 64px;
        height: 64px;

        border-radius: 10px;
    }


    .saga-series-chapter-number {
        font-size: 10px;
    }


    .saga-series-chapter-title {
        font-size: 14px;
    }


    .saga-series-chapter-date {
        font-size: 11px;
    }


    .saga-series-chapter-lock {
        flex-basis: 32px;

        width: 32px;
        height: 32px;

        font-size: 14px;
    }


    .saga-series-cover {
        width: 160px;
    }


    .saga-series-pagination {
        gap: 6px;
    }


    .saga-series-page-button {
        min-width: 36px;
        height: 36px;

        padding: 0 9px;
    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 480px) {

    .saga-series-hero {
        min-height: 330px;
    }


    .saga-series-hero-content {
        width: calc(100% - 24px);

        padding-bottom: 30px;
    }


    .saga-series-layout {
        width: calc(100% - 24px);

        margin-top: 24px;
    }


    .saga-series-title {
        margin-bottom: 14px;
    }


    .saga-series-status {
        padding: 8px 14px;

        font-size: 11px;
    }


    .saga-series-card {
        padding: 20px 16px;
    }


    .saga-series-chapter {
        align-items: center;
    }


    .saga-series-chapter-meta {
        padding-right: 2px;
    }


    .saga-series-chapter-lock {
        flex-basis: 28px;

        width: 28px;
        height: 28px;
    }

}