﻿/* *********************************** Atualizações */

.bv-header-updates {
    min-width: 0;
}

/* *********************************** Lista dinâmica */

.bv-header-updates-dynamic {
    display: grid;
    gap: 20px;
}

.bv-header-updates-category-section {
    display: grid;
    gap: 11px;
    scroll-margin-top: 135px;
}

    .bv-header-updates-category-section > header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .bv-header-updates-category-section h4 {
        margin: 0;
        color: var(--bv-catalog-text);
        font-size: .8rem;
        line-height: 1.3;
        font-weight: 950;
    }

/*
 * A classe também é mantida aqui porque as seções dinâmicas
 * são criadas pelo JavaScript usando bv-header-updates-grid.
 */
.bv-header-updates-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 11px;
}

/* *********************************** Cards */

.bv-header-updates-card {
    height: 100%;
}

    .bv-header-updates-card.is-featured {
        border-color: rgba(255, 46, 147, .28);
    }

.bv-header-updates-card__open {
    width: 100%;
    height: 100%;
    min-height: 190px;
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.bv-header-updates-card__image {
    position: relative;
    height: 100%;
    min-height: 190px;
    overflow: hidden;
    background: #eff1f4;
}

    .bv-header-updates-card__image img {
        width: 100%;
        height: 100%;
        min-height: 190px;
        display: block;
        object-fit: cover;
        transition: transform 220ms ease;
    }

.bv-header-updates-card:hover
.bv-header-updates-card__image img {
    transform: scale(1.035);
}

.bv-header-updates-card__featured {
    position: absolute;
    top: 10px;
    left: 10px;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(24, 24, 30, .76);
    color: #fff;
    font-size: .56rem;
    font-weight: 900;
    box-shadow: 0 5px 14px rgba(0, 0, 0, .14);
    backdrop-filter: blur(9px);
}

    .bv-header-updates-card__featured[hidden] {
        display: none !important;
    }

.bv-header-updates-card__content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 15px;
}

.bv-header-updates-card__category {
    display: block;
    overflow: hidden;
    color: var(--bv-catalog-accent-dark);
    font-size: .58rem;
    line-height: 1.25;
    font-weight: 950;
    letter-spacing: .045em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.bv-header-updates-card__content > strong {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 6px;
    color: #292e37;
    font-size: .86rem;
    line-height: 1.34;
    font-weight: 950;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.bv-header-updates-card__description {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 8px;
    color: var(--bv-catalog-muted);
    font-size: .66rem;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

    .bv-header-updates-card__description[hidden] {
        display: none !important;
    }

.bv-header-updates-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
    margin-top: auto;
    padding-top: 13px;
    color: #7a818c;
    font-size: .61rem;
    font-weight: 850;
}

    .bv-header-updates-card__meta > span {
        display: inline-flex;
        align-items: center;
        gap: 5px;
    }

        .bv-header-updates-card__meta > span:last-child {
            color: var(--bv-catalog-accent-dark);
            font-weight: 950;
        }

/* *********************************** Categorias */

.bv-header-updates-categories button.is-active {
    box-shadow: 0 7px 17px rgba(255, 46, 147, .2);
}

/* *********************************** Seções */

.bv-header-updates-section.is-highlight
.bv-header-updates-section__header > div > span {
    background: rgba(255, 46, 147, .1);
    color: var(--bv-catalog-accent-dark);
}

.bv-header-updates-section.is-popular
.bv-header-updates-section__header > div > span {
    background: rgba(255, 46, 147, .1);
    color: var(--bv-catalog-accent-dark);
}

/*
 * Nenhum card ocupa duas colunas.
 * Todos os destaques têm a mesma largura.
 */
.bv-header-updates-section.is-highlight
.bv-header-updates-card,
.bv-header-updates-section.is-popular
.bv-header-updates-card {
    grid-column: auto;
}

/* *********************************** Carregamento */

.bv-header-updates-more {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

.bv-header-updates-loading,
.bv-header-updates-end {
    margin-top: 14px;
}

    .bv-header-updates-end i {
        color: #168a4d;
    }

.bv-header-updates-button:disabled {
    cursor: wait;
    opacity: .7;
}

/* *********************************** Catálogo completo */

.bv-header-updates-full {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    border: 1px solid rgba(255, 46, 147, .16);
    border-radius: 22px;
    background: radial-gradient( circle at 90% 0, rgba(255, 46, 147, .11), transparent 38% ), linear-gradient( 135deg, rgba(255, 46, 147, .055), #fff );
}

    .bv-header-updates-full > div {
        min-width: 0;
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr);
        align-items: center;
        gap: 11px;
    }

        .bv-header-updates-full > div > span {
            width: 44px;
            height: 44px;
            display: grid;
            place-items: center;
            border-radius: 15px;
            background: var(--bv-catalog-accent-soft);
            color: var(--bv-catalog-accent-dark);
        }

    .bv-header-updates-full strong {
        display: block;
        color: var(--bv-catalog-text);
        font-size: .79rem;
        line-height: 1.35;
        font-weight: 950;
    }

    .bv-header-updates-full p {
        margin: 3px 0 0;
        color: var(--bv-catalog-muted);
        font-size: .65rem;
        line-height: 1.45;
    }

/* *********************************** Vazio */

.bv-header-updates-empty h3 {
    margin: 14px 0 0;
    color: var(--bv-catalog-text);
    font-size: .97rem;
    font-weight: 950;
}

.bv-header-updates-empty p {
    max-width: 470px;
    margin: 7px 0 0;
    color: var(--bv-catalog-muted);
    font-size: .73rem;
    line-height: 1.55;
}

/* *********************************** Modal */

.bv-header-updates-modal {
    position: fixed;
    z-index: 2147483000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 180ms ease, visibility 180ms ease;
}

    .bv-header-updates-modal[hidden] {
        display: none !important;
    }

    .bv-header-updates-modal.is-open {
        opacity: 1;
        visibility: visible;
    }

.bv-header-updates-modal__backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(10, 13, 21, .74);
    backdrop-filter: blur(8px);
    cursor: default;
}

.bv-header-updates-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(760px, 100%);
    max-height: min(90dvh, 780px);
    display: grid;
    grid-template-columns: minmax(260px, 42%) minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .8);
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(7, 11, 20, .35);
}

.bv-header-updates-modal__close {
    position: absolute;
    z-index: 3;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .94);
    color: #282d35;
    box-shadow: 0 6px 18px rgba(10, 15, 24, .13);
    cursor: pointer;
}

    .bv-header-updates-modal__close:hover {
        background: #fff;
        color: var(--bv-catalog-accent-dark);
    }

.bv-header-updates-modal__image {
    min-height: 460px;
    background: #eef0f4;
}

    .bv-header-updates-modal__image img {
        width: 100%;
        height: 100%;
        min-height: 460px;
        display: block;
        object-fit: cover;
    }

.bv-header-updates-modal__content {
    min-width: 0;
    max-height: min(90dvh, 780px);
    overflow-y: auto;
    padding: 28px;
}

.bv-header-updates-modal__category {
    display: block;
    margin-right: 45px;
    color: var(--bv-catalog-accent-dark);
    font-size: .62rem;
    line-height: 1.3;
    font-weight: 950;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.bv-header-updates-modal__content h3 {
    margin: 7px 45px 0 0;
    color: #242932;
    font-size: 1.2rem;
    line-height: 1.25;
    font-weight: 950;
}

.bv-header-updates-modal__description {
    margin-top: 15px;
    color: #59616e;
    font-size: .76rem;
    line-height: 1.7;
}

    .bv-header-updates-modal__description strong {
        color: #252a33;
        font-weight: 950;
    }

.bv-header-updates-modal__feedback {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 20px;
    padding: 11px;
    border: 1px solid rgba(255, 46, 147, .14);
    border-radius: 15px;
    background: rgba(255, 46, 147, .045);
}

    .bv-header-updates-modal__feedback button {
        min-height: 39px;
        display: inline-flex;
        align-items: center;
        gap: 7px;
        padding: 0 13px;
        border: 1px solid rgba(255, 46, 147, .24);
        border-radius: 12px;
        background: #fff;
        color: var(--bv-catalog-accent-dark);
        font: inherit;
        font-size: .66rem;
        font-weight: 900;
        cursor: pointer;
    }

        .bv-header-updates-modal__feedback button:hover {
            border-color: var(--bv-catalog-accent);
            background: var(--bv-catalog-accent-softer);
        }

        .bv-header-updates-modal__feedback button.is-voted {
            border-color: var(--bv-catalog-accent);
            background: var(--bv-catalog-accent);
            color: #fff;
        }

    .bv-header-updates-modal__feedback > span {
        color: #6c7480;
        font-size: .65rem;
        font-weight: 850;
    }

.bv-header-updates-modal__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
}

html.bv-header-updates-no-scroll,
html.bv-header-updates-no-scroll body {
    overflow: hidden !important;
}

/* *********************************** Tablet */

@media (max-width: 900px) {
    .bv-header-updates-card__open {
        grid-template-columns: 130px minmax(0, 1fr);
    }
}

/* *********************************** Celular */

@media (max-width: 760px) {
    .bv-header-updates-grid {
        grid-template-columns: 1fr;
    }

    .bv-header-updates-full {
        align-items: stretch;
        flex-direction: column;
    }

        .bv-header-updates-full .bv-header-updates-button {
            width: 100%;
        }

    .bv-header-updates-modal__dialog {
        width: min(560px, 100%);
        grid-template-columns: 1fr;
        overflow-y: auto;
    }

    .bv-header-updates-modal__image {
        min-height: 260px;
        max-height: 38dvh;
    }

        .bv-header-updates-modal__image img {
            min-height: 260px;
            max-height: 38dvh;
        }

    .bv-header-updates-modal__content {
        overflow: visible;
    }
}

@media (max-width: 560px) {
    .bv-header-updates-card__open {
        min-height: 145px;
        grid-template-columns: 112px minmax(0, 1fr);
    }

    .bv-header-updates-card__image,
    .bv-header-updates-card__image img {
        min-height: 145px;
    }

    .bv-header-updates-card__content {
        padding: 13px;
    }

    .bv-header-updates-card__description {
        -webkit-line-clamp: 2;
    }

    .bv-header-updates-modal {
        align-items: end;
        padding: 0;
    }

    .bv-header-updates-modal__dialog {
        width: 100%;
        max-height: 94dvh;
        border-radius: 24px 24px 0 0;
    }

    .bv-header-updates-modal__image {
        min-height: 220px;
        max-height: 32dvh;
    }

        .bv-header-updates-modal__image img {
            min-height: 220px;
            max-height: 32dvh;
        }

    .bv-header-updates-modal__content {
        padding: 20px;
    }

    .bv-header-updates-modal__actions {
        display: grid;
        grid-template-columns: 1fr;
    }

        .bv-header-updates-modal__actions
        .bv-header-updates-button {
            width: 100%;
        }
}

/* *********************************** Acessibilidade */

@media (prefers-reduced-motion: reduce) {
    .bv-header-updates *,
    .bv-header-updates *::before,
    .bv-header-updates *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
