/* Copyright (C) 2026 Kreativität Works <mail@kreativitat.com>
 * SPDX-License-Identifier: MIT
 * Additive overrides: keep Elastic's layout, icons and interaction states.
 */
:root {
    --krea-orange: #ff5b14;
    --krea-ink: #171714;
    --krea-paper: #f3f1eb;
    --krea-line: #cccac2;
    --krea-link: #b23b00;
    --krea-selection: #ffeadf;
}

html.dark-mode {
    --krea-link: #ff854f;
    --krea-selection: #453126;
}

body, input, button, select, textarea {
    font-family: Arial, Helvetica, sans-serif;
}

a, .btn-link {
    color: var(--krea-link);
}

a:hover, .btn-link:hover {
    color: var(--krea-link);
}

body.task-login #layout-content {
    background: var(--krea-paper);
    color: var(--krea-ink);
    border-top: 5px solid var(--krea-orange);
}

body.task-login #logo {
    top: 12vh;
    width: min(300px, calc(100vw - 64px));
    max-width: 300px;
    max-height: none;
    height: auto;
}

body.task-login #login-form {
    top: 17vh;
    max-width: 340px;
    width: calc(100% - 48px);
}

body.task-login #login-footer {
    color: #62625a;
    font-size: .875rem;
}

body.task-login .form-control,
body.task-login .input-group-text {
    background-color: #fff;
    border-color: var(--krea-line);
    color: var(--krea-ink);
}

html.dark-mode body.task-login #layout-content {
    background: var(--krea-ink);
    color: var(--krea-paper);
}

html.dark-mode body.task-login #logo {
    background: var(--krea-paper);
    padding: 16px;
    border-radius: 2px;
    opacity: 1;
}

html.dark-mode body.task-login #login-footer {
    color: #c7c5bd;
}

html.dark-mode body.task-login .form-control,
html.dark-mode body.task-login .input-group-text {
    background-color: #252521;
    border-color: #55554d;
    color: var(--krea-paper);
}

html.dark-mode body.task-login .form-control::placeholder {
    color: #b8b8af;
}

html body .btn-primary,
html.dark-mode body .btn-primary,
html body .btn-primary:focus,
html.dark-mode body .btn-primary:focus,
html body button.mainaction,
html body button.mainaction:focus,
html body .floating-action-buttons a.button {
    background: var(--krea-orange);
    border-color: var(--krea-orange);
    color: var(--krea-ink);
    box-shadow: none;
}

html body .btn-primary:hover:not(:disabled):not(.disabled),
html.dark-mode body .btn-primary:hover:not(:disabled):not(.disabled),
html body .btn-primary:not(:disabled):not(.disabled):active,
html body .btn-primary:not(:disabled):not(.disabled).active,
html.dark-mode body .btn-primary:not(:disabled):not(.disabled):active,
html.dark-mode body .btn-primary:not(:disabled):not(.disabled).active,
html body button.mainaction:hover,
html body .floating-action-buttons a.button:hover {
    background: #ef4e0a;
    border-color: #ef4e0a;
    color: var(--krea-ink);
}

html body .btn-primary:disabled,
html body .btn-primary.disabled,
html.dark-mode body .btn-primary:disabled,
html.dark-mode body .btn-primary.disabled,
html body button.mainaction:disabled {
    background: var(--krea-orange);
    border-color: var(--krea-orange);
    color: var(--krea-ink);
    opacity: .55;
}

.form-control:focus,
.custom-select:focus,
html.dark-mode .form-control:focus,
html.dark-mode .custom-select:focus,
html body.task-login .form-control:focus,
html.dark-mode body.task-login .form-control:focus {
    border-color: var(--krea-link);
    box-shadow: 0 0 0 .2rem rgb(255 91 20 / 18%);
}

html body a:focus-visible,
html body button:focus-visible,
html body input:focus-visible,
html body select:focus-visible,
html body textarea:focus-visible {
    outline: 3px solid var(--krea-link);
    outline-offset: 3px;
}

html body .btn-primary:focus,
html.dark-mode body .btn-primary:focus,
html body button.mainaction:focus {
    outline: 3px solid var(--krea-link);
    outline-offset: 3px;
}

/* The navigation keeps Elastic's desktop rail and mobile popover geometry. */
html #layout-menu,
html #taskmenu .special-buttons,
html #layout-menu .popover-header {
    background-color: var(--krea-ink) !important;
}

html #layout-menu #logo {
    opacity: 1;
}

html #taskmenu a {
    color: var(--krea-paper);
    border-bottom-color: #393932 !important;
}

html #taskmenu a.selected,
html #taskmenu a.selected:hover {
    color: var(--krea-orange);
    background: #30302a;
    box-shadow: inset 3px 0 var(--krea-orange);
}

html #taskmenu a:hover,
html #taskmenu a:focus {
    background: #30302a;
}

html #taskmenu .action-buttons a,
html #taskmenu .action-buttons a:hover {
    color: var(--krea-orange);
}

.listing li.selected,
.listing tr.selected td,
.listing li.selected a {
    background-color: var(--krea-selection);
    color: var(--krea-ink);
}

html.dark-mode .listing li.selected,
html.dark-mode .listing tr.selected td,
html.dark-mode .listing li.selected a {
    background-color: var(--krea-selection);
    color: var(--krea-paper);
}

@media (max-height: 540px) {
    body.task-login #logo { top: 4vh; }
    body.task-login #login-form { top: 8vh; }
}

@media print {
    body { font-family: Arial, Helvetica, sans-serif; }
}
