/* Segist colors over Roundcube Elastic. Brand tokens match resources/css/app.css:
   teal #0f5e59 (actions), hover #0b4a46, soft #e3f0ee, ink #13233a, saffron #e9a23b. */

a,
.link,
a.link,
.formlinks a,
#layout-content .header a.button,
.popover-header a {
    color: #0f5e59;
}

.btn-primary,
.btn-primary.disabled,
.btn-primary:disabled,
.mainaction,
button.mainaction,
input.button.mainaction,
.ui-dialog .ui-dialog-buttonpane .ui-button.mainaction,
#layout-menu a.compose,
#layout-menu .compose {
    background-color: #0f5e59 !important;
    border-color: #0f5e59 !important;
    color: #fff !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:not(:disabled):not(.disabled):active,
.mainaction:hover,
.mainaction:focus,
#layout-menu a.compose:hover {
    background-color: #0b4a46 !important;
    border-color: #0b4a46 !important;
}

/* Sidebar (task menu) in Segist ink */
#layout-menu {
    background-color: #13233a;
}
#layout-menu a.selected,
#layout-menu a:hover,
#layout-menu a:focus {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.08);
}
#layout-menu a.selected::before,
#layout-menu a.selected {
    border-color: #e9a23b;
}

/* Selection, focus and toggles */
.listing li.selected,
.listing tr.selected td,
table.records-table tr.selected td,
.listing li.selected > a,
.treelist li.selected > div,
.treelist li.selected > a {
    background-color: #e3f0ee !important;
    color: #13233a;
}
.form-control:focus,
.custom-select:focus,
input:focus,
textarea:focus,
select:focus {
    border-color: #0f5e59 !important;
    box-shadow: 0 0 0 0.2rem rgba(15, 94, 89, 0.2) !important;
}
.custom-switch .custom-control-input:checked ~ .custom-control-label::before,
.custom-control-input:checked ~ .custom-control-label::before {
    background-color: #0f5e59;
    border-color: #0f5e59;
}
.unread .subject a,
.msgcount,
.unreadcount,
.listing li .unreadcount {
    color: #0f5e59;
}
.listing li .unreadcount,
.treelist .unreadcount {
    background-color: #0f5e59 !important;
    color: #fff !important;
}

/* Login page */
#layout > .login,
body.task-login {
    background-color: #f6f8f7;
}
#login-form {
    border-top: 4px solid #0f5e59;
}
#logo {
    max-height: 56px;
}
.segist-panel-link {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.875rem;
}

/* Dark mode */
html.dark-mode a,
html.dark-mode .link {
    color: #5fc4b8;
}
html.dark-mode #layout-menu {
    background-color: #0d1828;
}
html.dark-mode .listing li.selected,
html.dark-mode .listing tr.selected td,
html.dark-mode .treelist li.selected > a {
    background-color: rgba(95, 196, 184, 0.16) !important;
    color: #fff;
}
html.dark-mode body.task-login {
    background-color: #0d1828;
}
