/* ==========================================================================
   1. БАЗОВАЯ СТРУКТУРА ПАНЕЛЕЙ
   ========================================================================== */
.block-box {
    border: 1px solid #dee2e6;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 0 !important;
}

/* Стили для динамической шапки с выравниванием по центру */
.dynamic-header {
    padding: 12px 20px;
    border-bottom: 1px solid #dee2e6;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease;
}

/* Внутренний контейнер для контента под шапками */
.block-content {
    padding: 20px;
    flex-grow: 1;
    overflow-y: auto;
}

/* ==========================================================================
   2. СТИЛИ ТАБЛИЦЫ (СТАТИЧНЫЙ СВЕТЛЫЙ СТИЛЬ)
   ========================================================================== */
.table-responsive {
    position: relative;
    background-color: #ffffff !important; /* Всегда белый фон контейнера */
}

#orders-table {
    background-color: #ffffff !important; /* Всегда белый фон таблицы */
}

#orders-table-body td {
    background-color: #ffffff !important; /* Всегда белый фон строк */
    color: #212529 !important; /* Темный читаемый текст */
}

.sticky-top {
    position: sticky;
    top: 0;
    z-index: 10;
}

/* ==========================================================================
   3. АНИМАЦИЯ ПОДЪЕМА ФОРМЫ ЗАКАЗА
   ========================================================================== */
.right-column-container {
    position: relative;
}

#order-form-block {
    cursor: pointer;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    z-index: 2;
    transition: height 0.4s cubic-bezier(0.25, 1, 0.5, 1), top 0.4s ease;
}

.right-column-container.swapped-mode #order-form-block {
    height: 100%;
    top: 0;
}


/* --- СТИЛИ ДЛЯ СПИСКА АРХИВОВ --- */
.archive-item {
    cursor: pointer;
    background-color: #ffffff !important;
    color: #212529 !important;
    font-weight: 500;
    transition: background-color 0.2s ease;
}
.archive-item:hover {
    background-color: #f8f9fa !important;
}
/* Стрелочка индикатора раскрытия */
.archive-toggle-icon {
    transition: transform 0.2s ease;
}
.archive-item.open .archive-toggle-icon {
    transform: rotate(90deg); /* Поворот стрелки при раскрытии */
}
/* Контейнер вложенных файлов */
.archive-files-list {
    display: none; /* По умолчанию скрыт */
    background-color: #fcfcfc;
    padding-left: 35px;
    border-bottom: 1px solid #dee2e6;
}
.archive-files-list.show {
    display: block; /* Показываем при клике */
}
.file-subitem {
    padding: 6px 0;
    font-size: 0.9rem;
    color: #495057;
    border-bottom: 1px dashed #f0f0f0;
}
.file-subitem:last-child {
    border-bottom: none;
}

/* Стилизация внутренних уведомлений об ошибках в архиве */
.archive-files-list .text-danger, 
.archive-files-list .text-muted {
    padding: 10px 15px;
    font-size: 0.85rem;
}



/* --- СТИЛИ ДЛЯ КАРТОЧЕК УСЛУГ --- */
.service-card {
    cursor: pointer;
    background-color: #ffffff;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

/* Эффект наведения мыши */
.service-card:hover {
    background-color: #f8f9fa;
    border-color: #b6d4fe !important;
    transform: translateY(-1px);
}

.service-title {
    font-weight: 600;
    color: #212529;
    font-size: 0.95rem;
}

.service-icon {
    font-size: 1.4rem;
}

/* Состояние, когда радиокнопка внутри карточки выбрана */
.service-card:has(.service-radio:checked) {
    background-color: #e7f1ff !important; /* Мягкий синий фон */
    border-color: #0d6efd !important;      /* Яркая синяя рамка */
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15); /* Нежное свечение вокруг */
}

/* Меняем цвет бейджа времени у выбранной услуги */
.service-card:has(.service-radio:checked) .service-badge {
    background-color: #0d6efd !important;
    color: #ffffff !important;
    border-color: #0d6efd !important;
}

/* Стили для динамической шапки с фиксированной высотой */
.dynamic-header {
    height: 52px; /* Фиксируем одинаковую высоту для всех шапок */
    padding: 0 20px; /* Отступы только по бокам */
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center; /* Центрирование текста по вертикали */
    justify-content: center; /* Центрирование текста по горизонтали */
    font-size: 1.1rem;
    font-weight: 600;
    transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease;
}

/* Корректировка для шапки с кнопкой (чтобы флексы не ломали высоту) */
.dynamic-header.justify-content-between {
    justify-content: space-between !important;
}

