:root {
    color-scheme: dark;
    font-family: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
    font-synthesis: none;
}

html {
    min-height: 100%;
    background: #0e0c0a;
    scroll-behavior: smooth;
}

body {
    min-height: 100%;
    margin: 0;
    color: #f5efe6;
    background: #0e0c0a;
    font-family: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

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

a,
.btn-link {
    color: #edc68f;
}

::selection {
    color: #23170b;
    background: #d9a15b;
}

:focus-visible {
    outline: 2px solid #d9a15b;
    outline-offset: 3px;
}

.btn-primary {
    color: #23170b;
    border-color: #d9a15b;
    background-color: #d9a15b;
}

.content {
    padding-top: 1rem;
}

.valid.modified:not([type="checkbox"]) {
    outline: 1px solid #9cb77f;
}

.invalid {
    outline: 1px solid #dd827b;
}

.validation-message {
    color: #e8aaa5;
}

#blazor-error-ui {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    left: 1rem;
    z-index: 20;
    display: none;
    width: min(36rem, calc(100% - 2rem));
    margin-inline: auto;
    padding: 0.85rem 3rem 0.85rem 1rem;
    color: #f5efe6;
    border: 1px solid rgba(217, 161, 91, 0.42);
    border-radius: 12px;
    background: #251d15;
    box-shadow: 0 20px 48px rgba(5, 4, 3, 0.34);
    font-size: 0.88rem;
}

#blazor-error-ui .reload {
    margin-left: 0.35rem;
    font-weight: 700;
}

#blazor-error-ui .dismiss {
    position: absolute;
    top: 50%;
    right: 0.85rem;
    display: grid;
    width: 1.7rem;
    height: 1.7rem;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 8px;
    color: #aaa095;
    background: transparent;
    cursor: pointer;
    transform: translateY(-50%);
}

.blazor-error-boundary {
    padding: 1rem 1rem 1rem 1.2rem;
    color: #e8aaa5;
    border: 1px solid rgba(221, 130, 123, 0.34);
    border-left: 3px solid #dd827b;
    border-radius: 12px;
    background: #251716;
}

.blazor-error-boundary::after {
    content: "Не удалось отобразить этот раздел.";
}

#app {
    min-height: 100dvh;
}

.loading-shell {
    position: fixed;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 20rem);
    place-content: center;
    justify-items: center;
    padding: 2rem;
    text-align: center;
    background:
        radial-gradient(circle at 84% -8%, rgba(217, 161, 91, 0.14), transparent 34rem),
        #0e0c0a;
}

.loading-brandmark {
    display: grid;
    width: 3.25rem;
    height: 3.25rem;
    margin-bottom: 0.8rem;
    place-items: center;
    color: #23170b;
    border-radius: 12px;
    background: #d9a15b;
    box-shadow: 0 14px 34px rgba(5, 4, 3, 0.3);
    font-size: 1.15rem;
    font-weight: 800;
}

.loading-kicker,
.loading-label {
    margin: 0;
}

.loading-kicker {
    color: #f5efe6;
    font-size: 1.05rem;
    font-weight: 750;
    letter-spacing: -0.02em;
}

.loading-label {
    margin-top: 0.22rem;
    color: #aaa095;
    font-size: 0.78rem;
}

.loading-progress {
    grid-row: 4;
    grid-column: 1;
    display: block;
    width: 3.4rem;
    height: 3.4rem;
    margin-top: 1.2rem;
}

.loading-progress circle {
    fill: none;
    stroke: rgba(243, 231, 214, 0.1);
    stroke-width: 0.38rem;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

.loading-progress circle:last-child {
    stroke: #d9a15b;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
}

.loading-progress-text {
    grid-row: 4;
    grid-column: 1;
    align-self: center;
    justify-self: center;
    margin-top: 1.2rem;
    color: #aaa095;
    font-size: 0.58rem;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.loading-progress-text::after {
    content: var(--blazor-load-percentage-text, "Загрузка");
}

code {
    color: #edc68f;
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
