/* ================================================================
 * Single Series — Immersive Header
 * AnimesLand Theme
 * ================================================================ */

/* ── Sheader: container principal ────────────────────────────── */
.dtsingle .sheader {
    position: relative;
    float: none !important;
    width: 100% !important;
    min-height: 520px;
    padding: 0 0 80px !important;
    overflow: visible !important;
    display: flex !important;
    align-items: flex-end;
    background-size: cover !important;
    background-position: center 20% !important;
    background-repeat: no-repeat !important;
}

/* Vinheta lateral esquerda + topo */
.dtsingle .sheader::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to right,
            rgba(0,0,0,0.92) 0%,
            rgba(0,0,0,0.60) 30%,
            rgba(0,0,0,0.12) 58%,
            rgba(0,0,0,0.44) 100%
        ),
        linear-gradient(to bottom,
            rgba(0,0,0,0.60) 0%,
            rgba(0,0,0,0)    30%
        );
    z-index: 1;
    pointer-events: none;
}

/* Dissolução cinematográfica + blur na base */
.dtsingle .sheader::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 220px;
    background: linear-gradient(to bottom,
        transparent          0%,
        rgba(0,0,0,0.30)    28%,
        rgba(0,0,0,0.75)    58%,
        rgba(0,0,0,0.96)    78%,
        #000                100%
    );
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 25%, black 100%);
    mask-image:         linear-gradient(to bottom, transparent 0%, black 25%, black 100%);
    pointer-events: none;
    z-index: 2;
}

/* ── Inner wrapper ───────────────────────────────────────────── */
.dtsingle .sheader .sheader-inner {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    align-items: flex-end;
    gap: 28px;
}

/* ── Poster ──────────────────────────────────────────────────── */
.dtsingle .sheader .poster {
    float: none !important;
    flex-shrink: 0;
    width: 200px !important;
    position: relative;
}

.dtsingle .sheader .poster img {
    width: 100% !important;
    height: auto !important;
    display: block;
    float: none !important;
    border-radius: 10px;
    box-shadow:
        0 8px 36px rgba(0,0,0,0.9),
        0 2px 8px  rgba(0,0,0,0.6);
}

/* ── Data / info panel ───────────────────────────────────────── */
.dtsingle .sheader .data {
    flex: 1;
    width: auto !important;
    margin-left: 0 !important;
    padding: 0 0 6px !important;
    /* flex column para controlar alinhamento dos filhos */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Badges semanais */
.dtsingle .sheader .data .eptags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

/* Título */
.dtsingle .sheader .data h1 {
    font-size: clamp(1.6rem, 3.2vw, 2.6rem) !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    margin-bottom: 6px !important;
    color: #fff;
    text-shadow: 0 2px 14px rgba(0,0,0,0.7);
    text-overflow: unset !important;
    white-space: normal !important;
}

/* Título original */
.al-orig-title {
    font-size: 0.82rem;
    color: #888;
    margin: 0 0 12px !important;
    font-style: italic;
    letter-spacing: 0.02em;
}

/* ── Info chips: ano / temporadas / episódios / runtime ──────── */
.al-info-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.al-info-chips span {
    display: inline-flex;
    align-items: center;
    background: rgba(255,255,255,0.10);
    border-radius: 4px;
    padding: 3px 10px;
    font-size: 0.80rem;
    color: #ddd;
    white-space: nowrap;
    line-height: 1.4;
}

/* IMDb como chip especial dentro dos info-chips */
.al-imdb-chip {
    background: #f5c518 !important;
    color: #000 !important;
    font-weight: 700 !important;
    border-radius: 4px;
    padding: 3px 10px;
    font-size: 0.80rem;
    white-space: nowrap;
    line-height: 1.4;
}

/* ── Rating row: avaliação dos usuários ─────────────────────── */
.al-rating-row {
    margin-bottom: 10px;
}

.al-rating-row .starstruck-wrap,
.al-rating-row [class*="starstruck"] {
    margin: 0 !important;
}

/* ── Gêneros como pills ──────────────────────────────────────── */
.dtsingle .sheader .data .sgeneros {
    height: auto !important;
    overflow: visible !important;
    float: none !important;
    margin-top: 0;
    margin-bottom: 12px;
    display: flex !important;
    flex-wrap: wrap;
    gap: 6px;
    line-height: normal;
}

.dtsingle .sheader .data .sgeneros a {
    display: inline-block;
    padding: 4px 12px;
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 20px;
    font-size: 0.74rem;
    color: #ccc;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    white-space: nowrap;
}

.dtsingle .sheader .data .sgeneros a:hover {
    border-color: #fa8104;
    color: #fa8104;
    background: rgba(250,129,4,0.08);
}

/* ── Botão Favoritar (dentro de .data) ───────────────────────── */
.dtsingle .sheader .data .btn-favoritar {
    display: inline-flex !important;
    align-items: center;
    gap: 7px;
    width: auto !important;
    margin-top: 14px;
    padding: 9px 22px;
    font-size: 0.82rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.20);
    color: #ccc;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    white-space: nowrap;
}

.dtsingle .sheader .data .btn-favoritar:hover {
    background: rgba(255,255,255,0.14);
    border-color: rgba(255,255,255,0.40);
    color: #fff;
}

/* Active: gradiente sólido vermelho, texto branco */
.dtsingle .sheader .data .btn-favoritar.active {
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
    border-color: transparent;
    color: #fff;
}

/* ── Sinopse ─────────────────────────────────────────────────── */
.dtsingle .resumotemp .wp-content {
    text-align: left !important;
}

.dtsingle .resumotemp .wp-content p {
    text-align: left !important;
    line-height: 1.75;
    color: #ccc;
    margin-bottom: 10px;
}

.al-sinopse-label {
    font-size: 0.68rem !important;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #555 !important;
    margin: 0 0 6px !important;
    font-weight: 600;
}

/* ── Tablet ──────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .dtsingle .sheader {
        min-height: 420px;
    }
    .dtsingle .sheader .poster {
        width: 150px !important;
    }
}

/* ── Mobile ──────────────────────────────────────────────────── */
@media (max-width: 640px) {
    /* Backdrop como hero menor; conteúdo ancorado na base */
    .dtsingle .sheader {
        min-height: 260px;
        padding: 0 0 20px !important;
        align-items: flex-end;
    }

    /* Gradiente lateral forte (legibilidade do texto) + topo suave */
    .dtsingle .sheader::before {
        background:
            linear-gradient(to right,
                rgba(0,0,0,0.90) 0%,
                rgba(0,0,0,0.55) 50%,
                rgba(0,0,0,0.28) 100%
            ),
            linear-gradient(to bottom,
                rgba(0,0,0,0.52) 0%,
                rgba(0,0,0,0)    35%
            );
    }

    .dtsingle .sheader::after {
        height: 160px;
    }

    /* Row: poster esquerda + dados direita — base do backdrop */
    .dtsingle .sheader .sheader-inner {
        flex-direction: row;
        align-items: flex-end;
        gap: 12px;
        padding: 0 16px;
    }

    /* Poster compacto */
    .dtsingle .sheader .poster {
        width: 86px !important;
        flex-shrink: 0;
    }

    .dtsingle .sheader .poster img {
        border-radius: 8px;
        box-shadow: 0 6px 20px rgba(0,0,0,0.8);
    }

    /* Dados: preenche largura restante, sem overflow */
    .dtsingle .sheader .data {
        flex: 1;
        min-width: 0;
        padding: 0 0 3px !important;
        align-items: flex-start;
    }

    .dtsingle .sheader .data h1 {
        font-size: 0.95rem !important;
        line-height: 1.3 !important;
        margin-bottom: 5px !important;
    }

    /* Ocultar info secundária no mobile */
    .al-orig-title,
    .al-chip-episodes,
    .al-chip-runtime,
    .al-imdb-chip,
    .al-rating-row,
    .dtsingle .sheader .data .sgeneros {
        display: none !important;
    }

    /* Chips mínimos: ano · temporadas · IMDb */
    .al-info-chips {
        gap: 4px;
        margin-bottom: 6px;
    }

    .al-info-chips span {
        font-size: 0.68rem;
        padding: 2px 7px;
    }

    /* Eptags compactas */
    .dtsingle .sheader .data .eptags {
        gap: 5px;
        margin-top: 0;
        margin-bottom: 6px;
        flex-wrap: wrap;
    }

    /* Gêneros: pills menores, máx 2 linhas visíveis */
    .dtsingle .sheader .data .sgeneros {
        gap: 4px;
        margin-bottom: 10px;
        max-height: 54px;
        overflow: hidden !important;
    }

    .dtsingle .sheader .data .sgeneros a {
        font-size: 0.65rem;
        padding: 2px 9px;
    }

    /* Botão favoritar: integrado ao bloco de info */
    .dtsingle .sheader .data .btn-favoritar {
        margin-top: 8px;
        padding: 6px 16px;
        font-size: 0.74rem;
    }
}

/* ── Sinopse recolhível (mobile) ─────────────────────────────── */
.al-sinopse-toggle {
    display: none; /* escondido no desktop */
}

@media (max-width: 640px) {
    /* Label "Sinopse" redundante — o botão toggle já serve como label */
    .al-sinopse-label {
        display: none;
    }

    /* Botão toggle visível só no mobile */
    .al-sinopse-toggle {
        display: flex;
        align-items: center;
        gap: 6px;
        background: none;
        border: none;
        color: #888;
        font-size: 0.75rem;
        font-weight: 600;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        cursor: pointer;
        padding: 0;
        margin-bottom: 6px;
    }

    .al-sinopse-toggle .al-toggle-icon {
        font-size: 0.65rem;
        transition: transform 0.25s ease;
        display: inline-block;
    }

    .al-sinopse-toggle.open .al-toggle-icon {
        transform: rotate(180deg);
    }

    /* Conteúdo da sinopse: fechado por padrão no mobile */
    .dtsingle .resumotemp .al-sinopse-body {
        display: none;
        overflow: hidden;
    }

    .dtsingle .resumotemp .al-sinopse-body.open {
        display: block;
    }
}
