/* Contact card: e-mail link in contact details */
body.task-addressbook #contacttabs a.email,
body.task-addressbook #contacthead a.email {
    color: var(--px-theme-primary) !important;
}

body.task-addressbook #contacttabs a.email:hover,
body.task-addressbook #contacttabs a.email:focus,
body.task-addressbook #contacthead a.email:hover,
body.task-addressbook #contacthead a.email:focus {
    color: var(--px-theme-primary-hover) !important;
}

/* Addressbook contact editor: trash buttons (gray default, red icon on hover, red frame only on click) */
body.task-addressbook #layout-content .propform td.rowbuttons a.delete,
body.task-addressbook #layout-content .propform .input-group .icon.delete,
body.task-addressbook #layout-content .propform .multi-input a.icon.reset,
body.task-addressbook #layout-content a.contactfieldbutton.deletebutton,
body.task-addressbook .contactfieldgroup .row a.contactfieldbutton.deletebutton {
    background-color: #f1f3f4 !important;
    border-color: #d4dbde !important;
}

body.task-addressbook #layout-content .propform td.rowbuttons a.delete,
body.task-addressbook #layout-content .propform td.rowbuttons a.delete:before,
body.task-addressbook #layout-content .propform .input-group .icon.delete,
body.task-addressbook #layout-content .propform .input-group .icon.delete:before,
body.task-addressbook #layout-content .propform .multi-input a.icon.reset,
body.task-addressbook #layout-content .propform .multi-input a.icon.reset:before,
body.task-addressbook #layout-content a.contactfieldbutton.deletebutton,
body.task-addressbook #layout-content a.contactfieldbutton.deletebutton:before,
body.task-addressbook .contactfieldgroup .row a.contactfieldbutton.deletebutton,
body.task-addressbook .contactfieldgroup .row a.contactfieldbutton.deletebutton:before {
    color: var(--px-graphite) !important;
}

/* Hover/focus: only icon turns red, keep gray frame */
body.task-addressbook #layout-content .propform td.rowbuttons a.delete:hover,
body.task-addressbook #layout-content .propform td.rowbuttons a.delete:hover:before,
body.task-addressbook #layout-content .propform td.rowbuttons a.delete:focus,
body.task-addressbook #layout-content .propform td.rowbuttons a.delete:focus:before,
body.task-addressbook #layout-content .propform td.rowbuttons a.delete:focus-visible,
body.task-addressbook #layout-content .propform td.rowbuttons a.delete:focus-visible:before,
body.task-addressbook #layout-content .propform .input-group .icon.delete:hover,
body.task-addressbook #layout-content .propform .input-group .icon.delete:hover:before,
body.task-addressbook #layout-content .propform .input-group .icon.delete:focus,
body.task-addressbook #layout-content .propform .input-group .icon.delete:focus:before,
body.task-addressbook #layout-content .propform .input-group .icon.delete:focus-visible,
body.task-addressbook #layout-content .propform .input-group .icon.delete:focus-visible:before,
body.task-addressbook #layout-content .propform .multi-input a.icon.reset:hover,
body.task-addressbook #layout-content .propform .multi-input a.icon.reset:hover:before,
body.task-addressbook #layout-content .propform .multi-input a.icon.reset:focus,
body.task-addressbook #layout-content .propform .multi-input a.icon.reset:focus:before,
body.task-addressbook #layout-content .propform .multi-input a.icon.reset:focus-visible,
body.task-addressbook #layout-content .propform .multi-input a.icon.reset:focus-visible:before,
body.task-addressbook #layout-content a.contactfieldbutton.deletebutton:hover,
body.task-addressbook #layout-content a.contactfieldbutton.deletebutton:hover:before,
body.task-addressbook #layout-content a.contactfieldbutton.deletebutton:focus,
body.task-addressbook #layout-content a.contactfieldbutton.deletebutton:focus:before,
body.task-addressbook #layout-content a.contactfieldbutton.deletebutton:focus-visible,
body.task-addressbook #layout-content a.contactfieldbutton.deletebutton:focus-visible:before,
body.task-addressbook .contactfieldgroup .row a.contactfieldbutton.deletebutton:hover,
body.task-addressbook .contactfieldgroup .row a.contactfieldbutton.deletebutton:hover:before,
body.task-addressbook .contactfieldgroup .row a.contactfieldbutton.deletebutton:focus,
body.task-addressbook .contactfieldgroup .row a.contactfieldbutton.deletebutton:focus:before,
body.task-addressbook .contactfieldgroup .row a.contactfieldbutton.deletebutton:focus-visible,
body.task-addressbook .contactfieldgroup .row a.contactfieldbutton.deletebutton:focus-visible:before {
    color: var(--px-theme-primary) !important;
    background-color: #f1f3f4 !important;
    border-color: #d4dbde !important;
    box-shadow: none !important;
    outline: 0 !important;
}

/* Click/press: red icon + red frame */
body.task-addressbook #layout-content .propform td.rowbuttons a.delete:active,
body.task-addressbook #layout-content .propform td.rowbuttons a.delete:active:before,
body.task-addressbook #layout-content .propform td.rowbuttons a.delete.active,
body.task-addressbook #layout-content .propform td.rowbuttons a.delete.active:before,
body.task-addressbook #layout-content .propform .input-group .icon.delete:active,
body.task-addressbook #layout-content .propform .input-group .icon.delete:active:before,
body.task-addressbook #layout-content .propform .input-group .icon.delete.active,
body.task-addressbook #layout-content .propform .input-group .icon.delete.active:before,
body.task-addressbook #layout-content .propform .multi-input a.icon.reset:active,
body.task-addressbook #layout-content .propform .multi-input a.icon.reset:active:before,
body.task-addressbook #layout-content .propform .multi-input a.icon.reset.active,
body.task-addressbook #layout-content .propform .multi-input a.icon.reset.active:before,
body.task-addressbook #layout-content a.contactfieldbutton.deletebutton:active,
body.task-addressbook #layout-content a.contactfieldbutton.deletebutton:active:before,
body.task-addressbook #layout-content a.contactfieldbutton.deletebutton.active,
body.task-addressbook #layout-content a.contactfieldbutton.deletebutton.active:before,
body.task-addressbook .contactfieldgroup .row a.contactfieldbutton.deletebutton:active,
body.task-addressbook .contactfieldgroup .row a.contactfieldbutton.deletebutton:active:before,
body.task-addressbook .contactfieldgroup .row a.contactfieldbutton.deletebutton.active,
body.task-addressbook .contactfieldgroup .row a.contactfieldbutton.deletebutton.active:before {
    color: var(--px-theme-primary) !important;
    background-color: var(--px-theme-primary-soft) !important;
    border-color: #d4dbde !important;
    box-shadow: none !important;
    outline: 0 !important;
}

/* Addressbook edit (light mode): left labels like "Płeć" on white background */
html:not(.dark-mode) body.task-addressbook #contacttabs .propform.grouped .row.input-group > .input-group-prepend > .input-group-text:not(.icon),
html:not(.dark-mode) body.task-addressbook .contactfieldgroup .row .contactfieldlabel.label,
html:not(.dark-mode) body.task-addressbook .contactfieldgroup .row.input-group .contactfieldlabel.input-group-text {
    background-color: #fff !important;
}

/* Addressbook: tabs in contact editor/search should not stay blue when inactive */
body.task-addressbook .nav-tabs .nav-link:not(.active) {
    color: var(--px-theme-primary) !important;
}

body.task-addressbook .nav-tabs .nav-link:not(.active):hover,
body.task-addressbook .nav-tabs .nav-link:not(.active):focus {
    color: var(--px-theme-primary-hover) !important;
}

/* Fallback for jQuery UI tab markup used in some addressbook widgets */
body.task-addressbook .ui-tabs .ui-tabs-nav li .ui-tabs-anchor {
    color: var(--px-theme-primary) !important;
}

body.task-addressbook .ui-tabs .ui-tabs-nav li.ui-state-active .ui-tabs-anchor {
    color: inherit !important;
}

body.task-addressbook .ui-tabs .ui-tabs-nav li.ui-state-hover .ui-tabs-anchor,
body.task-addressbook .ui-tabs .ui-tabs-nav li:not(.ui-state-disabled):hover .ui-tabs-anchor {
    color: var(--px-theme-primary-hover) !important;
}

/* Addressbook birthday/search datepickers: keep active day readable on red background */
body.task-addressbook #ui-datepicker-div .ui-state-active,
body.task-addressbook #ui-datepicker-div .ui-state-active.ui-state-highlight,
body.task-addressbook #ui-datepicker-div a.ui-state-active,
body.task-addressbook #ui-datepicker-div a.ui-state-active.ui-state-highlight,
body.task-addressbook .ui-datepicker .ui-state-active,
body.task-addressbook .ui-datepicker .ui-state-active.ui-state-highlight,
body.task-addressbook .ui-datepicker a.ui-state-active,
body.task-addressbook .ui-datepicker a.ui-state-active.ui-state-highlight,
body.task-addressbook .ui-datepicker.ui-widget-content .ui-state-active,
body.task-addressbook .ui-datepicker.ui-widget-content .ui-state-active.ui-state-highlight,
body.task-addressbook .ui-datepicker.ui-widget-content a.ui-state-active,
body.task-addressbook .ui-datepicker.ui-widget-content a.ui-state-active.ui-state-highlight {
    color: #fff !important;
}

/* Import description link (vCard) */
body.task-addressbook.action-import .formcontent p a,
body.task-addressbook.action-import .formcontent p a:visited {
    color: var(--px-theme-primary) !important;
}

body.task-addressbook.action-import .formcontent p a:hover,
body.task-addressbook.action-import .formcontent p a:focus {
    color: var(--px-theme-primary-hover) !important;
}

/* Addressbook: equal selected background in sidebar groups and contacts list */
body.task-addressbook #layout-sidebar .listing li.selected {
    background-color: transparent !important;
}

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

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

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