/* ========================================
   WATCH LOG
   NEO-BRUTALISM — VIOLET
======================================== */


/* ========================================
   MAIN
======================================== */

.watchlist-inner {

    width: 100%;

    background: var(--paper);

}


/* ========================================
   A-Z NAVIGATION
======================================== */

.watchlist-az {

    display: flex;

    flex-wrap: wrap;

    gap: 6px;

    padding:
        18px 24px;

    border-bottom:
        2px solid var(--black);

}


/* ========================================
   LETTER BUTTON
======================================== */

.az-letter {

    width: 28px;
    height: 28px;

    display: grid;

    place-items: center;

    padding: 0;

    background: var(--paper);

    border:
        2px solid var(--black);

    color: #999;

    font-family:
        "DM Mono",
        monospace;

    font-size: 9px;

    font-weight: 700;

    cursor: default;

}


/* ========================================
   ACTIVE LETTER
======================================== */

.az-letter.active {

    background: var(--yellow);

    color: var(--black);

    cursor: pointer;

    box-shadow:
        2px 2px 0 var(--black);

    transition:
        transform .15s ease,
        box-shadow .15s ease;

}


.az-letter.active:hover {

    transform:
        translate(
            2px,
            2px
        );

    box-shadow: none;

}


/* ========================================
   SELECTED LETTER
======================================== */

.az-letter.selected {

    background: var(--violet);

    color: var(--black);

}


/* ========================================
   ALL BUTTON
======================================== */

.az-all {

    width: auto;

    min-width: 52px;

    padding:
        0 12px;

    background: var(--yellow);

    color: var(--black);

    border:
        2px solid var(--black);

    cursor: pointer;

    box-shadow:
        2px 2px 0 var(--black);

    transition:
        transform .15s ease,
        box-shadow .15s ease;

}


.az-all:hover {

    transform:
        translate(
            2px,
            2px
        );

    box-shadow: none;

}


.az-all.selected {

    background: var(--violet);

    color: var(--black);

}


/* ========================================
   CONTENT
======================================== */

.watchlist-content {

    min-height: 80px;

    max-height: 520px;

    overflow-y: auto;

    padding: 24px;

}


/* ========================================
   LOADING
======================================== */

.watchlist-loading {

    padding: 30px 0;

    color: #777;

    font-family:
        "DM Mono",
        monospace;

    font-size: 11px;

    text-align: center;

}


/* ========================================
   GROUP
======================================== */

.watch-group {

    margin-bottom: 30px;

}


.watch-group:last-child {

    margin-bottom: 0;

}


/* ========================================
   LETTER HEADING
======================================== */

.watch-letter {

    width: max-content;

    min-width: 34px;

    margin-bottom: 12px;

    padding:
        5px 9px;

    background: var(--pink);

    border:
        2px solid var(--black);

    box-shadow:
        3px 3px 0 var(--black);

    color: var(--black);

    font-size: 15px;

    font-weight: 700;

}


/* ========================================
   ITEMS
======================================== */

.watch-items {

    display: flex;

    flex-direction: column;

    gap: 0;

    border-left:
        3px solid var(--black);

}


.watch-items p {

    position: relative;

    margin: 0;

    padding:
        9px 14px;

    border-bottom:
        1px solid #ddd;

    color: var(--black);

    font-size: 13px;

    line-height: 1.6;

    transition:
        background .15s ease,
        padding-left .15s ease;

}


.watch-items p:last-child {

    border-bottom: 0;

}


.watch-items p::before {

    content: ">";

    margin-right: 10px;

    color: var(--violet-dark);

    font-family:
        "DM Mono",
        monospace;

    font-weight: 700;

}


.watch-items p:hover {

    padding-left: 20px;

    background: var(--violet-light);

}


/* ========================================
   FOOTER
======================================== */

.watchlist-inner-footer {

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding:
        12px 18px;

    background: var(--green);

    border-top:
        3px solid var(--black);

    color: var(--black);

    font-family:
        "DM Mono",
        monospace;

    font-size: 9px;

    font-weight: 700;

}


/* ========================================
   SCROLLBAR
======================================== */

.watchlist-content::-webkit-scrollbar {

    width: 10px;

}


.watchlist-content::-webkit-scrollbar-track {

    background: var(--cream);

}


.watchlist-content::-webkit-scrollbar-thumb {

    background: var(--violet);

    border:
        2px solid var(--black);

}


.watchlist-content::-webkit-scrollbar-thumb:hover {

    background: var(--yellow);

}


/* ========================================
   MOBILE
======================================== */

@media (max-width: 700px) {


    .watchlist-az {

        padding:
            14px 18px;

        gap: 6px;

    }


    .az-letter {

        width: 25px;
        height: 25px;

        font-size: 8px;

    }


    .az-all {

        min-width: 48px;

        padding:
            0 10px;

    }


    .watchlist-content {

        min-height: 60px;

        max-height: 450px;

        padding: 18px;

    }


    .watch-items p {

        font-size: 12px;

    }


    .watchlist-inner-footer {

        padding:
            10px 14px;

    }

}


/* ========================================
   SMALL MOBILE
======================================== */

@media (max-width: 480px) {


    .watchlist-az {

        padding:
            12px 14px;

        gap: 5px;

    }


    .az-letter {

        width: 24px;
        height: 24px;

        font-size: 8px;

    }


    .az-all {

        min-width: 46px;

        padding:
            0 9px;

    }


    .watchlist-content {

        min-height: 50px;

        padding: 14px;

    }


    .watchlist-inner-footer {

        padding:
            10px 12px;

        font-size: 8px;

    }

}

/* ========================================
   WATCH TOTAL
======================================== */

.watch-total {

    margin: 0;

    padding:
        28px 24px;

    color: var(--black);

    font-family:
        "DM Mono",
        monospace;

    font-size: 12px;

    font-weight: 500;

    line-height: 1.7;

    text-align: center;

}


.watch-total span {

    color: var(--violet);

    font-weight: 700;

}


/* ========================================
   TMDB MOVIE / TV POPUP
======================================== */

body.tmdb-modal-open {
    overflow: hidden;
}

.tmdb-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.tmdb-modal.is-open {
    display: flex;
}

.tmdb-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 17, 17, .78);
    cursor: pointer;
}

.tmdb-modal-box {
    position: relative;
    z-index: 1;
    width: min(900px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    background: var(--paper);
    color: var(--black);
    border: var(--border);
    box-shadow: 10px 10px 0 var(--black);
}

.tmdb-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    padding: 0;
    border: var(--border);
    background: var(--yellow);
    color: var(--black);
    font-size: 28px;
    line-height: 1;
    font-weight: 900;
    cursor: pointer;
    box-shadow: var(--shadow-small);
}

.tmdb-modal-close:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--black);
}

.tmdb-modal-content {
    position: relative;
}

.tmdb-backdrop {
    height: 240px;
    background-color: var(--violet);
    background-position: center;
    background-size: cover;
    border-bottom: var(--border);
}

.tmdb-detail-grid {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 28px;
    padding: 30px;
}

.tmdb-poster {
    display: block;
    width: 100%;
    border: var(--border);
    box-shadow: var(--shadow);
}

.tmdb-poster-placeholder {
    aspect-ratio: 2 / 3;
    display: grid;
    place-items: center;
    background: var(--yellow);
    border: var(--border);
    box-shadow: var(--shadow);
    text-align: center;
    font-family: "DM Mono", monospace;
    font-weight: 900;
}

.tmdb-kicker,
.tmdb-section-label {
    display: inline-block;
    padding: 6px 9px;
    background: var(--pink);
    border: 2px solid var(--black);
    font-family: "DM Mono", monospace;
    font-size: 10px;
    font-weight: 900;
}

.tmdb-info h2 {
    margin-top: 14px;
    max-width: 650px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: .95;
    letter-spacing: -2px;
}

.tmdb-original-title {
    margin-top: 8px;
    color: var(--gray);
    font-size: 13px;
}

.tmdb-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.tmdb-meta span {
    padding: 7px 9px;
    background: var(--yellow);
    border: 2px solid var(--black);
    font-family: "DM Mono", monospace;
    font-size: 10px;
    font-weight: 800;
}

.tmdb-description {
    margin-top: 22px;
    max-width: 680px;
    font-size: 15px;
    line-height: 1.7;
}

.tmdb-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 24px;
}

.tmdb-facts div {
    padding: 12px;
    background: var(--violet-light);
    border: 2px solid var(--black);
}

.tmdb-facts b {
    display: block;
    font-family: "DM Mono", monospace;
    font-size: 9px;
}

.tmdb-facts span {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    font-weight: 700;
}

.tmdb-cast,
.tmdb-season {
    padding: 0 30px 28px;
}

.tmdb-cast-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.tmdb-cast-list span {
    padding: 8px 10px;
    border: 2px solid var(--black);
    background: var(--cream);
    font-size: 12px;
    font-weight: 700;
}

.tmdb-season-head {
    display: flex;
    gap: 18px;
    margin-top: 14px;
    padding: 14px;
    background: var(--green);
    border: var(--border);
}

.tmdb-season-head img {
    width: 90px;
    height: 135px;
    object-fit: cover;
    border: 2px solid var(--black);
}

.tmdb-season-head h3 {
    font-size: 24px;
    line-height: 1;
}

.tmdb-season-head p {
    margin-top: 7px;
    font-family: "DM Mono", monospace;
    font-size: 10px;
}

.tmdb-episodes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.tmdb-episode {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 9px 10px;
    border: 2px solid var(--black);
    background: var(--paper);
    font-size: 12px;
}

.tmdb-episode strong {
    font-family: "DM Mono", monospace;
}

.tmdb-loading,
.tmdb-error {
    min-height: 360px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    padding: 50px 30px;
    text-align: center;
}

.tmdb-loading {
    background: var(--violet-light);
    font-family: "DM Mono", monospace;
}

.tmdb-loading strong {
    max-width: 700px;
    font-family: "Space Grotesk", sans-serif;
    font-size: 30px;
}

.tmdb-error {
    background: var(--pink);
}

.tmdb-error-label {
    font-family: "DM Mono", monospace;
    font-size: 10px;
    font-weight: 900;
}

.tmdb-error h2 {
    font-size: 36px;
}

.tmdb-attribution {
    margin: 0 30px 30px;
    padding: 12px;
    background: var(--cream);
    border: 2px solid var(--black);
    font-family: "DM Mono", monospace;
    font-size: 9px;
    line-height: 1.6;
}

/* Clickable movie / series names */
.watch-item-button {
    position: relative;
    display: block;
    width: 100%;
    margin: 0;
    padding: 9px 14px 9px 38px;
    border: 0;
    border-bottom: 1px solid #ddd;
    background: transparent;
    color: var(--black);
    font: inherit;
    font-size: 13px;
    line-height: 1.6;
    text-align: left;
    cursor: pointer;
    transition: background .15s ease, padding-left .15s ease;
}

.watch-item-button:last-child {
    border-bottom: 0;
}

.watch-item-button::before {
    content: ">";
    position: absolute;
    left: 14px;
    color: var(--violet-dark);
    font-family: "DM Mono", monospace;
    font-weight: 700;
}

.watch-item-button:hover {
    padding-left: 44px;
    background: var(--violet-light);
}

@media (max-width: 700px) {
    .tmdb-modal {
        padding: 10px;
    }

    .tmdb-modal-box {
        max-height: 94vh;
        box-shadow: 6px 6px 0 var(--black);
    }

    .tmdb-backdrop {
        height: 150px;
    }

    .tmdb-detail-grid {
        grid-template-columns: 110px minmax(0, 1fr);
        gap: 18px;
        padding: 20px;
    }

    .tmdb-info h2 {
        font-size: 30px;
        letter-spacing: -1px;
    }

    .tmdb-description {
        font-size: 13px;
    }

    .tmdb-facts {
        grid-template-columns: 1fr;
    }

    .tmdb-cast,
    .tmdb-season {
        padding: 0 20px 22px;
    }

    .tmdb-attribution {
        margin: 0 20px 20px;
    }

    .tmdb-episodes {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 430px) {
    .tmdb-detail-grid {
        grid-template-columns: 1fr;
    }

    .tmdb-poster-wrap {
        width: 150px;
    }
}
