﻿/* interactive-dishwasher-table/bosch-dishwasher-errors.css (або dishwasher-error-styles.css) */

/* Загальний контейнер */
.dishwasher-errors-wrapper {
    max-width: 100%; 
    margin: 20px auto;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background-color: #f5f5f5;
    padding: 15px; 
    color: #333;
    border-radius: 8px;
    font-size: 15px; 
    line-height: 1.6; 
}

.dishwasher-errors-wrapper * {
    box-sizing: border-box;
}

/* Стилі для форми фільтрів */
.dishwasher-errors-wrapper .filter-form {
    background: white;
    padding: 15px; 
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px; 
}

.dishwasher-errors-wrapper .filter-grid-two-columns {
    display: grid;
    grid-template-columns: 1fr; 
    gap: 15px; 
}

@media (min-width: 601px) {
    .dishwasher-errors-wrapper .filter-grid-two-columns {
        grid-template-columns: 1fr 1fr;
    }
}

.dishwasher-errors-wrapper .filter-item {
    display: flex;
    flex-direction: column;
}

.dishwasher-errors-wrapper .filter-item label {
    margin-bottom: 6px; 
    font-weight: 500;
    color: #333;
    font-size: 0.95em; 
}

/* Стилізація оригінальних селектів (вони можуть бути приховані Chosen) */
.dishwasher-errors-wrapper #dishwasher-error-code-select,
.dishwasher-errors-wrapper #dishwasher-error-group-select {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: white;
    font-size: 1em !important; 
    line-height: 1.5 !important;
}

/* Стилізація елементів Chosen (якщо Chosen.js використовується для селекторів) */
.dishwasher-errors-wrapper .chosen-container .chosen-single,
.dishwasher-errors-wrapper .chosen-container-single .chosen-single {
    font-size: 1em !important; 
    line-height: 1.5 !important;
    padding: 7px 12px !important; 
    height: auto !important; 
    border-radius: 6px !important;
    border: 1px solid #ccc !important;
    background: white !important; 
    box-shadow: none !important; 
}

.dishwasher-errors-wrapper .chosen-container .chosen-single span,
.dishwasher-errors-wrapper .chosen-container-single .chosen-single span {
    line-height: inherit !important; 
}

.dishwasher-errors-wrapper .chosen-container .chosen-drop {
    border-radius: 0 0 6px 6px !important;
    border-color: #ccc !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

.dishwasher-errors-wrapper .chosen-container .chosen-results li {
    font-size: 1em !important; 
    line-height: 1.5 !important;
    padding: 8px 12px !important;
}

.dishwasher-errors-wrapper .chosen-container-single .chosen-search input[type="text"] {
    font-size: 1em !important; 
}

/* Стилі для неактивних селектів */
.dishwasher-errors-wrapper #dishwasher-error-code-select:disabled,
.dishwasher-errors-wrapper #dishwasher-error-group-select:disabled {
    background-color: #e9ecef; 
    cursor: not-allowed;
}
.dishwasher-errors-wrapper .chosen-container-disabled .chosen-single {
    background-color: #e9ecef !important;
    cursor: not-allowed !important;
    opacity: 0.7 !important;
}

/* Обгортка таблиці для горизонтального скролу */
.dishwasher-errors-wrapper .table-wrapper {
    background: white;
    border-radius: 8px;
    overflow-x: auto; 
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    -webkit-overflow-scrolling: touch;
}

.dishwasher-errors-wrapper #dishwasher-errors-table {
    width: 100%; 
    min-width: 750px; 
    border-collapse: collapse;
    font-size: 1em !important; 
}

.dishwasher-errors-wrapper #dishwasher-errors-table thead {
    background-color: #eef1f5;
    position: sticky; 
    top: 0; 
    z-index: 10;
}

.dishwasher-errors-wrapper #dishwasher-errors-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #dee2e6;
    white-space: nowrap; 
    background-color: #eef1f5;
    font-size: 1em !important; 
}

.dishwasher-errors-wrapper #dishwasher-errors-table td {
    padding: 10px 15px; 
    border-bottom: 1px solid #e0e0e0;
    vertical-align: top;
    font-size: 1em !important; 
}

/* ---- ПОЧАТОК ДОДАНИХ СТИЛІВ ДЛЯ КОЛОНОК ТАБЛИЦІ ПОСУДОМИЙОК ---- */
.dishwasher-errors-wrapper #dishwasher-errors-table th:nth-child(1), /* Код помилки */
.dishwasher-errors-wrapper #dishwasher-errors-table td:nth-child(1) {
    min-width: 130px; 
    font-weight: bold;
    white-space: nowrap;
    color: #c0392b; /* Приклад кольору для акценту на коді помилки */
}

.dishwasher-errors-wrapper #dishwasher-errors-table th:nth-child(2), /* Опис проблеми (детальний) */
.dishwasher-errors-wrapper #dishwasher-errors-table td:nth-child(2) {
    min-width: 250px; 
    white-space: normal; /* Дозволяємо перенос тексту */
}

.dishwasher-errors-wrapper #dishwasher-errors-table th:nth-child(3), /* Типові причини */
.dishwasher-errors-wrapper #dishwasher-errors-table td:nth-child(3) {
    min-width: 200px;
    white-space: normal;
}

.dishwasher-errors-wrapper #dishwasher-errors-table th:nth-child(4), /* Самостійне усунення */
.dishwasher-errors-wrapper #dishwasher-errors-table td:nth-child(4) {
    min-width: 200px;
    white-space: normal;
}
/* ---- КІНЕЦЬ ДОДАНИХ СТИЛІВ ДЛЯ КОЛОНОК ТАБЛИЦІ ПОСУДОМИЙОК ---- */

.dishwasher-errors-wrapper #dishwasher-errors-table tbody tr:nth-child(even) {
    background-color: #fdfdfd; 
}

.dishwasher-errors-wrapper #dishwasher-errors-table tbody tr:hover {
    background-color: #e8f4f8 !important;
}

.dishwasher-errors-wrapper #dishwasher-errors-table td.no-data-message {
    text-align: center;
    padding: 20px;
    color: #777;
    font-style: italic;
    white-space: normal; 
    font-size: 1em !important; 
}

/* Адаптація для мобільних */
@media (max-width: 640px) {
    .dishwasher-errors-wrapper {
        padding: 10px;
        font-size: 14px; 
    }
    .dishwasher-errors-wrapper .filter-form {
        padding: 10px;
    }
    .dishwasher-errors-wrapper #dishwasher-errors-table {
        min-width: 600px; 
    }
    .dishwasher-errors-wrapper #dishwasher-errors-table th,
    .dishwasher-errors-wrapper #dishwasher-errors-table td {
        padding: 8px 10px;
    }

    /* ---- ПОЧАТОК АДАПТИВНИХ СТИЛІВ ДЛЯ КОЛОНОК (640px) ---- */
    .dishwasher-errors-wrapper #dishwasher-errors-table th:nth-child(1),
    .dishwasher-errors-wrapper #dishwasher-errors-table td:nth-child(1) { /* Код помилки */
        min-width: 100px; 
    }
    .dishwasher-errors-wrapper #dishwasher-errors-table th:nth-child(2),
    .dishwasher-errors-wrapper #dishwasher-errors-table td:nth-child(2) { /* Опис проблеми */
        min-width: 200px; 
    }
    .dishwasher-errors-wrapper #dishwasher-errors-table th:nth-child(3), 
    .dishwasher-errors-wrapper #dishwasher-errors-table td:nth-child(3) { /* Типові причини */
        min-width: 150px;
    }
    .dishwasher-errors-wrapper #dishwasher-errors-table th:nth-child(4), 
    .dishwasher-errors-wrapper #dishwasher-errors-table td:nth-child(4) { /* Самостійне усунення */
        min-width: 150px;
    }
    /* ---- КІНЕЦЬ АДАПТИВНИХ СТИЛІВ ДЛЯ КОЛОНОК (640px) ---- */
}

@media (max-width: 480px) {
    .dishwasher-errors-wrapper {
        font-size: 13px; 
    }
    .dishwasher-errors-wrapper #dishwasher-errors-table {
        min-width: 500px; 
    }
    /* ---- ПОЧАТОК АДАПТИВНИХ СТИЛІВ ДЛЯ КОЛОНОК (480px) ---- */
    .dishwasher-errors-wrapper #dishwasher-errors-table th:nth-child(1),
    .dishwasher-errors-wrapper #dishwasher-errors-table td:nth-child(1) { /* Код помилки */
        min-width: 80px; 
    }
    .dishwasher-errors-wrapper #dishwasher-errors-table th:nth-child(2),
    .dishwasher-errors-wrapper #dishwasher-errors-table td:nth-child(2) { /* Опис проблеми */
        min-width: 150px; 
    }
    .dishwasher-errors-wrapper #dishwasher-errors-table th:nth-child(3), 
    .dishwasher-errors-wrapper #dishwasher-errors-table td:nth-child(3) { /* Типові причини */
        min-width: 120px;
    }
    .dishwasher-errors-wrapper #dishwasher-errors-table th:nth-child(4), 
    .dishwasher-errors-wrapper #dishwasher-errors-table td:nth-child(4) { /* Самостійне усунення */
        min-width: 120px;
    }
    /* ---- КІНЕЦЬ АДАПТИВНИХ СТИЛІВ ДЛЯ КОЛОНОК (480px) ---- */
}
/* Перекриття стилів теми JNews для таблиці помилок посудомийок */
.dishwasher-errors-wrapper #dishwasher-errors-table {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    /* Якщо потрібно скинути всі відступи: */
    /* margin: 0 !important; */
}

/* Опціонально: налаштуйте відступ під формою фільтрів, якщо потрібно */
.dishwasher-errors-wrapper .filter-form {
    margin-bottom: 15px; /* Наприклад, 15px, або 0, якщо відступ не потрібен */
}

/* Опціонально: налаштуйте відступ під обгорткою таблиці, якщо потрібно */
.dishwasher-errors-wrapper .table-wrapper {
    margin-bottom: 0; /* Або залиште ваш стандартний відступ, якщо він потрібен */
}

/* Виправлення вирівнювання стрілки для Chosen select в блоці посудомийок (Спроба 4) */
.dishwasher-errors-wrapper .chosen-container-single .chosen-single div:after {
    line-height: 34px !important; /* Встановлюємо значення, яке, ймовірно, працювало з теми */
}