/* Garantir visibilidade do logo no modo dark usando a versão branca oficial */
html.dark #site-name img,
html.dark .sidebar-logo-container img,
html.dark img[src*="lojacorr_seguros.png"] {
    content: url("/static/img/apps/lojacorr_seguros_branco.png") !important;
    display: block !important;
    max-height: 28px !important;
    width: auto !important;
}

/* Garantir que o nome Plataforma apareça ao lado do logo (apenas se houver imagem) */
a[href="/admin/"]:has(img) {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    text-decoration: none !important;
    overflow: visible !important;
    width: auto !important;
}

a[href="/admin/"]:has(img):after {
    content: "Plataforma" !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 700 !important;
    font-size: 1.25rem !important;
    color: #1e293b !important;
    display: block !important;
    white-space: nowrap !important;
}

/* Cor do texto no modo dark */
html.dark a[href="/admin/"]:has(img):after {
    color: #ffffff !important;
}

/* Ajuste de tamanho do logo para caber com o texto */
#site-name img,
.sidebar-logo-container img {
    height: 28px !important;
    width: auto !important;
}

/* Action bar: visual alinhado com a tabela */
#changelist-actions select[name="action"] {
    border: 1px solid var(--color-base-200) !important;
}

html.dark #changelist-actions select[name="action"] {
    border-color: var(--color-base-700) !important;
}

/* Collapse das actions: só exibe quando houver itens selecionados */
#changelist-form #changelist-actions {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transform: translateY(-6px);
    transition: max-height 0.28s ease, opacity 0.2s ease, transform 0.24s ease;
}

#changelist-form:has(input.action-select:checked) #changelist-actions,
#changelist-form:has(#action-toggle:checked) #changelist-actions {
    max-height: 160px;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

