/* custom.css — identidade visual Webcenter do webmail (skin elastic).
   Este arquivo NÃO é do pacote roundcube-core e sobrevive às atualizações; é carregado pelo <link> que o
   /usr/local/sbin/roundcube-custom-css.sh mantém no layout.html do skin. Conteúdo = o bloco que ficava
   acrescentado ao styles/styles.min.css + o bloco <style> que ficava no layout.html (os dois eram arquivos do
   pacote e foram perdidos na atualização 1.6.13 → 1.6.18 de 19/09/2026). */

/* === IDENTIDADE VISUAL WEBCENTER === */
:root {
    --color-main: #A01D29 !important;
    --color-main-dark: #7d161f !important;
    --color-checkbox-checked: #A01D29 !important;
    --color-list-selected: #A01D29 !important;
    --color-font-link: #A01D29 !important;
}
.btn-primary, .bg-primary, .ui-button.ui-button-primary { background-color: #A01D29 !important; border-color: #A01D29 !important; color: #ffffff !important; }
.btn-primary:hover, .btn-primary:focus, .bg-primary:hover, .ui-button.ui-button-primary:hover { background-color: #7d161f !important; border-color: #7d161f !important; }
a, .text-primary, .btn-link { color: #A01D29 !important; }
a:hover, a:focus, .btn-link:hover { color: #7d161f !important; }
.listbox .listitem.selected, .listing tbody tr.selected td { background-color: #A01D29 !important; color: #ffffff !important; }
.listbox .listitem.selected a, .listbox .listitem.selected span, .listing tbody tr.selected td a, .listing tbody tr.selected td span { color: #ffffff !important; }
.custom-control-input:checked ~ .custom-control-label::before { background-color: #A01D29 !important; border-color: #A01D29 !important; }
.form-control:focus, .custom-select:focus { border-color: #A01D29 !important; box-shadow: 0 0 0 0.2rem rgba(160, 29, 41, 0.25) !important; }
.popover-header { background-color: #A01D29 !important; color: #ffffff !important; }

/* Correção do Menu Lateral (Para não sumir no fundo escuro) */
#layout-menu .menu a { color: #f4f4f4 !important; }
#layout-menu .menu a:hover, #layout-menu .menu a:focus { color: #ffffff !important; background-color: rgba(160, 29, 41, 0.5) !important; }
#layout-menu .menu a.active, #layout-menu .menu a.selected { background-color: #A01D29 !important; color: #ffffff !important; }

/* Correção das Mensagens Não Lidas (Bolinhas e Contadores) */
.badge, .badge-primary, #mailboxlist .unread .count { background-color: #A01D29 !important; color: #ffffff !important; }
.listing tbody tr.unread td, .listing tbody tr.unread td a, .listing tbody tr.unread td .msgicon::before { color: #A01D29 !important; }

/* Ocultar a Marca d'Água do Roundcube (Deixar limpo) */
.watermark, #watermark, body.watermark { display: none !important; background-image: none !important; }

/* === CORREÇÃO WEBCENTER: MENU MOBILE CLARO === */
@media screen and (max-width: 768px) {
    html:not(.dark-mode) #layout-menu .menu a { color: #333333 !important; }
    html:not(.dark-mode) #layout-menu .menu a:hover, 
    html:not(.dark-mode) #layout-menu .menu a:focus { color: #A01D29 !important; background-color: #f4f4f4 !important; }
}

/* === bloco que ficava inline no layout.html (modo escuro) === */
:root { --color-main: #A01D29 !important; --color-main-dark: #7d161f !important; }
.btn-primary, .bg-primary, .ui-button-primary { background-color: #A01D29 !important; border-color: #A01D29 !important; }
.listbox .listitem.selected, .listing tbody tr.selected td { background-color: #A01D29 !important; }
#layout-menu .menu a.active { background-color: #A01D29 !important; }
.unread .count, .badge-primary { background-color: #A01D29 !important; }
.watermark { background-image: none !important; display: none !important; }
html.dark-mode { --color-main: #F1F1F1 !important; }
html.dark-mode .btn-primary, html.dark-mode .bg-primary, html.dark-mode .badge-primary, html.dark-mode .unread .count { background-color: #A01D29 !important; color: #FFFFFF !important; --color-main: #A01D29 !important; }
html.dark-mode #layout-menu .menu a.active { background-color: #A01D29 !important; color: #FFFFFF !important; }
html.dark-mode .listbox .listitem.selected, html.dark-mode .listing tbody tr.selected td { background-color: #A01D29 !important; color: #FFFFFF !important; }
html.dark-mode a { color: #E0E0E0 !important; }
html.dark-mode .listing td a, html.dark-mode .listing td span.subject a, html.dark-mode .messagelist td.subject a, html.dark-mode .messagelist td.subject span a { color: #E0E0E0 !important; }
html.dark-mode #layout-sidebar a, html.dark-mode .folderlist a { color: #E0E0E0 !important; }
