/* Página de vídeos — refinamentos visuais escopados em .vp-page.
   As bases sp-* vêm de suporte-page.css (compartilhadas com as páginas de
   suporte); tudo aqui sobrescreve apenas dentro de .vp-page para não vazar. */

/* ===== Player embutido: a thumb (.yt-thumb) vira iframe ao clicar ===== */
.yt-thumb iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ===== Hero ===== */
/* !important para vencer body.dark-theme .section-gamer p de component-overrides.css */
body:not(.light-theme) .vp-page .sp-lede {
    color: #b8cfdd !important;
}

.vp-page .sp-chip {
    font-size: 0.78rem;
    padding: 0.4rem 0.85rem;
}

.vp-page .sp-chip i {
    color: var(--neon-blue);
}

/* ===== Cabeçalho da seção da biblioteca ===== */
.vp-page .sp-section-head {
    margin-bottom: 2rem;
}

.vp-page .sp-section-head h2 {
    margin-bottom: 0.35rem;
}

.vp-page .sp-section-head p {
    margin: 0;
}

/* ===== Thumbs: moldura, vinheta e play centralizado =====
   As capas vêm do YouTube com fundo claro e destoavam do tema escuro;
   a vinheta inferior e a moldura interna integram qualquer capa ao layout. */
.vp-page .sp-video-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(5, 11, 20, 0.12) 0%, rgba(5, 11, 20, 0) 32%, rgba(5, 11, 20, 0.5) 100%);
    box-shadow: inset 0 0 0 1px rgba(0, 255, 234, 0.16);
}

.vp-page .sp-video-thumb img {
    transition: transform 0.35s ease;
}

.vp-page .sp-video-thumb:hover img,
.vp-page .sp-video-thumb:focus-visible img {
    transform: scale(1.04);
}

.vp-page .sp-video-play {
    inset: 0;
    margin: auto;
    width: 54px;
    height: 54px;
    border-radius: 999px;
    font-size: 1.5rem;
    background: rgba(5, 11, 20, 0.74);
    border: 1px solid rgba(0, 255, 234, 0.55);
    color: var(--neon-blue);
    box-shadow: 0 0 22px rgba(0, 255, 234, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 1;
}

.vp-page .sp-video-thumb:hover .sp-video-play,
.vp-page .sp-video-thumb:focus-visible .sp-video-play {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(0, 255, 234, 0.5);
}

/* ===== Destaque ===== */
.vp-page .sp-video-feature {
    margin-bottom: 2.5rem;
}

.vp-page .sp-video-feature-card {
    padding: clamp(1.25rem, 3vw, 2rem);
}

.vp-page .sp-video-feature-layout {
    gap: clamp(1.25rem, 3vw, 2.5rem);
}

/* Acima do breakpoint em que suporte-page.css empilha o layout (991px) */
@media (min-width: 992px) {
    .vp-page .sp-video-feature-layout {
        grid-template-columns: minmax(0, 520px) minmax(0, 1fr);
    }
}

.vp-page .sp-video-feature-body h3 {
    font-size: clamp(1.3rem, 2.4vw, 1.7rem);
    margin-bottom: 0.6rem;
}

.vp-page .sp-video-feature-body p {
    color: var(--text-tech);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0;
}

.vp-page .sp-video-actions {
    margin-top: 1.25rem;
}

/* ===== Grade de vídeos ===== */
.vp-page .sp-video-grid--compact {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.25rem;
}

.vp-page .sp-video-card {
    padding: 1.15rem;
    gap: 0.85rem;
}

.vp-page .sp-video-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.vp-page .sp-video-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* !important para restaurar o clamp anulado por .sp-video-desc { ... initial !important }
   em component-overrides.css (sem isso, descrições longas criam vazios desiguais nos cards) */
.vp-page .sp-video-desc {
    font-size: 0.9rem;
    line-height: 1.55;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

.vp-page .sp-video-btn {
    margin-top: auto;
    width: 100%;
    min-width: 0;
    font-size: 0.85rem;
}

/* ===== Modal de detalhes ===== */
.vp-page .modal-body .sp-video-actions {
    margin-top: 1rem;
}

/* Área de toque do X: 14px do glifo + 2x15px = 44px (alvo mínimo recomendado) */
.vp-page .modal .btn-close {
    padding: 15px;
}

/* ===== Tema claro =====
   Overrides escopados para defeitos de affordance herdados do tema global:
   X branco sobre modal branco, play diluído e ícone do botão primário invisível. */
body.light-theme .vp-page .modal .btn-close {
    filter: none !important;
}

body.light-theme .vp-page .sp-video-play {
    background: rgba(11, 56, 71, 0.78) !important;
    border-color: rgba(13, 109, 140, 0.6) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.25) !important;
}

/* No claro o botão primário rende vidro branco com texto escuro (regra global tardia),
   mas o disco do ícone fica branco com glifo branco — alinha ao padrão teal dos secundários */
body.light-theme:not(.dashboard-body):not(.auth-app) main .vp-page :is(a, button).btn-tech-outline.btn-prioridade > :is(i, svg):first-child {
    background: rgba(13, 109, 140, 0.12) !important;
    border-color: rgba(13, 109, 140, 0.35) !important;
    color: #0f6d8c !important;
}

/* ===== Ajustes mobile ===== */
@media (max-width: 576px) {
    .vp-page .sp-video-play {
        width: 48px;
        height: 48px;
        font-size: 1.3rem;
    }

    .vp-page .sp-video-card {
        padding: 1rem;
    }

    .vp-page .sp-video-feature {
        margin-bottom: 2rem;
    }

    .vp-page .sp-video-actions {
        flex-direction: column;
        align-items: stretch;
    }
}
