/*
 * Band Vídeo.
 *
 * CSS à mão, com as cores do portal — o tema usa Tailwind compilado e um
 * plugin não pode depender de recompilar o build dele.
 */

.bandvid {
    --bv-vermelho: #d8151f;
    --bv-vermelho-escuro: #a30f16;
    --bv-tinta: #101216;
    --bv-suave: #6b7078;
    --bv-linha: #e4e1d8;

    margin: 34px 0;
    max-width: 100%;
    scroll-margin-top: 120px;
}

.bandvid__palco {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 16px;
    background: #08213e;
    cursor: pointer;
    /* o isolate segura os cantos arredondados por cima do iframe no Safari */
    isolation: isolate;
}

.bandvid__palco:fullscreen { border-radius: 0; }

.bandvid__capa {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .6s cubic-bezier(.2, .7, .3, 1), filter .3s ease;
}

.bandvid__palco:hover .bandvid__capa { transform: scale(1.03); }

.bandvid__veu {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(60% 60% at 50% 45%, rgba(0, 0, 0, .12) 0%, rgba(0, 0, 0, .42) 100%),
        linear-gradient(to top, rgba(0, 0, 0, .78) 0%, rgba(0, 0, 0, .18) 42%, transparent 70%);
    transition: opacity .3s ease;
}

/* o botão de play */
.bandvid__play {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    padding: 0;
}

.bandvid__play-disco {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 82px;
    height: 82px;
    border-radius: 999px;
    background: var(--bv-vermelho);
    box-shadow: 0 0 0 0 rgba(216, 21, 31, .55), 0 18px 40px rgba(0, 0, 0, .45);
    transition: transform .25s cubic-bezier(.2, .8, .3, 1), background-color .25s ease, box-shadow .35s ease;
}

.bandvid__play-disco svg { width: 34px; height: 34px; margin-left: 4px; }

.bandvid__play:hover .bandvid__play-disco {
    transform: scale(1.08);
    background: var(--bv-vermelho-escuro);
    box-shadow: 0 0 0 14px rgba(216, 21, 31, .16), 0 18px 40px rgba(0, 0, 0, .5);
}

.bandvid__play:active .bandvid__play-disco { transform: scale(.97); }

.bandvid__play:focus-visible { outline: 3px solid #fff; outline-offset: -6px; }

.bandvid__play-texto {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .24em;
    text-transform: uppercase;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .6);
}

/* o selo da casa */
.bandvid__selo {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(8, 33, 62, .82);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    padding: 7px 12px;
}

.bandvid__selo b { font-weight: 900; color: #fff; }
.bandvid--instagram .bandvid__selo { background: rgba(0, 0, 0, .72); }

.bandvid__titulo {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 18px;
    z-index: 4;
    color: #fff;
    font-family: Fraunces, Georgia, "Times New Roman", serif;
    font-size: 22px;
    font-weight: 900;
    line-height: 1.15;
    text-shadow: 0 2px 16px rgba(0, 0, 0, .6);
}

/* o iframe entra aqui, e só depois do clique */
.bandvid__quadro {
    position: absolute;
    inset: 0;
    z-index: 2;
    opacity: 0;
    transition: opacity .35s ease;
}

.bandvid__quadro iframe { width: 100%; height: 100%; border: 0; display: block; }

/*
 * Enquanto o YouTube não começou a tocar, o iframe fica invisível: é a capa
 * dele, com o play dele, que estaria aparecendo aí. Só revelamos o quadro no
 * primeiro instante de PLAYING.
 */
.bandvid.is-tocando .bandvid__quadro { opacity: 1; }
.bandvid.is-ligado .bandvid__play,
.bandvid.is-ligado .bandvid__veu,
.bandvid.is-ligado .bandvid__titulo { opacity: 0; pointer-events: none; }
.bandvid.is-ligado .bandvid__capa { filter: blur(8px) brightness(.5); transform: scale(1.06); }
.bandvid.is-tocando .bandvid__capa { display: none; }
.bandvid.is-tocando .bandvid__selo { opacity: 0; transition: opacity .3s ease; }
.bandvid__palco:hover .bandvid__selo { opacity: 1; }

/* rodinha de carregando */
.bandvid.is-carregando .bandvid__play { opacity: 1; }

.bandvid.is-carregando .bandvid__play-disco {
    animation: bandvid-pulso 1.1s ease-in-out infinite;
}

.bandvid.is-carregando .bandvid__play-texto { opacity: 0; }
.bandvid.is-tocando .bandvid__play { display: none; }

@keyframes bandvid-pulso {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(.9); opacity: .55; }
}

/* ── a nossa barra de controles ──────────────────────────────────────── */

.bandvid__controles {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 26px 16px 12px;
    background: linear-gradient(to top, rgba(0, 0, 0, .88) 0%, rgba(0, 0, 0, .45) 55%, transparent 100%);
    color: #fff;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .25s ease, transform .25s ease;
}

.bandvid__palco:hover .bandvid__controles,
.bandvid__controles:focus-within,
.bandvid.is-pausado .bandvid__controles { opacity: 1; transform: translateY(0); }

.bandvid__bt {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    padding: 0;
    opacity: .9;
    transition: opacity .18s ease, transform .18s ease;
}

.bandvid__bt:hover { opacity: 1; transform: scale(1.08); }
.bandvid__bt svg { width: 22px; height: 22px; }

.bandvid__ico-play, .bandvid__ico-mudo { display: none; }
.bandvid.is-pausado .bandvid__ico-play { display: block; }
.bandvid.is-pausado .bandvid__ico-pausa { display: none; }
.bandvid.is-mudo .bandvid__ico-mudo { display: block; }
.bandvid.is-mudo .bandvid__ico-som { display: none; }

.bandvid__tempo {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: .03em;
    min-width: 38px;
    text-align: center;
}

.bandvid__linha {
    position: relative;
    flex: 1 1 auto;
    height: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.bandvid__trilho, .bandvid__cheio {
    position: absolute;
    left: 0;
    height: 4px;
    border-radius: 999px;
}

.bandvid__trilho { right: 0; background: rgba(255, 255, 255, .28); }
.bandvid__cheio { width: 0; background: var(--bv-vermelho); }

.bandvid__bolinha {
    position: absolute;
    left: 0;
    width: 12px;
    height: 12px;
    margin-left: -6px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 1px 6px rgba(0, 0, 0, .5);
    transform: scale(0);
    transition: transform .18s ease;
}

.bandvid__linha:hover .bandvid__bolinha,
.bandvid__linha:focus-visible .bandvid__bolinha { transform: scale(1); }
.bandvid__linha:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 4px; }

/* ── legenda e compartilhar ──────────────────────────────────────────── */

.bandvid__legenda {
    margin: 11px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--bv-suave);
}

.bandvid__credito {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

/*
 * A barra flutua no canto de cima do vídeo e só aparece com o mouse em cima.
 * Em tela de toque não existe hover — lá ela fica sempre visível (ver o bloco
 * @media (hover: none) no fim do arquivo).
 */
.bandvid__share {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 7;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 8px;
    border-radius: 999px;
    background: rgba(8, 13, 20, .58);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .3);
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity .22s ease, transform .22s ease;
}

.bandvid__palco:hover .bandvid__share,
.bandvid__share:focus-within {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* o rótulo fica só para leitor de tela */
.bandvid__share-rotulo {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.bandvid__share-bt {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #fff;
    cursor: pointer;
    padding: 0;
    transition: background-color .18s ease, transform .18s ease;
}

.bandvid__share-bt svg { width: 16px; height: 16px; }
.bandvid__share-bt:hover { transform: scale(1.12); }
.bandvid__share-bt:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.bandvid__share-bt--whatsapp:hover { background: #25d366; }
.bandvid__share-bt--x:hover { background: #000; }
.bandvid__share-bt--facebook:hover { background: #1877f2; }
.bandvid__share-bt--telegram:hover { background: #26a5e4; }
.bandvid__share-bt--copiar:hover { background: var(--bv-vermelho); }

.bandvid__share-recado {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    white-space: nowrap;
    font-size: 11.5px;
    font-weight: 700;
    color: #fff;
    background: rgba(8, 13, 20, .78);
    padding: 5px 10px;
    border-radius: 999px;
}

.bandvid__share-recado:empty { display: none; }

/* ── o cartão do Instagram ───────────────────────────────────────────── */

.bandvid--instagram .bandvid__palco {
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #3f1a6e 0%, #b3237f 48%, #f28b2c 100%);
}

.bandvid--instagram .bandvid__play-disco {
    background: rgba(255, 255, 255, .16);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .5), 0 18px 40px rgba(0, 0, 0, .35);
}

.bandvid--instagram .bandvid__play:hover .bandvid__play-disco {
    background: rgba(255, 255, 255, .28);
    box-shadow: 0 0 0 2px #fff, 0 18px 40px rgba(0, 0, 0, .4);
}

/* a janela do Instagram */
.bandvid-travado { overflow: hidden; }

.bandvid-janela { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; }
.bandvid-janela__fundo { position: absolute; inset: 0; background: rgba(8, 13, 20, .92); }

.bandvid-janela__corpo {
    position: relative;
    z-index: 2;
    width: min(420px, 92vw);
    height: min(760px, 88vh);
    background: #fff;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}

.bandvid-janela__corpo iframe { width: 100%; height: 100%; border: 0; display: block; }

.bandvid-janela__fechar {
    position: absolute;
    top: -46px;
    right: 0;
    width: 38px;
    height: 38px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

@media (hover: none) {
    .bandvid__share { opacity: 1; transform: none; pointer-events: auto; }
    .bandvid__controles { opacity: 1; transform: none; }
}

@media (max-width: 560px) {
    .bandvid { margin: 26px 0; }
    .bandvid__palco { border-radius: 12px; }
    .bandvid__share { top: 10px; right: 10px; gap: 2px; padding: 5px 6px; }
    .bandvid__share-bt { width: 30px; height: 30px; }
    .bandvid__play-disco { width: 62px; height: 62px; }
    .bandvid__play-disco svg { width: 26px; height: 26px; }
    .bandvid__titulo { font-size: 17px; }
    .bandvid__controles { gap: 8px; padding: 22px 10px 9px; }
    .bandvid__tempo { min-width: 34px; font-size: 11px; }
    .bandvid__share-rotulo { width: 100%; margin-bottom: 2px; }
}
