@font-face {
    font-family: Inter;
    src: url(../webfonts/Inter-VariableFont.ttf) format("truetype-variations");
    font-weight: 100 900;
    font-display: swap;
}

body {
    font-size: 16px;
    line-height: 150%;
    letter-spacing: .008em;
    font-family: Inter, Arial, Helvetica, system-ui;
}

:root {
    --spacing-xxs: 0.25rem; /* 4px */
    --spacing-xs: 0.5rem; /* 8px */
    --spacing-s: 1rem; /* 16px */
    --spacing-m: 1.5rem; /* 24px */
    --spacing-l: 2rem; /* 32px */
    --spacing-xl: 2.5rem; /* 40px */

    --primary-color: #366B63;
    --primary-color-50: #EDF5F3;
    --primary-color-100: #DAEDE8;
    --primary-color-200: #B5DAD0;
    --primary-color-300: #88C0B3;
    --primary-color-600: #366B63;
    --primary-color-700: #2E5751;
    --primary-color-800: #284743;
    --primary-color-900: #253C39;
    --primary-color-950: #112221;

    --gray-shade-50: #F7F8F7;
    --gray-shade-100: #ECEEED;
    --gray-shade-200: #DADDDB;
    --gray-shade-300: #B9C0BC;
    --gray-shade-400: #929E97;
    --gray-shade-600: #5F6A64;
    --gray-shade-700: #4D5752;
    --gray-shade-800: #424A46;
    --gray-shade-950: #272A28;

    --success-100: #E4F5E3;
    --success-200: #CAEAC8;
    --success-300: #A0D89D;
    --success-400: #6DBE6A;
    --success-700: #2E692C;
    --success-900: #224522;
    --success-950: #0E250F;

    --warning-50: #FDF6EF;
    --warning-100: #FAE9DA;
    --warning-200: #F3D0B5;
    --warning-300: #EBB186;
    --warning-400: #E07D46;
    --warning-600: #CD5229;
    --warning-700: #AB3E23;
    --warning-800: #893423;
    --warning-900: #6E2D20;
    --warning-950: #3B140F;

    --danger-50: #FDF5F2;
    --danger-100: #FCEAE3;
    --danger-200: #FAD6CC;
    --danger-400: #EC8D7E;
    --danger-600: #C83732;
    --danger-700: #AE292B;
    --danger-800: #8D252C;
    --danger-900: #792530;
    --danger-950: #3E0F17;

    --info-50: #F2F8FD;
    --info-100: #E4EEFA;
    --info-200: #C2DCF5;
    --info-300: #8DC1EC;
    --info-400: #3C97DD;
    --info-600: #1A69AF;
    --info-700: #16548E;
    --info-800: #164876;
    --info-900: #183E62;
    --info-950: #102741;
}

footer {
    margin-top: var(--spacing-l);
}

.navbar {
    color: white;
    background-position: center center;
    background-image: linear-gradient(270deg, rgba(46,87,81,1.00) 30%,rgba(69,135,122,1.00) 57%,rgba(46,87,81,1.00) 86%);
}

.nav-link {
    cursor: pointer;
    color: var(--gray-shade-950);
}

.nav-link:hover {
    color: var(--primary-color-700);
}

.nav-link.active {
    font-weight: 700;
    color: var(--primary-color-800) !important;
    background-color: var(--gray-shade-200) !important;
}

[data-detail-href], [data-auto-start], [data-action] {
    cursor: pointer;
}

.main-feedback-panel {
    margin: 0;
    width: fit-content;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000;
}

.z-index-1 {
    z-index: 1;
}

.user-manual main {
    width: 66%;
}

/* forms */

.form-label {
    margin-bottom: var(--spacing-xs);
    color: var(--gray-shade-950);
    font-size: 16px;
    font-weight: 500;
}

.input-valid {
    border-color: #a8c2a8;
}

.input-invalid {
    border-color: darkred;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active{
    /** Unfortunately works only the first time something is autofilled */
    transition: background-color 0s 600000s, color 0s 600000s !important;
}

.form-check {
    margin: 0;
}

input::placeholder {
    opacity: 1 !important;
    color: var(--gray-shade-600) !important;
}

input[type="number"], input.number {
    text-align: right;
}

.bigger-input {
    padding: 1rem;
    font-size: 18px;
}

/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
input[type=number] {
    -moz-appearance: textfield;
}

input[type="checkbox"] {
    font-size: 17px;
    background-color: white !important;
}

input[type="checkbox"]:checked {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important
}

.form-switch input[type="checkbox"].form-check-input,
.form-switch input[type="checkbox"].form-check-input:focus {
    border-color: var(--primary-color) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23366B63'/%3e%3c/svg%3e");
}

.form-switch input[type="checkbox"].form-check-input:checked {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='white'/%3e%3c/svg%3e");
}

.form-switch input[type="checkbox"].form-check-input:focus {
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.25) !important;
}

input[type="radio"] {
    appearance: none;
    background-color: #fff;
    margin: 0;
}

.fake-radio-button, input[type="radio"]  {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: var(--gray-shade-300) 1px solid;
    border-radius: 50%;
    margin: 12px;
}

.fake-radio-button.selected, input[type="radio"]:checked {
    border-color: var(--info-400);
    border-width: 4px;
}

.fake-checkbox, input[type="checkbox"]  {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 1px solid rgba(0, 0, 0, .25);
    border-radius: .25em;
}

.fake-checkbox.checked, input[type="checkbox"]:checked {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.radio-group {
    display: inline-flex;
    align-items: center;
}

.input-group:focus-within {
    border: 0px;
    border-radius: 4px;
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.25) !important;
}

/* Depending on whether the icon or fixed text comes first, the borders need to be removed */
.input-group .input-group-text:first-child, .input-group input:first-child {
    border-right: 0px;
}

.input-group .input-group-text:nth-child(2), .input-group input:nth-child(2) {
    border-left: 0px;
}

.input-group input:nth-child(2) {
    padding-left: 0px;
}

.input-group input:focus {
    box-shadow: none;
    outline: none;
    /* Matches the standard border color of the inputs */
    border-color: rgb(206, 212, 218);
}

.input-group-text {
    background-color: white;
    color: var(--gray-shade-600);
}

.input-group .input-group-text span {
    filter: brightness(0) saturate(100%) invert(85%) sepia(7%) saturate(158%) hue-rotate(93deg) brightness(90%) contrast(91%);
}

.dropdown-item:active {
    color: var(--gray-shade-950);
    background-color: var(--gray-shade-200);
}

/* Search select */
select.filter-select {
    background-color: var(--gray-shade-200);
    line-height: 150%;
    outline: 0;
    font-weight: 600;
    color: var(--primary-color-800);
    font-size: 14px;
}

/* autocomplete */

.auto-complete-wrapper {
    position: relative;
    width: 100%
}

.auto-complete-wrapper > ul {
    background: white;
    position: absolute;
    max-height: 400px;
    overflow-y: scroll;
    top: 100%;
    left: 0;
    right: 0;
    padding: 0;
    margin: 0.3rem;
    border-radius: 4px;
    border: 1px solid rgba(33, 33, 33, 0.1);
    z-index: 1000;
    outline: none;
}

.auto-complete-wrapper > ul > li { 
    padding: 8px 16px;
    list-style: none;
    text-align: left;
    font-size: 16px;
    color: #212121;
    border-radius: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.2s ease;
}

.auto-complete-wrapper > ul > li:hover,
.auto-complete-wrapper > ul > li[aria-selected="true"]  {
    cursor: pointer;
    background-color: #eee;
}

.auto-complete-wrapper > ul > li mark {
    background-color: transparent;
    color: darkblue;
    font-weight: bold;
    padding: 0;
}

/** Field Clearer */
.field-clearer {
    font-size: 1.3rem;
    font-weight: 400;
    cursor: pointer;
    position: absolute;
    right: 15px;
    bottom: 7px;
}
.field-clearer:hover {
    font-weight: 600;
}

fieldset[disabled] .field-clearer {
    display: none;
}

/** common */

a {
    cursor: pointer;
    color: var(--primary-color);
}

a:hover {
    color: var(--primary-color-700);
}

a:active {
    color: var(--primary-color-800);
}

a:focus-visible {
    color: var(--primary-color-700);
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.25);
}

a .delete-link {
    color: var(--danger-600);
}

.nav-breadcrumbs {
    display: inline-block;
}

.icon-s svg {
    width: 16px;
    height: 16px;
}

.icon-m svg {
    width: 20px;
    height: 20px;
}

.icon-l svg {
    width: 24px;
    height: 24px;
}

.chip {
    background: #e5e5e5;
    padding: 1px 8px;
    min-width: 60px;
    text-align: center;
    border-radius: 4px;
}

.chip .remover {
    cursor: pointer;
    padding: 0 2px 0 8px;
}

.comma-separated ~ .comma-separated::before {
    content: ', ';
}

.loading-spinner {
    display: none;
}

.workflow-step-number {
    display: inline-block;
    width: 30px;
    height: 30px;
    text-align: center;
}

/** TABLES */

.table-dense td, .table-dense th {
    padding: 0.25rem 0.5rem;
}

.table-row-no-border tr, .table-row-no-border th, .table-row-no-border td {
    border-width: 0;
    border-style: none;
}

.table-scroll-wrapper, .scroll-content-wrapper {
    width: 100%;
    overflow-y: scroll;
    height: calc(100vh - 200px);
    margin: 0;
}

table.sticky-header th {
    background: white;
    position: sticky;
    top: 0;
}

table tr.table-filter th {
    padding: 2px 3px;
}

.table-responsive thead {
    background: var(--gray-shade-200);
}

.table-responsive tbody td {
    vertical-align: middle;
    padding: calc(var(--spacing-xs) + var(--spacing-xxs))  var(--spacing-xs);
}

.table-responsive th, .table-responsive a {
    color: var(--gray-shade-950);
    text-decoration: none;
}

.table-responsive tbody tr:last-child {
    border-bottom-color: white;
}

/* pager */
.page-link {
    color: var(--gray-shade-950);
}

.page-link:hover {
    background: var(--primary-color-100);
    color: var(--gray-shade-950);
}

.page-item.active > .page-link {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

/* Modal */
.custom-dialog {
    margin-top: 20vh;
}

.custom-dialog .modal-content {
    padding: var(--spacing-l);
    border-radius: 0;
}

.custom-dialog .modal-content .close-custom-dialog svg {
    width: 24px;
    height: 24px;
    cursor: pointer;
}

/* Layout optimization */

.w-90 {
    width: 90%;
}

.w-80 {
    width: 80%;
}

.w-66 {
    width: 66.66666%;
}

.w-60 {
    width: 60%;
}

.w-40 {
    width: 40%;
}

.w-33 {
    width: 33.3333%;
}

.w-20 {
    width: 20%;
}

.w-10 {
    width: 10%;
}

.gap-xxs {
    gap: var(--spacing-xxs);
}

.gap-xs {
    gap: var(--spacing-xs);
}

.gap-s {
    gap: var(--spacing-s);
}

.gap-m {
    gap: var(--spacing-m);
}

.gap-l {
    gap: var(--spacing-l);
}

.gap-xl {
    gap: var(--spacing-xl);
}

.status-model-collapse {
    top: 0;
    right: 0;
    height: 100%;
    width: 1000px;
    position: fixed;
    overflow: scroll;
    box-shadow: 0 2px 8px 0 #C2C2C2;
}

.status-model-collapse.collapsing {
    right: -1000px;
    transition: height 0s ease;
}

.status-model-collapse.show {
    right: 0;
    transition: right 300ms ease-in-out;
}

.status-model-collapse-trigger.collapsed ~ .status-model-collapse {
    transition: right 500ms ease-in-out;
}

/** Accordion */
.accordion-link[aria-expanded="true"] .expand-filters-text {
    display: none;
}

.accordion-link[aria-expanded="true"] .collapse-filters-text {
    display: block;
}

.accordion-link[aria-expanded="false"] .collapse-filters-text {
    display: none;
}

.accordion-link[aria-expanded="false"] .expand-filters-text {
    display: block;
}