/* Tela de compra (/match) no celular: navegação por frames, acionamento e compra.
   Arquivo isolado: remover este CSS desfaz o visual sem tocar no app.css. */

/* ---------- Botões de 1 s (em pé) ---------- */
.va-step-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}

.va-step-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 64px;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .18);
    background: rgba(255, 255, 255, .06);
    color: #fff;
    font-weight: 700;
    font-size: .9rem;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

    .va-step-btn:active:not(:disabled) {
        background: rgba(124, 255, 0, .18);
        border-color: rgba(124, 255, 0, .45);
    }

    .va-step-btn:disabled {
        opacity: .35;
    }

.va-step-label {
    text-align: center;
    font-size: .86rem;
    color: rgba(255, 255, 255, .78);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- Retorno e dica dos dois toques ---------- */
.va-seek-flash {
    flex-direction: column;
    gap: 2px;
}

.va-seek-flash__label {
    font-size: .78rem;
    font-weight: 800;
    line-height: 1;
}

.va-tap-hint {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 7;
    display: flex;
    align-items: center;
    gap: 10px;
    width: max-content;
    max-width: min(88%, 420px);
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(0, 0, 0, .8);
    border: 1px solid rgba(255, 255, 255, .2);
    color: #fff;
    font-size: .88rem;
    line-height: 1.3;
    text-align: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity .25s ease;
}

    .va-tap-hint.is-visible {
        opacity: 1;
    }

.va-tap-hint__side {
    font-size: 1.4rem;
    font-weight: 800;
    color: #7CFF00;
}

/* ---------- Outros lances da arena (botão pequeno ao lado de Compartilhar) ---------- */
.va-arena-more {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    white-space: nowrap;
}

/* ---------- Barra fixa de compra (celular em pé) ---------- */
.va-sticky-buy {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1030;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: rgba(10, 10, 12, .96);
    border-top: 1px solid rgba(255, 255, 255, .12);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, .35);
    transition: transform .2s ease;
}

    .va-sticky-buy.is-covered {
        transform: translateY(110%);
    }

.va-sticky-buy__info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

    .va-sticky-buy__info strong {
        font-size: 1.1rem;
        color: #fff;
    }

    .va-sticky-buy__info span {
        font-size: .76rem;
        color: rgba(255, 255, 255, .7);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

.va-sticky-buy .btn {
    min-height: 46px;
    padding: 0 18px;
    font-weight: 800;
    white-space: nowrap;
}

/* Teclado aberto no nome do lance ou demonstração em tela cheia: some. */
body:has(#segmentNameInput:focus) .va-sticky-buy,
.va-video-fullscreen-active .va-sticky-buy {
    display: none !important;
}

@media (max-width: 991.98px) and (orientation: portrait) {
    /* Espaço para a barra fixa não cobrir o fim da página. */
    .match-page.va-land-ui {
        padding-bottom: 88px !important;
    }
}

/* ---------- Celular deitado ---------- */
.va-land-controls {
    display: none;
}

@media (max-width: 991.98px) and (orientation: landscape), (pointer: coarse) and (max-height: 600px) and (orientation: landscape) {
    .va-sticky-buy {
        display: none !important;
    }

    .match-page .va-land-controls {
        position: absolute;
        right: 10px;
        bottom: 10px;
        z-index: 6;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .match-page .va-land-btn {
        display: inline-flex;
        align-items: center;
        gap: 2px;
        min-width: 56px;
        min-height: 42px;
        padding: 0 10px;
        border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, .25);
        background: rgba(0, 0, 0, .62);
        color: #fff;
        font-weight: 700;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

        .match-page .va-land-btn:disabled {
            opacity: .4;
        }

    .match-page .va-land-buy {
        min-height: 42px;
        padding: 0 14px;
        border-radius: 12px;
        font-weight: 800;
        white-space: nowrap;
    }

    .match-page.va-land-ui.landscape-mode .va-step-row,
    .match-page.va-land-ui.landscape-mode .va-landscape-hint {
        display: none !important;
    }
}

/* ---------- Segurar para andar (setas e imagem) ---------- */
/* A largura de alguns celulares ultrapassa 992 px quando girados.
   Usa a mesma condição do JS e a altura dinâmica liberada pelo navegador. */
@media (max-width: 991.98px) and (orientation: landscape),
       (pointer: coarse) and (max-height: 600px) and (orientation: landscape) {
    .match-page .va-mobile-preview-shell {
        width: 100%;
        max-width: none;
        min-width: 0;
        margin-left: 0;
        margin-right: 0;
    }

    .match-page .segment-video.segment-video--match:not(.segment-video--match-video) {
        width: var(--va-preview-viewport-width, 100vw);
        max-width: var(--va-preview-viewport-width, 100vw);
        min-width: var(--va-preview-viewport-width, 100vw);
        margin-left: calc(50% - var(--va-preview-viewport-width, 100vw) / 2);
        margin-right: calc(50% - var(--va-preview-viewport-width, 100vw) / 2);
        height: calc(100vh - 4px) !important;
        height: calc(100dvh - 4px - env(safe-area-inset-bottom, 0px)) !important;
        min-height: 0 !important;
        max-height: none !important;
        aspect-ratio: auto !important;
        border-radius: 0;
    }

    .match-page .segment-video--match:not(.segment-video--match-video) .segment-preview-img--match {
        height: 100% !important;
        min-height: 0 !important;
    }

    .match-page .timeline-wrapper {
        padding-top: 4px;
        min-height: 44px;
        --timeline-track-center: 24px;
    }
}

/* Sem menu "salvar imagem", seleção ou arrastar a imagem ao segurar. */
.match-page #previewHost,
.match-page #previewHost img,
.match-page [data-hold-step] {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
}

/* ---------- Topo mais compacto (frames aparecem antes) ---------- */
.match-page .va-top-line {
    margin-bottom: .35rem;
}

.match-page .va-page-title {
    line-height: 1.1;
}

/* A panorâmica usa a proporção da área calibrada, inclusive no vôlei. */
@media (max-width: 767.98px) and (orientation: portrait) {
    .match-page .segment-video.segment-video--match.segment-video--wide-panoramic:not(.segment-video--match-video) {
        aspect-ratio: var(--va-panoramic-aspect, 16 / 5);
        max-height: none;
    }
}

/* Aviso curto, alinhado ao rótulo do enquadramento em portrait. */
.match-page .va-framing-label-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .45rem .65rem;
    margin-bottom: .5rem;
}
.match-page .va-framing-label-row .form-label { margin: 0; }
.match-page .va-rotate-inline { display: none; }
@media (max-width: 991.98px) and (orientation: portrait) {
    .match-page .va-rotate-inline {
        display: inline-flex;
        align-items: center;
        gap: .3rem;
        padding: .2rem .45rem;
        border: 1px solid rgba(124, 207, 31, .24);
        border-radius: 6px;
        background: rgba(124, 207, 31, .07);
        color: #b7df8b;
        font-family: inherit;
        font-size: .72rem;
        font-weight: 500;
        line-height: 1.2;
        white-space: nowrap;
    }
    .match-page .va-rotate-inline i { font-size: .9rem; }
}
/* Quick: abas Frames/Demonstração e instrução curta na mesma linha */
@media (max-width: 767.98px) {
    .match-page--quick .va-match-preview-switcher {
        flex-direction: row;
        align-items: center;
        flex-wrap: nowrap;
        gap: .5rem;
    }

    .match-page--quick .va-match-preview-tabs .va-cart-preview-tab {
        min-height: 32px;
        padding: 0 9px;
        gap: 5px;
        font-size: .8rem;
    }

    .match-page--quick .va-match-preview-help {
        flex: 1 1 0;
        min-width: 0;
        font-size: .76rem;
        line-height: 1.25;
    }

    /* Na demonstração o texto é longo: vai para a linha de baixo. */
    .match-page--quick .va-match-preview-switcher.is-video {
        flex-wrap: wrap;
    }

        .match-page--quick .va-match-preview-switcher.is-video .va-match-preview-help {
            flex-basis: 100%;
            margin-top: -.25rem;
        }
}
