
/* ====================================================================
   LOGO SIZING — Constrains navbar images to prevent gigantic rendering
   ==================================================================== */
.navbar-logo-img {
    max-height: clamp(1.75rem, 2.5vw, 2.5rem); /* 28–40px */
    height: auto;
    width: auto;
    max-width: 100%;
}

.pref-logo-img {
    max-height: clamp(1.75rem, 2.5vw, 2.5rem); /* 28–40px - MESMO TAMANHO */
    height: auto;
    width: auto;
    max-width: 100%;
    filter: brightness(0) invert(1);
}

/************************************************************************************/
.card-view-label{
    top:-12px;
    font-size: .9rem
}
.header-publico, footer, .cobea-header {
    background-color: var(--color-secondary) !important;
    padding-top: 20px;
    padding-bottom: 20px;
    color: var(--text-on-dark);
}

/* ====================================================================
   LAYOUT GLOBAL - NAVBAR E CONTAINER
   ==================================================================== */

/* O header usa CSS Grid para posicionar: [Logo COBEA] [Nav Central] [Logo Prefeitura] */
.cobea-header {
    height: var(--navbar-height);
    background-color: var(--color-secondary);
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    border: none;
}

@media (min-width: 1251px) {
    .cobea-header {
        grid-template-columns: 1fr var(--container-width) 1fr;
    }
}

/* Mobile Grid: Oculta logos laterais (< 1250px) */
@media (max-width: 1250px) {
    .cobea-header {
        grid-template-columns: 1fr;
    }
    
    .cobea-header > div:first-child,
    .cobea-header > div:last-child {
        display: none !important;
    }
}

.navbar-container-cobea {
    max-width: var(--container-width);
    margin: 0 auto;
    width: 100%;
}

/* Container: alinhamento com o navbar */
.container {
    max-width: var(--container-width) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: var(--container-padding) !important;
    padding-right: var(--container-padding) !important;
}

/* ====================================================================
   RESPONSIVIDADE DO CONTAINER (atualiza tokens por breakpoint)
   ==================================================================== */

@media (min-width: 1080px) {
    :root { --container-width: 68.75rem; } /* 1100px */
}

@media (min-width: 1366px) {
    :root { --container-width: 75rem; } /* 1200px */
}

/* ====================================================================
   CUSTOM BREAKPOINT (1250px) - UTILITÁRIOS DO NAVBAR COBEA
   ==================================================================== */

/* Mobile/Tablet (< 1251px) - PADRÃO */
.d-cobea-none { display: none !important; }
.d-cobea-flex { display: flex !important; }
.navbar-expand-cobea .navbar-toggler { display: block !important; }
.navbar-expand-cobea .navbar-collapse { display: none !important; }
.navbar-expand-cobea .navbar-collapse.show { display: block !important; }
.flex-cobea-row { flex-direction: column !important; }
.align-items-cobea-center { align-items: flex-start !important; }
.bg-cobea-transparent { background-color: var(--color-secondary) !important; }
.ml-cobea-auto { margin-left: 0 !important; }

/* Garante layout mobile correto para menus */
.navbar-collapse-cobea {
    flex-direction: column !important;
    align-items: flex-start !important;
    width: 100% !important;
    height: auto !important;
}

.navbar-collapse-cobea .navbar-nav {
    flex-direction: column !important;
    width: 100% !important;
    align-items: flex-start !important;
    margin-left: 0 !important;
    gap: 0 !important;
}

.mobile-logo {
    max-height: 1.75rem !important;
    height: auto !important;
    width: auto !important;
}

/* Garante comportamento correto no intervalo 992px-1250px */
@media (min-width: 992px) and (max-width: 1250px) {
    .navbar-expand-cobea .navbar-toggler { 
        display: block !important;
        z-index: 1050;
    }
    
    .navbar-expand-cobea .navbar-collapse { 
        display: none !important;
    }
    
    .navbar-expand-cobea .navbar-collapse.show { 
        display: block !important;
    }
    
    .d-cobea-none { display: none !important; }
    .d-cobea-flex { display: flex !important; }
    .flex-cobea-row { flex-direction: column !important; }
    .align-items-cobea-center { align-items: flex-start !important; }
    
    /* CRITICAL: Override Bootstrap 4 d-lg-none to show mobile nav in this breakpoint */
    .d-lg-none {
        display: flex !important;
    }
    
    .d-none.d-lg-none {
        display: flex !important;
    }
    
    /* Garante que o menu é exibido em coluna */
    .navbar-collapse-cobea {
        flex-direction: column !important;
        align-items: flex-start !important;
        width: 100% !important;
    }
    
    .navbar-collapse-cobea .navbar-nav {
        flex-direction: column !important;
        width: 100% !important;
    }
}

/* Desktop (>= 1251px) */
@media (min-width: 1251px) {
    .d-cobea-none { display: block !important; }
    .d-cobea-flex { display: flex !important; }
    .d-none.d-cobea-flex { display: flex !important; }
    .d-flex.d-cobea-none { display: none !important; }

    .navbar-expand-cobea .navbar-toggler { display: none !important; }
    .navbar-expand-cobea .navbar-collapse { display: flex !important; flex-basis: auto !important; }

    .flex-cobea-row { flex-direction: row !important; }
    .align-items-cobea-center { align-items: center !important; }
    .bg-cobea-transparent { background-color: transparent !important; }
    .ml-cobea-auto { margin-left: auto !important; }
    
    /* Desktop navbar layout */
    .navbar-collapse-cobea {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        width: 100% !important;
    }
    
    .navbar-collapse-cobea .navbar-nav {
        flex-direction: row !important;
        width: auto !important;
        margin-left: 0 !important;
    }
    
    /* Garante que o terceiro grupo fica à direita */
    .navbar-nav.ml-cobea-auto {
        margin-left: auto !important;
    }
}




/* =========== ALERTAS DE FEEDBACK (BOOTSTRAP OVERRIDE) =========== */
body .alert {
    border-radius: 1rem;
    border-width: 1px;
    font-weight: 500;
    padding: 1rem 1.25rem;
}

body .alert-success {
    background-color: var(--status-success-bg) !important;
    border-color: var(--status-success-border) !important;
    color: var(--status-success-text) !important;
}

body .alert-danger {
    background-color: var(--status-danger-bg) !important;
    border-color: var(--status-danger-border) !important;
    color: var(--status-danger-text) !important;
}

body .alert-warning {
    background-color: var(--status-warning-bg) !important;
    border-color: var(--status-warning-border) !important;
    color: var(--status-warning-text) !important;
}

body .alert-info {
    background-color: var(--status-info-bg) !important;
    border-color: var(--status-info-border) !important;
    color: var(--status-info-text) !important;
}

/* =========== ALERTAS DE UPLOAD DE IMAGENS =========== */
.swal2-popup .swal-upload-bloco {
    padding: 10px 14px;
    border-radius: 4px;
    text-align: left;
    margin-bottom: 10px;
}
.swal2-popup .swal-upload-bloco:last-child {
    margin-bottom: 0;
}
.swal2-popup .swal-upload-bloco--limite {
    background: var(--status-warning-bg) !important;
    border-left: 4px solid var(--color-warning) !important;
}
.swal2-popup .swal-upload-bloco--duplicata {
    background: var(--status-info-bg) !important;
    border-left: 4px solid var(--color-info) !important;
}
.swal2-popup .swal-upload-bloco--erro {
    background: var(--status-danger-bg) !important;
    border-left: 4px solid var(--color-danger) !important;
}
.swal2-popup .swal-upload-bloco__subtitulo {
    font-size: .875rem;
    color: var(--text-caption);
    display: block;
}
.swal2-popup .swal-upload-bloco__lista {
    margin: 6px 0 0;
    padding-left: 0;
    text-align: left;
    list-style: none;
}
.swal2-popup .swal-upload-bloco__lista li {
    margin-bottom: 3px;
    word-break: break-all;
}
