/*
 * Pragma Webmail colours (plugin pragma_branding, D-054, 2026-11-26)
 * Brand blue #2487C5 (Pragma icon on pragmasoftwares.com). Text/buttons on white use the darker
 * #1A6FA8 (5.4:1 against white, WCAG AA); hover #155A89. Sidebar navy #0F3550.
 * Light mode only: every rule is scoped to html:not(.dark-mode). :where() keeps the specificity
 * equal to Elastic's own rules, so these override only the matching Elastic colour rules.
 */

/* links */
:where(html:not(.dark-mode)) a,
:where(html:not(.dark-mode)) .btn-link,
:where(html:not(.dark-mode)) .ui.alert a:not(.btn) { color: #1a6fa8; }
:where(html:not(.dark-mode)) a:hover { color: #155a89; }

/* primary buttons (login, send, save, dialogs) */
:where(html:not(.dark-mode)) .btn-primary,
:where(html:not(.dark-mode)) .btn-primary.disabled,
:where(html:not(.dark-mode)) .btn-primary:disabled,
:where(html:not(.dark-mode)) div.tox .tox-dialog__footer .tox-button:not(.tox-button--secondary),
:where(html:not(.dark-mode)) .floating-action-buttons a.button {
    color: #fff; background: #1a6fa8; border-color: #1a6fa8;
}
:where(html:not(.dark-mode)) .btn-primary:hover,
:where(html:not(.dark-mode)) .btn-primary:focus { background: #155a89; border-color: #134f78; }
:where(html:not(.dark-mode)) .btn-primary:focus { box-shadow: 0 0 0 .2rem rgba(36, 135, 197, .5); }
:where(html:not(.dark-mode)) .btn-primary:not(:disabled):not(.disabled):active,
:where(html:not(.dark-mode)) .btn-primary:not(:disabled):not(.disabled).active { background: #134f78; border-color: #11466b; }

/* selected rows / folders */
:where(html:not(.dark-mode)) .listing li.selected,
:where(html:not(.dark-mode)) .listing tr.selected td,
:where(html:not(.dark-mode)) ul.treelist li.selected > a,
:where(html:not(.dark-mode)) ul.treelist li.selected > div > a,
:where(html:not(.dark-mode)) .table-widget table.options-table tr.selected td { background-color: #e3eff8; }

/* menus */
:where(html:not(.dark-mode)) .popover .menu li a:not(.disabled):hover,
:where(html:not(.dark-mode)) .popupmenu .listing li > a:not(.disabled):hover,
:where(html:not(.dark-mode)) .popupmenu .listing li.selected,
:where(html:not(.dark-mode)) .googie_list li.googie_list_onhover { color: #fff; background-color: #1a6fa8; }
:where(html:not(.dark-mode)) .popover .menu .dropbutton a.dropdown:hover { background-color: #1a6fa8; }
:where(html:not(.dark-mode)) .ui-menu .ui-state-active { background-color: #1a6fa8 !important; }

/* badges, quota, info messages, switches */
:where(html:not(.dark-mode)) .folderlist li.mailbox .unreadcount,
:where(html:not(.dark-mode)) .folderlist li.mailbox.recent > a > .unreadcount,
:where(html:not(.dark-mode)) .quota-widget .value,
:where(html:not(.dark-mode)) #messagestack .alert-info.information { background-color: #1a6fa8; }
:where(html:not(.dark-mode)) .custom-switch .custom-control-input:checked ~ .custom-control-label::before {
    border-color: #1a6fa8; background-color: #1a6fa8;
}

/* focus rings */
:where(html:not(.dark-mode)) .form-control:focus,
:where(html:not(.dark-mode)) .recipient-input.focus,
:where(html:not(.dark-mode)) .multi-input > .content.focused,
:where(html:not(.dark-mode)) .custom-file-input:focus ~ .custom-file-label {
    border-color: #2487c5; box-shadow: 0 0 0 .2rem rgba(36, 135, 197, .25);
}

/* left task menu (desktop/tablet; Elastic sets its colour only above 480px) */
@media screen and (min-width: 481px) {
    :where(html:not(.dark-mode)) #layout-menu,
    :where(html:not(.dark-mode)) #taskmenu .special-buttons { background-color: #0f3550; }
    :where(html:not(.dark-mode)) #layout-menu .popover-header { background-color: #0f3550 !important; }
    :where(html:not(.dark-mode)) #taskmenu a.selected,
    :where(html:not(.dark-mode)) #taskmenu a.selected:hover,
    :where(html:not(.dark-mode)) #taskmenu a:hover,
    :where(html:not(.dark-mode)) #taskmenu a:focus { background: #1b4d72; }
    :where(html:not(.dark-mode)) #taskmenu .action-buttons a,
    :where(html:not(.dark-mode)) #taskmenu .action-buttons a:hover { color: #6fc0f0; }
    :where(html:not(.dark-mode)) #taskmenu .action-buttons a:hover { background: #1b4d72; }
}
