/* =============================================================================
   1. ГЛОБАЛЬНЫЕ ПРАВИЛА И СТАНДАРТЫ BLAZOR
   ============================================================================= */
a, a:hover {
    text-decoration: none !important;
}

code {
    color: #c02d76;
}

/* Стандартные UI ошибки Blazor */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

/* =============================================================================
   2. ТЕМА И ОБЩИЕ КОМПОНЕНТЫ MUDBLAZOR
   ============================================================================= */

/* Убираем принудительный CAPS LOCK (Правка дизайнера) */
.mud-button-label,
.mud-chip-content,
.mud-tab,
.mud-typography-overline {
    text-transform: none !important;
}

/* Центрирование текста в полях ввода (LIMS style) */
.mud-input-control > .mud-input-control-input-container .mud-input-slot input,
.mud-input-control > .mud-input-control-input-container .mud-input-slot textarea {
    text-align: center;
}

.mud-field .mud-field-content {
    justify-content: center;
    text-align: center;
}

/* Валидация */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

/* =============================================================================
   3. НАВИГАЦИОННОЕ МЕНЮ (LabFlow Style)
   ============================================================================= */

/* Общие стили для ссылок и кнопок групп (Унификация) */
.mud-nav-link,
.mud-nav-group-button {
    padding: 12px 16px !important;
    min-height: 48px !important;
    transition: all 0.2s ease-in-out !important;
    text-decoration: none !important;
}

/* Текст в меню */
.mud-nav-link-text,
.mud-nav-group-text {
    font-size: 0.875rem !important;
    font-weight: 500 !important; /* Основные пункты чуть плотнее */
    color: var(--mud-palette-text-primary) !important;
}

/* 2. ПОДМЕНЮ (Вложенные пункты) — Делаем НЕ жирными */
.mud-nav-group .mud-nav-item .mud-nav-link .mud-nav-link-text {
    font-weight: 400 !important; /* Обычный шрифт для подпунктов */
    opacity: 0.9;
}


/* Иконки в меню */
.mud-nav-link-icon-default {
    font-size: 1.25rem !important;
    margin-right: 12px !important;
    width: 24px;
    display: flex;
    justify-content: center;
    color: var(--mud-palette-text-secondary) !important;
}

/* АКТИВНЫЙ ПУНКТ МЕНЮ */
.mud-nav-link.active {
    background-color: rgba(94, 72, 179, 0.08) !important; /* Легкий фиолетовый фон */
    color: var(--mud-palette-primary) !important;
    border-left: none !important; 
}

    .mud-nav-link.active .mud-nav-link-text,
    .mud-nav-link.active .mud-nav-link-icon-default {
        color: var(--mud-palette-primary) !important;
        font-weight: 600 !important;
    }

/* Отступ для вложенных элементов */
.mud-nav-group .mud-nav-item .mud-nav-link {
    padding-left: 12px !important;
}

/* =============================================================================
   4. КОМПАКТНЫЙ ТАЙМЛАЙН (Для методов и визардов)
   ============================================================================= */
.compact-timeline {
    padding-left: 0 !important;
}

    .compact-timeline .mud-timeline-item-inner {
        padding-left: 12px !important;
    }

    .compact-timeline .mud-timeline-item-separator {
        width: 32px !important;
        min-width: 32px !important;
    }

    .compact-timeline .mud-timeline-item {
        margin-bottom: 0 !important;
    }

    .compact-timeline .mud-timeline-item-content {
        padding-top: 0 !important;
        padding-bottom: 8px !important;
    }

@media (max-width: 480px) {
    .compact-timeline {
        margin-left: -20px !important;
    }
}

/* =============================================================================
   5. ЛОГОТИП И ШАПКА
   ============================================================================= */
.app-logo {
    height: 38px; /* Оптимизировали под Dense AppBar */
    width: auto;
    object-fit: contain;
    transition: transform 0.2s;
}

.logo-text {
    color: white;
    letter-spacing: 0.5px;
}

/* =============================================================================
   6. ЭКРАН ЗАГРУЗКИ (Splash Screen)
   ============================================================================= */
.loading-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100vh;
    background-color: #ffffff;
}

.loading-logo {
    width: 180px;
    height: auto;
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(0.98);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.02);
        opacity: 1;
    }
}

@keyframes loading-slide {
    from {
        left: -50px;
    }

    to {
        left: 150px;
    }
}

/* =============================================================================
   7. ПЕЧАТЬ
   ============================================================================= */
@media print {
    body > *:not(#printFrame) {
        display: none !important;
    }

    body, html, #printFrame {
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    #printFrame {
        position: absolute;
        top: 0;
        left: 0;
    }
}
