body:not(.task-login) #taskmenu > .action-buttons {
    display: block;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

html.layout-phone body.task-mail .popover .popover-header,
html.layout-small body.task-mail .popover .popover-header {
    background-color: var(--px-theme-primary) !important;
    color: #fff !important;
}

html.layout-phone body.task-mail .popover .popover-header a,
html.layout-small body.task-mail .popover .popover-header a,
html.layout-phone body.task-mail .popover .popover-header a.button.cancel,
html.layout-small body.task-mail .popover .popover-header a.button.cancel {
    color: #fff !important;
}

/* Disable Nova's absolute flag positioning on mobile/tablet/touch mail list. */
html.layout-phone body.task-mail .messagelist td.flags,
html.layout-small body.task-mail .messagelist td.flags,
html.touch body.task-mail .messagelist td.flags {
    position: static !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
}


/*
 * Mail: mirror Elastic selected-state structure.
 * Treelist items keep the wrapper transparent and highlight the direct row content,
 * while message rows use the selected table cells.
 */
body.task-mail #layout-sidebar .listing li.selected {
    background-color: transparent !important;
}

html:not(.dark-mode) body.task-mail #layout-sidebar .listing li.selected {
    background-color: rgba(224, 82, 88, 0.06) !important;
}

body.task-mail #layout-sidebar .listing li.selected > a,
body.task-mail #layout-sidebar .listing li.selected > div > a,
body.task-mail #layout-sidebar .listing li > a:hover,
body.task-mail #layout-sidebar .listing li > a:focus,
body.task-mail #layout-sidebar .listing li > div > a:hover,
body.task-mail #layout-sidebar .listing li > div > a:focus,
body.task-mail #layout-list .listing li.selected,
body.task-mail #layout-list .listing li.selected > a,
body.task-mail #layout-list .listing li.selected > div > a,
body.task-mail #layout-list .listing tr.selected td,
body.task-mail #layout-list .listing tr:hover td,
body.task-mail #layout-list .listing.focus tbody tr.focused td {
    background-color: var(--px-theme-primary-soft) !important;
}

html:not(.dark-mode) body.task-mail #layout-sidebar .listing li.selected > a,
html:not(.dark-mode) body.task-mail #layout-sidebar .listing li.selected > div > a,
html:not(.dark-mode) body.task-mail #layout-sidebar .listing li > a:hover,
html:not(.dark-mode) body.task-mail #layout-sidebar .listing li > a:focus,
html:not(.dark-mode) body.task-mail #layout-sidebar .listing li > div > a:hover,
html:not(.dark-mode) body.task-mail #layout-sidebar .listing li > div > a:focus,
html:not(.dark-mode) body.task-mail #layout-list .listing li.selected,
html:not(.dark-mode) body.task-mail #layout-list .listing li.selected > a,
html:not(.dark-mode) body.task-mail #layout-list .listing li.selected > div > a,
html:not(.dark-mode) body.task-mail #layout-list .listing tr.selected td,
html:not(.dark-mode) body.task-mail #layout-list .listing tr:hover td,
html:not(.dark-mode) body.task-mail #layout-list .listing.focus tbody tr.focused td {
    background-color: rgba(224, 82, 88, 0.06) !important;
}

body.task-mail #layout-sidebar .listing li.selected > a,
body.task-mail #layout-sidebar .listing li.selected > div > a,
body.task-mail #layout-sidebar .listing li.selected > a .name,
body.task-mail #layout-sidebar .listing li.selected > div > a .name,
body.task-mail #layout-sidebar .listing li.selected > a .count,
body.task-mail #layout-sidebar .listing li.selected > div > a .count {
    color: var(--px-theme-primary) !important;
}

body.task-mail #layout-sidebar .listing li.selected > a .unreadcount,
body.task-mail #layout-sidebar .listing li.selected > div > a .unreadcount {
    color: #fff !important;
}

body.task-mail .messagelist tr.thread td.threads div:before,
body.task-mail .messagelist tr.thread.expanded td.threads div:before {
    color: var(--px-theme-primary) !important;
}

body.task-mail #layout-list .listing.focus tbody tr.focused > td:first-child,
body.task-mail #layout-list .listing.focus:not(.withselection) tbody tr.focused > td.selection + td {
    border-left-color: var(--px-theme-primary) !important;
}

body.task-mail .messagelist td.subject span.msgicon.status.unread:before,
body.task-mail .messagelist td.subject span.msgicon.status.unreadchildren:before {
    color: var(--px-theme-primary) !important;
}

/* Replace selected mail-list icons with Phosphor SVG variants. */
body.task-mail .messagelist span.attachment span:before,
body.task-mail .messagelist span.flagged:before,
body.task-mail .messagelist tr.flaggedroot:not(:hover) span.unflagged:before,
body.task-mail .messagelist tr:hover span.unflagged:before {
    content: "" !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    float: none !important;
    width: 1.3rem !important;
    height: 1.3rem !important;
    margin: 0 !important;
    background-color: currentColor;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    vertical-align: middle;
    transform: none;
}

body.task-mail .messagelist span.attachment span:before {
    -webkit-mask: url("../images/phosphor-paperclip-light.svg") no-repeat center / contain;
    mask: url("../images/phosphor-paperclip-light.svg") no-repeat center / contain;
}

body.task-mail .messagelist span.flagged:before,
body.task-mail .messagelist tr.flaggedroot:not(:hover) span.unflagged:before,
body.task-mail .messagelist tr:hover span.unflagged:before {
    -webkit-mask: url("../images/phosphor-flag-banner-fill.svg") no-repeat center / contain;
    mask: url("../images/phosphor-flag-banner-fill.svg") no-repeat center / contain;
    -webkit-mask-position: 54% 50%;
    mask-position: 54% 50%;
    transform: translateX(1px);
}

body.task-mail.status-flagged #message-header > .subject:before {
    content: "" !important;
    display: inline-block !important;
    float: none !important;
    width: 1.05em !important;
    height: 1.05em !important;
    margin: 0 .28rem 0 0 !important;
    vertical-align: -0.08em;
    background-color: currentColor;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    -webkit-mask: url("../images/phosphor-flag-banner-fill.svg") no-repeat center / contain;
    mask: url("../images/phosphor-flag-banner-fill.svg") no-repeat center / contain;
    transform: none;
}

body.task-mail #forward-menu .menu li > a:not(.disabled):hover,
body.task-mail #forward-menu .menu li > a:not(.disabled):focus,
body.task-mail #replyall-menu .menu li > a:not(.disabled):hover,
body.task-mail #replyall-menu .menu li > a:not(.disabled):focus,
body.task-mail #message-menu .menu li > a:not(.disabled):hover,
body.task-mail #message-menu .menu li > a:not(.disabled):focus,
body.task-mail #folder-selector .menu li > a:not(.disabled):hover,
body.task-mail #folder-selector .menu li > a:not(.disabled):focus,
body.task-mail #zipdownload-menu .menu li > a:not(.disabled):hover,
body.task-mail #zipdownload-menu .menu li > a:not(.disabled):focus,
body.task-mail #forward-menu .menu li.selected,
body.task-mail #replyall-menu .menu li.selected,
body.task-mail #message-menu .menu li.selected,
body.task-mail #folder-selector .menu li.selected,
body.task-mail #zipdownload-menu .menu li.selected {
    background-color: var(--px-theme-primary) !important;
    color: #fff !important;
}

/* Mail context menus (right-click + nested submenus) */
body.task-mail .popupmenu .listing li > a {
    color: #2c363a !important;
}

body.task-mail .popupmenu .listing li > a:not(.disabled):hover,
body.task-mail .popupmenu .listing li > a:not(.disabled):focus,
body.task-mail .popupmenu .listing li.selected,
body.task-mail .popupmenu .listing li.selected > a {
    background-color: var(--px-theme-primary) !important;
    color: #fff !important;
}

body.task-mail .ui-menu .ui-menu-item-wrapper {
    color: #2c363a !important;
}

body.task-mail .ui-menu .ui-state-active,
body.task-mail .ui-menu .ui-menu-item-wrapper.ui-state-active {
    background-color: var(--px-theme-primary) !important;
    color: #fff !important;
    border: 0 !important;
}

/* Replace stacked replied+forwarded arrows with one compact combined status mark. */
body.task-mail .messagelist td.subject span.msgicon.status.replied.forwarded {
    position: relative;
    display: inline-block;
    width: 1.35rem;
    height: 1.1rem;
    line-height: 1 !important;
    vertical-align: middle;
    overflow: visible !important;
}

body.task-mail .messagelist td.subject span.msgicon.status.replied.forwarded:before,
body.task-mail .messagelist td.subject span.msgicon.status.replied.forwarded:after {
    position: absolute;
    float: none !important;
    display: inline-block !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    line-height: 1 !important;
    vertical-align: middle !important;
}

body.task-mail .messagelist td.subject span.msgicon.status.replied.forwarded:before {
    top: .02rem;
    left: .12rem;
    font-size: .92rem !important;
}

body.task-mail .messagelist td.subject span.msgicon.status.replied.forwarded:after {
    content: "\f0da" !important;
    top: .30rem;
    left: .55rem;
    font-size: .8rem !important;
    opacity: .85;
    transform: translate(-6px, 2px);
}

/* Contextmenu plugin (plugins/contextmenu): enforce red highlight on all submenu depths */
body.task-mail div.contextmenu .menu.listing li > a.rcmbutton {
    color: #2c363a !important;
}

body.task-mail div.contextmenu .menu.listing li > a.rcmbutton:not(.disabled):hover,
body.task-mail div.contextmenu .menu.listing li > a.rcmbutton:not(.disabled):focus,
body.task-mail div.contextmenu .menu.listing li > a.rcmbutton.active:not(.disabled):hover,
body.task-mail div.contextmenu .menu.listing li > a.rcmbutton.active:not(.disabled):focus,
body.task-mail div.contextmenu .menu.listing li:hover > a.rcmbutton.active:not(.disabled),
body.task-mail div.contextmenu .menu.listing li:focus-within > a.rcmbutton.active:not(.disabled),
body.task-mail div.contextmenu .menu.listing li:active > a.rcmbutton.active:not(.disabled) {
    background-color: var(--px-theme-primary) !important;
    color: #fff !important;
}

body.task-mail div.contextmenu .menu.listing li > a.rcmbutton[aria-haspopup]:not(.disabled):hover:after,
body.task-mail div.contextmenu .menu.listing li > a.rcmbutton[aria-haspopup]:not(.disabled):focus:after,
body.task-mail div.contextmenu .menu.listing li:hover > a.rcmbutton.active[aria-haspopup]:not(.disabled):after,
body.task-mail div.contextmenu .menu.listing li:focus-within > a.rcmbutton.active[aria-haspopup]:not(.disabled):after,
body.task-mail div.contextmenu .menu.listing li:active > a.rcmbutton.active[aria-haspopup]:not(.disabled):after {
    color: #fff !important;
}

html.layout-phone body.task-mail div.contextmenu .menu.listing li:active > a.rcmbutton.active:not(.disabled) {
    background-color: var(--px-theme-primary) !important;
    color: #fff !important;
}

html.dark-mode body.task-mail div.contextmenu .menu.listing li > a.rcmbutton {
    color: #c5d1d3 !important;
}

/* Red external-window icon next to message subject */
body.task-mail #message-header > .subject a.extwin,
body.task-mail #message-header > .subject a.extwin:before {
    color: var(--px-theme-primary) !important;
}

body.task-mail #message-header > .subject a.extwin:hover,
body.task-mail #message-header > .subject a.extwin:hover:before,
body.task-mail #message-header > .subject a.extwin:focus,
body.task-mail #message-header > .subject a.extwin:focus:before {
    color: var(--px-theme-primary-hover) !important;
}

/* Compose: attachment controls and extwin button */

body.task-mail.action-compose #compose_from .input-group .input-group-append > a.input-group-text.icon.edit:hover,
body.task-mail.action-compose #compose_from .input-group .input-group-append > a.input-group-text.icon.edit:hover:before,
body.task-mail.action-compose #compose_to .input-group .input-group-append > a.input-group-text.icon:hover,
body.task-mail.action-compose #compose_to .input-group .input-group-append > a.input-group-text.icon:hover:before {
    color: var(--px-theme-primary-hover) !important;
}

body.task-mail.action-compose #compose_from .input-group .input-group-append > a.input-group-text.icon.edit:focus,
body.task-mail.action-compose #compose_from .input-group .input-group-append > a.input-group-text.icon.edit:focus-visible,
body.task-mail.action-compose #compose_from .input-group .input-group-append > a.input-group-text.icon.edit:active,
body.task-mail.action-compose #compose_to .input-group .input-group-append > a.input-group-text.icon:focus,
body.task-mail.action-compose #compose_to .input-group .input-group-append > a.input-group-text.icon:focus-visible,
body.task-mail.action-compose #compose_to .input-group .input-group-append > a.input-group-text.icon:active {
    background-color: var(--px-theme-primary-soft) !important;
    border-color: #d4dbde !important;
    box-shadow: none !important;
    outline: 0 !important;
}

body.task-mail.action-compose #compose-attachments .upload-form button.attach:focus,
body.task-mail.action-compose #compose-attachments .upload-form button.attach:focus-visible,
body.task-mail.action-compose #compose-attachments .upload-form button.attach.vcard:focus,
body.task-mail.action-compose #compose-attachments .upload-form button.attach.vcard:focus-visible {
    box-shadow: none !important;
    outline: 0 !important;
}

html.dark-mode body.task-mail.action-compose #compose-attachments .upload-form button.attach,
html.dark-mode body.task-mail.action-compose #compose-attachments .upload-form button.attach:hover,
html.dark-mode body.task-mail.action-compose #compose-attachments .upload-form button.attach:focus,
html.dark-mode body.task-mail.action-compose #compose-attachments .upload-form button.attach:focus-visible,
html.dark-mode body.task-mail.action-compose #compose-attachments .upload-form button.attach:active {
    border-color: transparent !important;
    box-shadow: none !important;
    outline: 0 !important;
}

/* Compose restore popup ("Przywrócić wiadomość?"): remove borders on Delete/Ignore buttons */
body.task-mail.action-compose .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset button.delete,
body.task-mail.action-compose .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset button.cancel,
body.task-mail.action-compose .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset a.delete,
body.task-mail.action-compose .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset a.cancel,
body.task-mail.action-compose .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset button.delete:hover,
body.task-mail.action-compose .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset button.cancel:hover,
body.task-mail.action-compose .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset a.delete:hover,
body.task-mail.action-compose .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset a.cancel:hover,
body.task-mail.action-compose .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset button.delete:focus,
body.task-mail.action-compose .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset button.cancel:focus,
body.task-mail.action-compose .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset a.delete:focus,
body.task-mail.action-compose .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset a.cancel:focus,
body.task-mail.action-compose .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset button.delete:focus-visible,
body.task-mail.action-compose .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset button.cancel:focus-visible,
body.task-mail.action-compose .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset a.delete:focus-visible,
body.task-mail.action-compose .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset a.cancel:focus-visible,
body.task-mail.action-compose .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset button.delete:active,
body.task-mail.action-compose .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset button.cancel:active,
body.task-mail.action-compose .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset a.delete:active,
body.task-mail.action-compose .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset a.cancel:active {
    border: 0 !important;
    box-shadow: none !important;
    outline: 0 !important;
}

body.task-mail.action-compose #compose-attachments .attachmentslist li a.delete,
body.task-mail.action-compose #compose-attachments .attachmentslist li a.delete:before,
body.task-mail.action-compose #compose-attachments .attachmentslist li a.dropdown,
body.task-mail.action-compose #compose-attachments .attachmentslist li a.dropdown:before {
    color: var(--px-theme-primary) !important;
}

body.task-mail.action-compose #compose-attachments .attachmentslist li a.delete:hover,
body.task-mail.action-compose #compose-attachments .attachmentslist li a.delete:hover:before,
body.task-mail.action-compose #compose-attachments .attachmentslist li a.delete:focus,
body.task-mail.action-compose #compose-attachments .attachmentslist li a.delete:focus:before {
    color: var(--px-theme-primary-hover) !important;
    background-color: transparent !important;
    box-shadow: none !important;
    outline: 0 !important;
}

body.task-mail.action-compose #compose-attachments .attachmentslist li a.dropdown:hover,
body.task-mail.action-compose #compose-attachments .attachmentslist li a.dropdown:hover:before,
body.task-mail.action-compose #compose-attachments .attachmentslist li a.dropdown:focus,
body.task-mail.action-compose #compose-attachments .attachmentslist li a.dropdown:focus:before {
    color: var(--px-theme-primary) !important;
    background-color: transparent !important;
    box-shadow: none !important;
    outline: 0 !important;
}

body.task-mail.action-compose .formbuttons a.extwin,
body.task-mail.action-compose .formbuttons a.extwin:before {
    color: var(--px-theme-primary) !important;
}

body.task-mail.action-compose .formbuttons a.extwin:hover,
body.task-mail.action-compose .formbuttons a.extwin:hover:before,
body.task-mail.action-compose .formbuttons a.extwin:focus,
body.task-mail.action-compose .formbuttons a.extwin:focus:before {
    color: var(--px-theme-primary-hover) !important;
    box-shadow: none !important;
    outline: 0 !important;
}

/* Message list metadata (Od/Do/Data) in light mode */
html:not(.dark-mode) body.task-mail .messagelist td.subject span.fromto,
html:not(.dark-mode) body.task-mail .messagelist td.subject span.date {
    color: #000 !important;
}

/* Message header labels and values in light mode */
html:not(.dark-mode) body.task-mail #message-header .header-headers .header-title {
    color: #000 !important;
}

html:not(.dark-mode) body.task-mail #message-header .header-summary,
html:not(.dark-mode) body.task-mail #message-header .header-summary .adr,
html:not(.dark-mode) body.task-mail #message-header .header-summary .text-nowrap,
html:not(.dark-mode) body.task-mail #message-header .header-summary .rcmContactAddress,
html:not(.dark-mode) body.task-mail #message-header .header-headers td.header,
html:not(.dark-mode) body.task-mail #message-header .header-headers td.header .adr,
html:not(.dark-mode) body.task-mail #message-header .header-headers td.header .rcmContactAddress {
    color: #000 !important;
}

/* Bold only the display name in "Name <email>" */
body.task-mail #message-header .adr .rcmContactAddress .px-contact-name,
body.task-mail .message-partheaders .adr .rcmContactAddress .px-contact-name {
    font-weight: 700;
}

/* Keep only e-mail part in angle brackets gray */
body.task-mail #message-header .adr .rcmContactAddress .px-contact-email,
body.task-mail .message-partheaders .adr .rcmContactAddress .px-contact-email {
    color: var(--px-graphite) !important;
    font-weight: 400;
}

html.dark-mode body:not(.task-login) .btn-primary,
html.dark-mode body:not(.task-login) .button.mainaction,
html.dark-mode body:not(.task-login) .floating-action-buttons a.button,
html.dark-mode body:not(.task-login) .tox .tox-dialog__footer .tox-button:not(.tox-button--secondary),
html.dark-mode body:not(.task-login) .rcmail-inline-message button {
    background-color: var(--px-theme-primary-dark) !important;
    border-color: var(--px-theme-primary-dark) !important;
}

html.dark-mode body:not(.task-login) .btn-primary:hover:not(:disabled),
html.dark-mode body:not(.task-login) .button.mainaction:hover:not(:disabled),
html.dark-mode body:not(.task-login) .floating-action-buttons a.button:hover,
html.dark-mode body:not(.task-login) .tox .tox-dialog__footer .tox-button:not(.tox-button--secondary):hover:not(:disabled),
html.dark-mode body:not(.task-login) .rcmail-inline-message button:hover {
    background-color: var(--px-theme-primary-dark-hover) !important;
    border-color: var(--px-theme-primary-dark-hover) !important;
}

html.dark-mode body:not(.task-login) .btn-primary:not(:disabled):not(.disabled):active,
html.dark-mode body:not(.task-login) .btn-primary:not(:disabled):not(.disabled).active,
html.dark-mode body:not(.task-login) .button.mainaction:not(:disabled):active,
html.dark-mode body:not(.task-login) .tox .tox-dialog__footer .tox-button:not(.tox-button--secondary):active:not(:disabled) {
    background-color: var(--px-theme-primary-dark-active) !important;
    border-color: var(--px-theme-primary-dark-active) !important;
}

html.dark-mode body:not(.task-login) .form-control:focus,
html.dark-mode body:not(.task-login) .custom-file-input:focus ~ .custom-file-label,
html.dark-mode body:not(.task-login) .recipient-input.focus,
html.dark-mode body:not(.task-login) .multi-input:not(.is-invalid) > .content.focused,
html.dark-mode body:not(.task-login) .formcontent.raweditor .CodeMirror-focused {
    border-color: var(--px-theme-primary) !important;
    box-shadow: none !important;
}

html.dark-mode body:not(.task-login) .custom-switch .custom-control-input:checked ~ .custom-control-label::before {
    border-color: var(--px-theme-primary-dark) !important;
    background-color: var(--px-theme-primary-dark) !important;
}

html.dark-mode body:not(.task-login) .custom-switch .custom-control-input:checked:active ~ .custom-control-label::before {
    background-color: var(--px-theme-primary-soft-strong) !important;
    border-color: var(--px-theme-primary) !important;
}

html.dark-mode body:not(.task-login) .folderlist li.mailbox .unreadcount,
html.dark-mode body:not(.task-login) .folderlist li.mailbox.recent > a > .unreadcount {
    background-color: var(--px-theme-primary-dark) !important;
    color: #fff !important;
}

html.dark-mode body:not(.task-login) .messagelist tr:not(.flagged):not(.deleted).selected td.subject a {
    color: #fff !important;
}

html.dark-mode body:not(.task-login) .messagelist tr:not(.flagged):not(.deleted).selected td.subject span.msgicon.status {
    color: var(--px-theme-primary) !important;
}

html.dark-mode body.task-mail .popupmenu .listing li > a,
html.dark-mode body.task-mail .ui-menu .ui-menu-item-wrapper {
    color: #c5d1d3 !important;
}

/* Message header text in dark mode: white */
html.dark-mode body.task-mail #message-header .header-summary,
html.dark-mode body.task-mail #message-header .header-summary .adr,
html.dark-mode body.task-mail #message-header .header-summary .text-nowrap,
html.dark-mode body.task-mail #message-header .header-summary .rcmContactAddress,
html.dark-mode body.task-mail #message-header .header-headers .header-title,
html.dark-mode body.task-mail #message-header .header-headers td.header,
html.dark-mode body.task-mail #message-header .header-headers td.header .adr,
html.dark-mode body.task-mail #message-header .header-headers td.header .rcmContactAddress {
    color: #fff !important;
}

/* Message header controls: force red in both light and dark mode */
body.task-mail #message-header .header-links a.headers-summary,
body.task-mail #message-header .header-links a.headers-details,
body.task-mail #message-header .header-links a.headers-all,
body.task-mail #message-header .header-links a.plain,
body.task-mail #message-header .header-links a.html {
    color: var(--px-theme-primary) !important;
}

body.task-mail #message-header .header-links a.headers-summary:hover,
body.task-mail #message-header .header-links a.headers-details:hover,
body.task-mail #message-header .header-links a.headers-all:hover,
body.task-mail #message-header .header-links a.plain:hover,
body.task-mail #message-header .header-links a.html:hover,
body.task-mail #message-header .header-links a.headers-summary:focus,
body.task-mail #message-header .header-links a.headers-details:focus,
body.task-mail #message-header .header-links a.headers-all:focus,
body.task-mail #message-header .header-links a.plain:focus,
body.task-mail #message-header .header-links a.html:focus {
    color: var(--px-theme-primary-hover) !important;
}

/* "Pobierz wszystkie" in attachments area */
body.task-mail a.zipdownload,
body.task-mail a.button.zipdownload,
body.task-mail a.zipdownload .inner,
body.task-mail a.button.zipdownload .inner,
body.task-mail a.zipdownload:before,
body.task-mail a.button.zipdownload:before,
body.task-mail #message-content .leftcol a.zipdownload,
body.task-mail #message-content .leftcol a.button.zipdownload,
body.task-mail #message-content .leftcol a.zipdownload .inner,
body.task-mail #message-content .leftcol a.button.zipdownload .inner,
body.task-mail #message-content .leftcol a.zipdownload:before,
body.task-mail #message-content .leftcol a.button.zipdownload:before {
    color: var(--px-theme-primary) !important;
}

body.task-mail a.zipdownload:hover,
body.task-mail a.button.zipdownload:hover,
body.task-mail a.zipdownload:focus,
body.task-mail a.button.zipdownload:focus,
body.task-mail a.zipdownload:hover .inner,
body.task-mail a.button.zipdownload:hover .inner,
body.task-mail a.zipdownload:focus .inner,
body.task-mail a.button.zipdownload:focus .inner,
body.task-mail a.zipdownload:hover:before,
body.task-mail a.button.zipdownload:hover:before,
body.task-mail a.zipdownload:focus:before,
body.task-mail a.button.zipdownload:focus:before,
body.task-mail #message-content .leftcol a.zipdownload:hover,
body.task-mail #message-content .leftcol a.button.zipdownload:hover,
body.task-mail #message-content .leftcol a.zipdownload:focus,
body.task-mail #message-content .leftcol a.button.zipdownload:focus,
body.task-mail #message-content .leftcol a.zipdownload:hover .inner,
body.task-mail #message-content .leftcol a.button.zipdownload:hover .inner,
body.task-mail #message-content .leftcol a.zipdownload:focus .inner,
body.task-mail #message-content .leftcol a.button.zipdownload:focus .inner,
body.task-mail #message-content .leftcol a.zipdownload:hover:before,
body.task-mail #message-content .leftcol a.button.zipdownload:hover:before,
body.task-mail #message-content .leftcol a.zipdownload:focus:before,
body.task-mail #message-content .leftcol a.button.zipdownload:focus:before {
    color: var(--px-theme-primary-hover) !important;
}

body.task-mail #message-content .attachmentslist li:before,
body.task-mail #message-content .attachmentslist li .attachment-name,
body.task-mail #message-content .attachmentslist li .attachment-size,
body.task-mail #message-content .attachmentslist li a,
body.task-mail #message-content .attachmentslist li a:before,
body.task-mail #message-content .attachment-links a,
body.task-mail #message-content .attachment-links a:before {
    color: var(--px-theme-primary) !important;
}

body.task-mail #message-content .attachment-links a:hover,
body.task-mail #message-content .attachment-links a:focus,
body.task-mail #message-content .attachment-links a:hover:before,
body.task-mail #message-content .attachment-links a:focus:before,
body.task-mail #message-content .attachmentslist li a:hover,
body.task-mail #message-content .attachmentslist li a:focus,
body.task-mail #message-content .attachmentslist li a:hover:before,
body.task-mail #message-content .attachmentslist li a:focus:before {
    color: var(--px-theme-primary-hover) !important;
}

body.task-mail #message-content p.image-attachment,
body.task-mail #message-content fieldset.image-attachment {
    background-color: rgba(179, 42, 42, 0.04) !important;
    border-color: rgba(179, 42, 42, 0.18) !important;
}

body.task-mail #message-content fieldset.image-attachment legend,
body.task-mail #message-content p.image-attachment span {
    color: var(--px-theme-primary) !important;
}

/*
 * Mail body links:
 * style only "default" links; do not override links that already define their own
 * style/class colors in message HTML/CSS.
 */
body.task-mail #message-content .rightcol a[href]:not([class]):not([style*="color"]):not([style*="background"]):visited,
body.task-mail #message-content .rightcol a[href]:not([class]):not([style*="color"]):not([style*="background"]) {
    color: var(--px-theme-primary);
}

body.task-mail #message-content .rightcol a[href]:not([class]):not([style*="color"]):not([style*="background"]):hover,
body.task-mail #message-content .rightcol a[href]:not([class]):not([style*="color"]):not([style*="background"]):focus {
    color: var(--px-theme-primary-hover);
}
