/* ============================================================
   ЧЕК-ЛИСТ ПРИЕМКИ КВАРТИРЫ (checklist.css)
   ============================================================ */

/* Контейнер чек-листа в виде листа А4 */
.checklist-a4 {
  background: #ffffff;
  border-radius: var(--radius10, 10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 25px 25px 15px 25px;
  margin: 10px 0;
  border: 1px solid #f0f0f0;
  width: 100%;
  box-sizing: border-box;
}

/* Иконки печати и PDF */
.print-download-icons {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
  align-items: center;
  padding-top: 8px;
}

.print-download-icons .icon-link {
  display: inline-block;
  text-decoration: none;
  transition: transform 0.2s ease;
  font-size: 28px;
  line-height: 1;
}

.print-download-icons .icon-link:hover {
  transform: scale(1.1);
}

.print-download-icons img {
  width: 32px;
  height: 32px;
  border: none;
  display: inline-block;
  vertical-align: middle;
}

/* --- КОНТЕЙНЕР ВКЛАДОК С ФИКСИРОВАННОЙ ВЫСОТОЙ --- */


/* --- ПАНЕЛИ ВКЛАДОК (без анимации) --- */
.vert-tab-pane {
  display: none;
  height: 100%;
  overflow-y: auto;
  padding-right: 5px;
}

.vert-tab-pane.active {
  display: block;
}

/* Стилизация скроллбара для панелей */
.vert-tab-pane::-webkit-scrollbar {
  width: 5px;
}

.vert-tab-pane::-webkit-scrollbar-track {
  background: var(--lightgray, #d7d7d7);
  border-radius: 3px;
}

.vert-tab-pane::-webkit-scrollbar-thumb {
  background: var(--lilac-color, #a08396);
  border-radius: 3px;
}

.vert-tab-pane::-webkit-scrollbar-thumb:hover {
  background: #8a6f7e;
}

/* --- КОЛОНКИ ТАБЛИЦЫ ЧЕК-ЛИСТА (ширина в процентах) --- */
.checklist-a4 .admin-table th:nth-child(1),
.checklist-a4 .admin-table td:nth-child(1) {
  width: 5%;
  min-width: 40px;
  text-align: center;
}

.checklist-a4 .admin-table th:nth-child(2),
.checklist-a4 .admin-table td:nth-child(2) {
  width: 20%;
  min-width: 100px;
}

.checklist-a4 .admin-table th:nth-child(3),
.checklist-a4 .admin-table td:nth-child(3) {
  width: 20%;
  min-width: 100px;
}

.checklist-a4 .admin-table th:nth-child(4),
.checklist-a4 .admin-table td:nth-child(4) {
  width: 25%;
  min-width: 120px;
}

.checklist-a4 .admin-table th:nth-child(5),
.checklist-a4 .admin-table td:nth-child(5) {
  width: 20%;
  min-width: 80px;
}

.checklist-a4 .admin-table th:nth-child(6),
.checklist-a4 .admin-table td:nth-child(6) {
  width: 15%;
  min-width: 130px;
}

/* Переопределение стилей таблицы для чек-листа */
.checklist-a4 .admin-table {
  border-radius: 8px;
  overflow: hidden;
  display: table !important;
  width: 100% !important;
  table-layout: fixed;
}

.checklist-a4 .admin-table thead {
  display: table-header-group !important;
}

.checklist-a4 .admin-table tbody {
  display: table-row-group !important;
}

.checklist-a4 .admin-table tr {
  display: table-row !important;
  align-items: normal !important;
}

.checklist-a4 .admin-table th,
.checklist-a4 .admin-table td {
  display: table-cell !important;
  vertical-align: middle;
  padding: 8px 8px;
  float: none !important;
}

.checklist-a4 .admin-table thead th {
  background: #f5f0f3;
  border-bottom: 2px solid var(--lilac-color, #a08396);
  white-space: nowrap;
}

/* Стили для списка недостатков внутри таблицы */
.checklist-a4 .defect-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.checklist-a4 .defect-list label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
  margin: 0;
  font-weight: normal;
  cursor: pointer;
}

.checklist-a4 .defect-list input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  flex-shrink: 0;
  float: none !important;
  border: 2px solid #ccc;
  border-radius: 4px;
  accent-color: var(--lilac-color, #a08396);
}

/* Текстовое поле для комментариев */
.checklist-a4 .note-input-large {
  width: 100%;
  min-height: 50px;
  max-height: 80px;
  padding: 5px 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 12px;
  resize: vertical;
  background: #fafafa;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
  margin: 0;
}

.checklist-a4 .note-input-large:focus {
  border-color: var(--lilac-color, #a08396);
  outline: none;
  background: #fff;
}

/* Подвал чек-листа */
.checklist-footer {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 2px dashed #e0e0e0;
  text-align: center;
}

.checklist-footer p {
  font-size: 13px;
  color: #555;
  margin: 0;
  line-height: 1.6;
}

/* --- АДАПТИВНОСТЬ --- */
@media (max-width: 992px) {
  .checklist-a4 {
    padding: 15px;
  }

  .vert-tabs-container {
    height: 450px;
    min-height: 450px;
    max-height: 450px;
  }
}

@media (max-width: 768px) {
  .checklist-a4 {
    padding: 10px;
    border-radius: 8px;
  }

  .checklist-header .row {
    flex-direction: column;
  }

  .checklist-header .col-70,
  .checklist-header .col-30 {
    width: 100%;
    text-align: center;
  }

  .print-download-icons {
    justify-content: center;
    padding-top: 10px;
  }

  .vert-tabs-container {
    flex-direction: column;
    gap: 10px;
    height: 400px;
    min-height: 400px;
    max-height: 400px;
  }

  .vert-tabs-content {
    padding: 5px 0;
  }

  .vert-tab-pane {
    padding-right: 0;
  }

  /* Адаптивность таблицы через горизонтальную прокрутку */
  .checklist-a4 .table-responsive {
    overflow-x: auto;
  }

  .checklist-a4 .admin-table {
    min-width: 650px;
    table-layout: auto;
  }
}

@media (max-width: 480px) {
  .checklist-a4 {
    padding: 8px;
  }

  .vert-tabs-container {
    height: 350px;
    min-height: 350px;
    max-height: 350px;
  }
}
