/* ==========================================================================
   Detail Page Inline Styles — Extracted from details-anime.php
   ========================================================================== */

/* Premium Badge Styles for Detail Page */
.film-stats .tick .tick-item {
    display: inline-block;
    margin-right: 8px;
    padding: 0 8px;
    height: 22px;
    line-height: 22px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    vertical-align: middle;
}

.film-stats .tick .tick-quality {
    background: #FFBADE;
    color: #1a1a2e;
}

.film-stats .tick .tick-sub {
    background: #fff;
    color: #1a1a2e;
}

.film-stats .tick .tick-dub {
    background: #4ECDC4;
    color: #1a1a2e;
}

.film-stats .tick .tick-eps {
    background: #fff;
    color: #1a1a2e;
}

.film-stats .tick .tick-pg {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.film-stats .dot {
    margin: 0 10px;
    opacity: 0.5;
}

.film-stats .item {
    font-weight: 500;
    opacity: 0.9;
}

/* ==========================================================================
   Detail Lower Layout — Recommended (left) + Related sidebar (right)
   ========================================================================== */

.detail-lower {
    display: flex;
    gap: 28px;
    align-items: flex-start;
    margin-top: 28px;
}

#main-content {
    flex: 1 1 0;
    min-width: 0;
}

#main-sidebar {
    flex: 0 0 300px;
    width: 300px;
}

@media (max-width: 1199px) {
    #main-sidebar { flex: 0 0 260px; width: 260px; }
}

@media (max-width: 991px) {
    .detail-lower { flex-direction: column; gap: 20px; }
    #main-sidebar { width: 100%; }
}

/* ==========================================================================
   Recommended-for-you grid — override styles.css default 6-column (16.66%)
   to 4-column (25%) so it fits in the narrower left column beside sidebar.
   We keep the existing `.film-poster { padding-bottom: 140% }` ratio from
   styles.css untouched.
   ========================================================================== */

.detail-rec-grid.film_list .film_list-wrap .flw-item {
    width: calc(25% - 1rem) !important;
}

@media (max-width: 1199px) {
    .detail-rec-grid.film_list .film_list-wrap .flw-item {
        width: calc(33.333% - 1rem) !important;
    }
}

@media (max-width: 767px) {
    .detail-rec-grid.film_list .film_list-wrap .flw-item {
        width: calc(50% - 1rem) !important;
    }
}

/* Section header — flex row, aligned */
.block_area .block_area-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.block_area .block_area-header .cat-heading {
    margin: 0;
}

/* ==========================================================================
   Related Anime Sidebar — compact list
   ========================================================================== */

.related-sidebar {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 18px 16px;
    position: sticky;
    top: 76px;
}

.related-sidebar-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0 0 14px;
}

.related-sidebar-heading::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 13px;
    background: var(--color-primary, #f5c518);
    border-radius: 2px;
    flex-shrink: 0;
}

/* List container — grows naturally with content */
.rel-list {
    display: flex;
    flex-direction: column;
}

/* Each list row */
.rel-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.rel-item:last-child { border-bottom: none; }

.rel-item--hidden { display: none !important; }

/* Poster thumbnail */
.rel-poster-wrap {
    flex: 0 0 52px;
    width: 52px;
    height: 74px;
    border-radius: 5px;
    overflow: hidden;
    display: block;
}

.rel-poster-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s;
}

.rel-poster-wrap:hover img { transform: scale(1.06); }

/* Title + meta column */
.rel-info {
    flex: 1;
    min-width: 0;
}

.rel-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 12.5px;
    font-weight: 600;
    color: #e8eaed;
    text-decoration: none;
    line-height: 1.45;
    margin-bottom: 6px;
    transition: color 0.15s;
}

.rel-title:hover { color: var(--color-primary, #f5c518); }

.rel-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

/* Type badge (TV, MOVIE, OVA …) */
.rel-type-badge {
    display: inline-block;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 700;
    border-radius: 3px;
    background: rgba(245, 197, 24, 0.12);
    color: var(--color-primary, #f5c518);
    border: 1px solid rgba(245, 197, 24, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.5;
}

/* Reuse existing tick-item but scaled down + force theme colors */
.rel-meta .tick-item {
    padding: 1px 5px !important;
    font-size: 10px !important;
    height: auto !important;
    line-height: 1.55 !important;
    border-radius: 3px !important;
    font-weight: 700 !important;
}

.rel-meta .tick-sub {
    background: var(--color-badge-sub, #22c55e) !important;
    color: #0b0c10 !important;
}

.rel-meta .tick-dub {
    background: var(--color-badge-dub, #3b82f6) !important;
    color: #fff !important;
}

.rel-meta .tick-sub i,
.rel-meta .tick-dub i {
    color: inherit !important;
    margin-right: 3px;
}

.rel-eps {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.38);
}

/* Show More / Less button */
.related-show-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-top: 12px;
    padding: 9px 0;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.related-show-more:hover {
    background: rgba(245, 197, 24, 0.1);
    border-color: rgba(245, 197, 24, 0.3);
    color: var(--color-primary, #f5c518);
}

.related-show-more i { transition: transform 0.2s; }
.related-show-more.expanded i { transform: rotate(180deg); }
