:root {
    --widum-blue: #0D47A1;
    --widum-secondary: #09357B;
    --widum-light: #EDF3FC;
    --widum-text: #172333;
    --widum-muted: #647184;
    --widum-border: #E1E6ED;
}

body {
    font-family: "Open Sans", Arial, sans-serif;
}

/* LOGIN */

html:not(.dark-mode) body.task-login,
html:not(.dark-mode) .task-login #layout,
html:not(.dark-mode) .task-login #layout-content {
    background: #F3F6FB !important;
}

.task-login #layout-content {
    overflow-y: auto;
    padding: 36px 18px !important;
    border-top: 4px solid var(--widum-blue);
}

.task-login #logo {
    display: block !important;
    position: static !important;
    margin: 18px auto 36px !important;
    width: 420px !important;
    max-width: 90% !important;
    height: auto !important;
    max-height: none !important;
}

.widum-login-heading {
    text-align: center;
    margin: 0 auto 24px;
}

.widum-login-heading h2 {
    color: var(--widum-blue);
    font-size: 27px;
    font-weight: 600;
    margin: 0 0 10px;
}

.widum-login-heading p {
    color: var(--widum-muted);
    font-size: 14px;
}

.task-login #login-form {
    position: relative !important;
    top: auto !important;
    width: 100% !important;
    max-width: 390px !important;
    padding: 28px !important;
    margin: 0 auto !important;
    border-radius: 16px;
}

html:not(.dark-mode) .task-login #login-form {
    background: #FFFFFF;
    border: 1px solid var(--widum-border);
    box-shadow: 0 8px 35px rgba(13,71,161,.06);
}

.task-login .form-control {
    min-height: 48px;
    border-radius: 8px !important;
}

.task-login #rcmloginsubmit {
    background: var(--widum-blue) !important;
    border-color: var(--widum-blue) !important;
    border-radius: 8px !important;
    font-weight: 600;
    min-height: 48px;
}

.task-login #rcmloginsubmit:hover {
    background: var(--widum-secondary) !important;
}

.widum-support {
    max-width: 390px;
    margin: 20px auto;
    text-align: center;
    font-size: 14px;
}

.widum-forgot {
    font-weight: 600;
}

.widum-support-contact {
    margin: 24px 0 16px;
    padding-top: 20px;
    border-top: 1px solid var(--widum-border);
    font-size: 13px;
    color: var(--widum-muted);
    line-height: 1.9;
}

.widum-home {
    font-size: 12px;
}

.widum-support a {
    color: var(--widum-blue);
}

/* MAIL INTERFACE */

html:not(.dark-mode) #layout-menu {
    background: var(--widum-secondary) !important;
}

html:not(.dark-mode) #layout-sidebar {
    background: #F3F6FB !important;
}

html:not(.dark-mode) #layout-sidebar .header,
html:not(.dark-mode) #layout-list .header,
html:not(.dark-mode) #layout-content .header {
    background: #FFFFFF !important;
    border-color: var(--widum-border) !important;
}

html:not(.dark-mode) #taskmenu a.selected,
html:not(.dark-mode) #taskmenu a:hover {
    background: var(--widum-blue) !important;
    color: #FFFFFF !important;
}

html:not(.dark-mode) #taskmenu a.compose {
    background: var(--widum-blue) !important;
    color: #FFFFFF !important;
    border-radius: 8px;
}

html:not(.dark-mode) .listing li.selected > a,
html:not(.dark-mode) .listing tr.selected > td {
    background: #DFE9FA !important;
    color: var(--widum-secondary) !important;
}

html:not(.dark-mode) .listing tbody td {
    border-color: #EEF1F5;
}

html:not(.dark-mode) .messagelist tr.unread td.subject {
    color: var(--widum-text);
    font-weight: 600;
}

html:not(.dark-mode) .btn-primary {
    background: var(--widum-blue);
    border-color: var(--widum-blue);
}

html:not(.dark-mode) .form-control:focus {
    border-color: var(--widum-blue);
    box-shadow: 0 0 0 3px rgba(13,71,161,.10);
}

html.dark-mode .widum-support a,
html.dark-mode .widum-login-heading h2 {
    color: #90B8FF;
}

html.dark-mode .widum-login-heading p,
html.dark-mode .widum-support-contact {
    color: #ADB8C9;
}

@media (max-width: 480px) {
    .task-login #layout-content {
        padding: 22px 14px !important;
    }

    .task-login #logo {
        margin: 10px auto 24px !important;
    }

    .widum-login-heading h2 {
        font-size: 24px;
    }

    .task-login #login-form {
        padding: 20px !important;
    }
}

/* BEGIN WIDUM BASIC 1.1 */

:root {
    --wm-primary: #0D47A1;
    --wm-primary-dark: #09357B;
    --wm-bg: #F1F5FA;
    --wm-card: #FFFFFF;
    --wm-text: #172333;
    --wm-muted: #64748B;
    --wm-line: #E2E8F0;
    --wm-hover: #EDF3FC;
    --wm-selected: #DCE8FA;
    --wm-radius: 10px;
}

/* BASE TYPOGRAPHY */

body {
    font-family: "Open Sans", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

button, input, select, textarea {
    font-family: inherit;
}

/* MAIN NAVIGATION */

html:not(.dark-mode) #layout-menu {
    background: var(--wm-primary-dark) !important;
}

html:not(.dark-mode) #taskmenu a {
    color: #E6EEFA;
    border-radius: 10px;
    transition: background-color .15s ease;
}

html:not(.dark-mode) #taskmenu a:hover,
html:not(.dark-mode) #taskmenu a.selected {
    background: rgba(255,255,255,.15) !important;
    color: #FFFFFF !important;
}

html:not(.dark-mode) #taskmenu a.compose {
    background: #FFFFFF !important;
    color: var(--wm-primary) !important;
    border-radius: 12px;
}

html:not(.dark-mode) #taskmenu a.compose:hover {
    background: #E3EDFC !important;
}

html:not(.dark-mode) #taskmenu a.compose:before {
    color: var(--wm-primary) !important;
}

/* MAIL PANELS */

html:not(.dark-mode) #layout-sidebar {
    background: var(--wm-bg) !important;
    border-color: var(--wm-line) !important;
}

html:not(.dark-mode) #layout-list,
html:not(.dark-mode) #layout-content {
    background: var(--wm-card);
    border-color: var(--wm-line) !important;
}

html:not(.dark-mode) #layout > div > .header {
    background: #FFFFFF !important;
    border-color: var(--wm-line) !important;
}

.header .header-title {
    font-weight: 600;
}

html:not(.dark-mode) .header-title {
    color: var(--wm-text);
}

/* FOLDERS */

#mailboxlist {
    padding: 8px 6px;
}

#mailboxlist li > a {
    border-radius: 8px;
    margin: 3px 4px;
}

html:not(.dark-mode) #mailboxlist li > a {
    color: var(--wm-text);
}

html:not(.dark-mode) #mailboxlist li > a:hover {
    background: #E5EDF9;
}

html:not(.dark-mode) #mailboxlist li.selected > a {
    background: var(--wm-selected) !important;
    color: var(--wm-primary-dark) !important;
    font-weight: 600;
}

#mailboxlist li.unread > a {
    font-weight: 600;
}

html:not(.dark-mode) #mailboxlist .unreadcount {
    background: var(--wm-primary);
    color: #FFFFFF;
    border-radius: 20px;
    padding: 2px 6px;
    font-size: 11px;
}

/* SEARCH */

html:not(.dark-mode) #layout-list .searchbar {
    background: #F1F5F9;
    border-color: var(--wm-line);
    border-radius: 10px;
    margin: 10px 8px;
}

html:not(.dark-mode) #layout-list .searchbar input {
    color: var(--wm-text);
}

/* MESSAGE LIST */

html:not(.dark-mode) #messagelist {
    background: #FFFFFF;
    color: var(--wm-text);
}

html:not(.dark-mode) #messagelist tbody td {
    border-bottom-color: #EEF2F7;
}

html:not(.dark-mode) #messagelist tr.unread > td {
    background: #F2F6FC;
}

#messagelist tr.unread td.subject,
#messagelist tr.unread .subject .fromto,
#messagelist tr.unread .subject .subject {
    font-weight: 600;
}

html:not(.dark-mode) #messagelist tr:hover > td {
    background: var(--wm-hover);
}

html:not(.dark-mode) #messagelist tr.selected > td {
    background: var(--wm-selected) !important;
    color: var(--wm-primary-dark) !important;
}

#messagelist td.subject {
    line-height: 1.55;
}

html:not(.dark-mode) #messagelist .date {
    color: var(--wm-muted);
}

/* TOOLBARS */

.toolbar a,
.header a.button {
    transition: background-color .15s ease;
}

html:not(.dark-mode) .header .toolbar a:not(.disabled):hover,
html:not(.dark-mode) .header a.button:hover {
    background: var(--wm-hover);
    border-radius: 8px;
}

html:not(.dark-mode) .toolbar a:not(.disabled):hover {
    color: var(--wm-primary);
}

/* BUTTONS */

.btn {
    border-radius: 8px !important;
}

html:not(.dark-mode) .btn-primary {
    background-color: var(--wm-primary) !important;
    border-color: var(--wm-primary) !important;
    font-weight: 600;
}

html:not(.dark-mode) .btn-primary:not(:disabled):hover {
    background-color: var(--wm-primary-dark) !important;
}

html:not(.dark-mode) .btn-secondary {
    background: #F1F5F9;
    border-color: #DCE4EF;
    color: var(--wm-text);
}

/* INPUTS AND COMPOSE */

.form-control {
    border-radius: 8px !important;
}

html:not(.dark-mode) .form-control {
    border-color: #DCE4EF;
}

html:not(.dark-mode) .form-control:focus {
    border-color: var(--wm-primary);
    box-shadow: 0 0 0 3px rgba(13,71,161,.10);
}

html:not(.dark-mode) #compose-attachments {
    background: var(--wm-bg);
    border-radius: 10px;
}

#composebody {
    line-height: 1.65;
}

/* POPUPS */

html:not(.dark-mode) .popover,
html:not(.dark-mode) .dropdown-menu,
html:not(.dark-mode) .ui-dialog {
    border-color: var(--wm-line);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(15,35,65,.10);
}

/* LOGIN POLISH */

html:not(.dark-mode) .task-login #layout {
    background: linear-gradient(
        145deg, #F5F8FC, #E8F0FA
    ) !important;
}

html:not(.dark-mode) .task-login #login-form {
    border-radius: 18px !important;
    box-shadow: 0 14px 45px rgba(13,71,161,.08);
}

.task-login #rcmloginsubmit {
    font-size: 15px;
    letter-spacing: .1px;
}

.widum-forgot {
    text-decoration: none;
}

.widum-forgot:hover {
    text-decoration: underline;
}

/* DESKTOP SPACING */

@media (min-width: 1201px) {
    #taskmenu a {
        margin-left: 4px;
        margin-right: 4px;
    }

    #messagelist td.subject {
        padding-top: 9px;
        padding-bottom: 9px;
    }

    #mailboxlist li > a {
        padding-top: 10px;
        padding-bottom: 10px;
    }
}

/* MOBILE */

@media (max-width: 767px) {
    #layout-list .searchbar {
        margin: 6px;
    }

    #mailboxlist li > a {
        min-height: 40px;
    }

    .task-login #login-form {
        max-width: 390px !important;
    }

    .task-login .widum-login-heading h2 {
        font-size: 24px;
    }
}

/* ACCESSIBILITY */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #6799E8;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    #taskmenu a,
    .toolbar a,
    .header a.button {
        transition: none;
    }
}

/* END WIDUM BASIC 1.1 */


/* BEGIN WIDUM MODERN */

/* COLORS */

html:not(.dark-mode) body {
    color: #172333;
}

html:not(.dark-mode) a {
    color: #0D47A1;
}

html:not(.dark-mode) #layout-menu,
html:not(.dark-mode) #taskmenu,
html:not(.dark-mode) #taskmenu .special-buttons,
html:not(.dark-mode) #layout-menu .popover-header {
    background: #EDF2F9 !important;
}

html:not(.dark-mode) #layout-menu {
    border-right: 1px solid #DCE4EF;
}

html:not(.dark-mode) #taskmenu a {
    background: transparent !important;
    color: #475569 !important;
}

html:not(.dark-mode) #taskmenu a:hover,
html:not(.dark-mode) #taskmenu a.selected {
    background: #DCE8FA !important;
    color: #0D47A1 !important;
}

html:not(.dark-mode) #taskmenu a.compose {
    background: #0D47A1 !important;
    color: #FFFFFF !important;
}

html:not(.dark-mode) #taskmenu a.compose:before {
    color: #FFFFFF !important;
}

html:not(.dark-mode) #taskmenu a.logout {
    color: #B42318 !important;
}

#taskmenu a {
    border-radius: 9px;
}

/* MAIN MENU: DESKTOP */

@media (min-width: 1201px) {

    #layout-menu {
        width: 110px !important;
        flex: 0 0 110px !important;
    }

    #layout-menu .popover-header img {
        max-width: 46px !important;
        max-height: 46px !important;
        object-fit: contain;
    }

    #taskmenu a {
        margin: 4px 7px;
        padding-left: 3px;
        padding-right: 3px;
    }

    #taskmenu a .inner {
        font-size: 12px;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        line-height: 1.3;
    }

    #layout-sidebar {
        min-width: 235px;
    }
}

/* FOLDER LIST */

html:not(.dark-mode) #layout-sidebar {
    background: #F7F9FC !important;
}

#mailboxlist {
    padding: 8px !important;
}

#mailboxlist li > a {
    margin: 2px 0 !important;
    padding-top: 5px !important;
    padding-bottom: 5px !important;
    min-height: 40px;
    line-height: 30px !important;
    border-radius: 8px !important;
}

#mailboxlist li > a:before {
    height: 30px !important;
    line-height: 30px !important;
}

html:not(.dark-mode) #mailboxlist li.selected > a {
    background: #E0EAFB !important;
    color: #0D47A1 !important;
}

#layout-sidebar .username {
    font-size: 13px;
    font-weight: 600;
}

/* SEARCH AND TOOLBARS */

html:not(.dark-mode) #layout-list .searchbar {
    background: #F1F5F9 !important;
    border: 1px solid #E1E7EF;
    border-radius: 9px !important;
}

@media (min-width: 1201px) {

    .header .toolbar a .inner {
        font-size: 12px;
    }

    .header .toolbar a:before {
        font-size: 18px;
    }

}

html:not(.dark-mode) .header .toolbar a:not(.disabled) {
    color: #475569;
}

html:not(.dark-mode) .header .toolbar a:not(.disabled):hover {
    color: #0D47A1;
    background: #EDF3FC;
}

/* MAIL LIST */

html:not(.dark-mode) #messagelist tr.unread > td {
    background: #F3F7FD;
}

html:not(.dark-mode) #messagelist tr.selected > td {
    background: #E0EAFB !important;
}

#messagelist .subject {
    font-size: 14px;
}

#messagelist .fromto,
#messagelist .date {
    font-size: 12px;
}

html:not(.dark-mode) #messagelist .fromto,
html:not(.dark-mode) #messagelist .date {
    color: #64748B;
}

/* MESSAGE PREVIEW */

html:not(.dark-mode) #message-header {
    background: #FFFFFF;
    color: #172333;
}

html:not(.dark-mode) #message-header a {
    color: #0D47A1;
}

#message-header h2,
#message-header .subject {
    font-weight: 600;
}

html:not(.dark-mode) #layout-content > .footer,
html:not(.dark-mode) #layout-sidebar > .footer,
html:not(.dark-mode) #layout-list > .footer {
    background: #F7F9FC !important;
    border-color: #E2E8F0 !important;
}

/* MOBILE */

@media (max-width: 767px) {
    #mailboxlist li > a {
        min-height: 44px;
        line-height: 34px !important;
    }
}

/* END WIDUM MODERN */


/* BEGIN WIDUM TYPOGRAPHY */

:root {
    --wm-font: "Open Sans", "Segoe UI", Arial, sans-serif;
}

/* INTERFACE */

body,
button,
input,
select,
textarea,
.form-control {
    font-family: var(--wm-font);
}

#messagelist td.subject {
    font-family: var(--wm-font);
    font-size: 14px;
    line-height: 1.55;
}

#mailboxlist li > a {
    font-family: var(--wm-font);
    font-size: 14px;
}

#message-header h2,
#message-header .subject {
    font-family: var(--wm-font);
    font-size: 21px;
    font-weight: 600;
    line-height: 1.4;
}

#message-header {
    font-family: var(--wm-font);
    font-size: 14px;
}

/* PLAIN TEXT MESSAGES */

.message-part,
.message-part div.pre,
#messagebody .message-part div.pre,
#messagebody .message-part pre {
    font-family: var(--wm-font) !important;
    font-size: 15px !important;
    font-weight: 400;
    line-height: 1.65 !important;
}

html:not(.dark-mode) #messagebody .message-part {
    color: #243247;
}

/* HTML MAIL: DEFAULT FONT ONLY */

.message-htmlpart {
    font-family: var(--wm-font);
    font-size: 15px;
    line-height: 1.65;
}

/* PLAIN TEXT EDITOR */

textarea#composebody {
    font-family: var(--wm-font) !important;
    font-size: 15px !important;
    line-height: 1.65;
    padding: 14px;
}

@media (max-width: 767px) {
    #message-header h2,
    #message-header .subject {
        font-size: 18px;
    }
}

/* END WIDUM TYPOGRAPHY */


/* BEGIN WIDUM 1.2 POLISH */

@media (min-width: 1201px) {

    #layout-content .header .toolbar a.reply {
        min-width: 96px;
    }

    #layout-content .header .toolbar a.reply .inner {
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        font-size: 12px;
        line-height: 1.3;
    }

    #taskmenu a.about .inner,
    #taskmenu a.theme .inner {
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
    }
}

#mailboxlist li > a {
    text-transform: none;
}

.widum-about {
    font-family: var(--wm-font, Arial, sans-serif);
    padding: 20px 12px;
    text-align: center;
    line-height: 1.65;
}

.widum-about img {
    object-fit: contain;
    margin-bottom: 12px;
}

.widum-about h2 {
    font-size: 26px;
    font-weight: 600;
    margin: 0 0 6px;
}

.widum-about .widum-version {
    font-size: 13px;
    margin-bottom: 18px;
}

html:not(.dark-mode) .widum-about h2,
html:not(.dark-mode) .widum-about a {
    color: #0D47A1;
}

.widum-about hr {
    opacity: .25;
    margin: 20px 0;
}

/* END WIDUM 1.2 POLISH */


/* BEGIN WIDUM PWA */

.widum-pwa-install {
    cursor: pointer;
    text-decoration: none !important;
}

.widum-pwa-login {
    display: block;
    margin: 14px auto;
    padding: 10px 18px;
    max-width: 290px;
    border: 1px solid #D5E1F2;
    border-radius: 9px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
}

html:not(.dark-mode) .widum-pwa-login {
    color: #0D47A1;
    background: #EDF3FC;
}

html:not(.dark-mode) .widum-pwa-login:hover {
    background: #DCE8FA;
}

#taskmenu .widum-pwa-menu:before {
    content: "\2193" !important;
    font-family: Arial, sans-serif !important;
    font-size: 25px !important;
    font-weight: 700;
}

#taskmenu .widum-pwa-menu .inner {
    font-size: 12px;
}

@media (display-mode: standalone) {
    .widum-pwa-install {
        display: none !important;
    }
}

/* END WIDUM PWA */


/* BEGIN WIDUM INSTALL OFFER */

#widum-install-offer {
    position: fixed;
    right: 22px;
    bottom: 24px;
    width: 340px;
    max-width: calc(100vw - 32px);
    padding: 20px;
    z-index: 1050;
    border: 1px solid #DCE4EF;
    border-radius: 16px;
    background: #FFFFFF;
    color: #243247;
    box-shadow: 0 10px 40px rgba(13,71,161,.15);
    font-family: var(--wm-font, Arial, sans-serif);
}

.widum-install-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.widum-install-header img {
    width: 44px;
    height: 44px;
    border-radius: 9px;
}

.widum-install-header strong {
    flex: 1;
    font-size: 15px;
}

.widum-install-close {
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 25px;
    cursor: pointer;
}

#widum-install-offer p {
    font-size: 13px;
    line-height: 1.6;
    margin: 14px 0;
}

.widum-install-primary {
    width: 100%;
    border: 0;
    border-radius: 9px;
    padding: 11px;
    background: #0D47A1;
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.widum-install-later {
    width: 100%;
    border: 0;
    padding: 10px;
    background: transparent;
    color: inherit;
    font-size: 13px;
    cursor: pointer;
}

html.dark-mode #widum-install-offer {
    background: #253142;
    color: #E5EAF3;
    border-color: #3B4B60;
}

@media (max-width: 600px) {
    #widum-install-offer {
        right: 16px;
        bottom: 16px;
    }
}

@media (display-mode: standalone) {
    #widum-install-offer,
    #widum-pwa-install {
        display: none !important;
    }
}

/* END WIDUM INSTALL OFFER */


/* BEGIN WIDUM PWA 1.7.2 */

#widum-install-fallback {
    position: fixed;
    right: 18px;
    bottom: 42px;
    z-index: 1040;
    background: #0D47A1;
    color: #FFFFFF !important;
    padding: 9px 16px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    box-shadow: 0 3px 14px rgba(13,71,161,.15);
}

#widum-install-offer {
    z-index: 1060 !important;
}

#widum-install-offer a.widum-install-primary {
    display: block;
    text-align: center;
    text-decoration: none;
    color: #FFFFFF !important;
}

@media (display-mode: standalone) {
    #widum-install-fallback,
    #widum-install-offer {
        display: none !important;
    }
}

/* END WIDUM PWA 1.7.2 */

