/*
 * Bridge CSS — classes legadas do tema antigo (Maxton) ainda usadas pelo
 * conteudo nao-migrado. So utilitarios de CONTEUDO; o shell e do UBold.
 * Carregado pelo ubold.layout depois do app.min.css.
 */

/* avatar redondo em listagens (clientes, etc.) */
.img-round {
    height: 30px;
    width: 30px;
    object-fit: cover;
    border-radius: 50%;
}

/* wrapper de conteudo das telas */
.page-content {
    padding: 1.5rem;
}
@media (max-width: 767px) {
    .page-content {
        padding: 1rem;
    }
}

/* listagens com scroll interno + cabecalho fixo (a altura real e ajustada por JS no layout) */
.tbl-400 {
    height: auto !important;
    max-height: calc(100vh - 400px);
    min-height: 240px;
    overflow-y: auto;
}
.tbl-400 thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    /* UBold usa --theme-* (nao --bs-*); secondary-bg = superficie do card,
       adapta a tema (claro/escuro) E skin (galaxy, retro, etc.) */
    background: var(--theme-secondary-bg, #fff);
}

/* ============================================================
 * Dark mode: corrige cores fixas (claras) de conteudo que nao
 * adaptam sozinhas. Prefixo [data-bs-theme=dark] + classe tem
 * especificidade maior que o <style> da pagina -> vence sem
 * precisar editar cada view. Usa os tokens reais do UBold (--theme-*).
 * ============================================================ */

/* classes Bootstrap de cor fixa (nao invertem com data-bs-theme) */
[data-bs-theme="dark"] .bg-white {
    background-color: var(--theme-secondary-bg) !important;
}
[data-bs-theme="dark"] .bg-light {
    background-color: var(--theme-tertiary-bg) !important;
}

/* IA - Agente Virtual (resources/views/ia/agent.blade.php) */
[data-bs-theme="dark"] .ai-chat-wrapper,
[data-bs-theme="dark"] .ai-chat-input {
    background: var(--theme-body-bg);
    border-color: var(--theme-border-color);
}
[data-bs-theme="dark"] .ai-chat-messages {
    background: var(--theme-tertiary-bg);
}
[data-bs-theme="dark"] .ai-message-bubble {
    background: var(--theme-secondary-bg);
}

/* Faturas do sistema - modal (resources/views/faturas_sistema/index.blade.php) */
[data-bs-theme="dark"] .cg-modal-content {
    background: var(--theme-secondary-bg);
}

/* Delivery - badge outline (resources/views/produtos_delivery/complementos_edit.blade.php) */
[data-bs-theme="dark"] .complementos-page .badge-outline {
    background: transparent;
}

/* PDV: alterna elementos por viewport (substitui regras do style.css antigo removido) */
@media (min-width: 1025px) {
    .is-mobile { display: none !important; }
}
@media (max-width: 480px) {
    .is-desktop { display: none !important; }
}
