﻿/* =========================================================
   Belovety UI Base
   Corrige variáveis globais, botões primários e z-index
   ========================================================= */

:root {
    --bv-accent: #ff007f;
    --bv-accent-dark: #d9006f;
    --bv-branco: #ffffff;
    --bv-texto: #202020;
    --bv-borda: #eeeeee;
    --bv-danger: #dc2626;
}
/* Quando qualquer tela setar --cor-principal, a hierarquia continua funcionando */
[data-bv-accent],
.bv-page-accent {
    --bv-accent: var(--cor-principal, var(--cor_principal, #ff007f));
    --bv-accent-dark: color-mix(in srgb, var(--bv-accent) 82%, #000 18%);
}

/* =========================================================
   Botões primários Belovety
   Safety net global: impede botão invisível em modais
   ========================================================= */

.bv-primary,
.bv-btn-primary,
.bv-feedback-modal__button,
.bv-confirm-confirm--primary,
.bv-confirm-confirm--sucesso,
.bv-confirm-confirm--success,
.bv-delivery-primary-btn,
.bv-delivery-pedidos-primary-btn,
.bv-delivery-hist-primary-btn,
.bv-fin-primary-btn,
.bv-baixa-add-btn,
.bv-crop-btn-primary {
    background: var(--bv-accent, #ff007f) !important;
    border-color: var(--bv-accent, #ff007f) !important;
    color: #ffffff !important;
}

    .bv-primary:hover,
    .bv-btn-primary:hover,
    .bv-feedback-modal__button:hover,
    .bv-confirm-confirm--primary:hover,
    .bv-confirm-confirm--sucesso:hover,
    .bv-confirm-confirm--success:hover,
    .bv-delivery-primary-btn:hover,
    .bv-delivery-pedidos-primary-btn:hover,
    .bv-delivery-hist-primary-btn:hover,
    .bv-fin-primary-btn:hover,
    .bv-baixa-add-btn:hover,
    .bv-crop-btn-primary:hover {
        background: var(--bv-accent-dark, #d9006f) !important;
        border-color: var(--bv-accent-dark, #d9006f) !important;
        color: #ffffff !important;
    }

    /* Botão primário desabilitado continua visível, mas sem parecer clicável */
    .bv-primary:disabled,
    .bv-btn-primary:disabled,
    .bv-feedback-modal__button:disabled,
    .bv-confirm-confirm:disabled,
    .bv-delivery-primary-btn:disabled,
    .bv-delivery-pedidos-primary-btn:disabled,
    .bv-delivery-hist-primary-btn:disabled,
    .bv-fin-primary-btn:disabled,
    .bv-baixa-add-btn:disabled,
    .bv-crop-btn-primary:disabled {
        opacity: .55 !important;
        cursor: not-allowed !important;
        pointer-events: none !important;
    }

/* =========================================================
   Botões danger/success globais de confirmação
   ========================================================= */

.bv-confirm-confirm--danger,
.bv-danger,
.bv-btn-danger {
    background: var(--bv-danger, #dc2626) !important;
    border-color: var(--bv-danger, #dc2626) !important;
    color: #ffffff !important;
}

.bv-confirm-confirm--warning {
    background: #d97706 !important;
    border-color: #d97706 !important;
    color: #ffffff !important;
}

.bv-confirm-confirm--success,
.bv-confirm-confirm--sucesso {
    background: #167044 !important;
    border-color: #167044 !important;
    color: #ffffff !important;
}

/* =========================================================
   Feedback / Confirm sempre acima das modais de tela
   ========================================================= */

#bvFeedbackOverlay {
    z-index: 999998 !important;
}

#bvFeedbackHost {
    z-index: 999999 !important;
}

/* =========================================================
   Modais de tela ficam abaixo do feedback global
   ========================================================= */

.bv-delivery-modal-overlay,
.bv-delivery-chat-overlay,
.bv-delivery-client-modal,
.bv-delivery-hist-modal,
.bv-fin-modal {
    --cor-principal: var(--bv-accent, var(--cor_principal, #ff007f));
    --cor-principal-dark: var(--bv-accent-dark, #d9006f);
    z-index: 9990;
}
