﻿html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

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

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

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

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

/* Панель ошибок Blazor - темная тема */
#blazor-error-ui {
    background: linear-gradient(to top, #1a1a1d, #0f0f11);
    border-top: 1px solid hsla(255, 45%, 55%, 0.3);
    bottom: 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 1rem 1.5rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

/* Текст ошибки */
#blazor-error-ui {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
}

    /* Кнопка Reload */
    #blazor-error-ui .reload {
        color: hsl(255, 45%, 65%);
        text-decoration: none;
        font-weight: 600;
        padding: 0.25rem 0.75rem;
        margin-left: 0.5rem;
        border: 1px solid hsla(255, 45%, 55%, 0.5);
        border-radius: 4px;
        background: hsla(255, 45%, 55%, 0.1);
        transition: all 0.3s ease;
    }

        #blazor-error-ui .reload:hover {
            background: hsla(255, 45%, 55%, 0.2);
            border-color: hsl(255, 45%, 55%);
            color: hsl(255, 45%, 75%);
        }

    /* Кнопка закрытия (X) */
    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 1rem;
        top: 50%;
        transform: translateY(-50%);
        color: rgba(255, 255, 255, 0.4);
        font-size: 24px;
        line-height: 1;
        padding: 0.5rem;
        transition: color 0.3s ease;
    }

        #blazor-error-ui .dismiss:hover {
            color: rgba(255, 255, 255, 0.8);
        }

/* Граница ошибки в компонентах */
.blazor-error-boundary {
    background: linear-gradient(135deg, hsla(0, 60%, 50%, 0.1), hsla(0, 60%, 40%, 0.05));
    border: 1px solid hsla(0, 60%, 50%, 0.3);
    border-radius: 4px;
    padding: 1rem;
    margin: 1rem 0;
    color: #ff6b6b;
    position: relative;
}

    .blazor-error-boundary::before {
        content: "⚠";
        font-size: 24px;
        margin-right: 0.5rem;
        vertical-align: middle;
    }

    .blazor-error-boundary::after {
        content: "Произошла ошибка в компоненте";
        color: rgba(255, 255, 255, 0.7);
    }

/* Минималистичный загрузчик для темной темы */
.minimal-loader {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #09090b;
    z-index: 9999;
}

/* Пульсирующая точка */
.minimal-dot {
    width: 4px;
    height: 4px;
    background: hsl(255, 45%, 55%);
    border-radius: 50%;
    margin-bottom: 24px;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }

    50% {
        transform: scale(1.5);
        opacity: 1;
    }
}

/* Контейнер прогресс-бара */
.minimal-progress {
    width: 200px;
}

/* Фон прогресс-бара */
.minimal-progress-bar {
    height: 2px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 1px;
    overflow: hidden;
    position: relative;
}

/* Заполнение прогресс-бара - управляется Blazor */
.minimal-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, hsl(255, 45%, 45%), hsl(255, 45%, 55%), hsl(255, 45%, 45%));
    width: calc(var(--blazor-load-percentage, 0%) * 1);
    transition: width 0.3s ease;
    position: absolute;
    top: 0;
    left: 0;
}

/* Текст загрузки - автоматически от Blazor */
.minimal-loading-text {
    margin-top: 16px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Контент от Blazor для текста загрузки */
.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

code {
    color: #c02d76;
}

.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;
}
