/* === Калькулятор веса саморезов по дереву === */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

.calc-samorez-ves::before { content: 'Калькулятор веса саморезов по дереву'; }

.calc-samorez-ves,
.calc-samorez-ves input,
.calc-samorez-ves select,
.calc-samorez-ves button {
  font-family: 'Inter', 'Open Sans', sans-serif;
}

/* --- Переопределяем uppercase из redesign.css --- */
.calc-section .calc-samorez-ves .r_calc .razmers label .lbl {
  text-transform: none !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #4a5568 !important;
  letter-spacing: 0 !important;
}

/* --- Режим: переключатель --- */
.sv-mode-wrap {
  margin-bottom: 4px;
}
.sv-mode-label {
  font-size: 13px;
  font-weight: 500;
  color: #4a5568;
  margin-bottom: 8px;
}
.sv-toggle {
  display: flex;
  background: #f0f6ff;
  border: 1.5px solid #d4e4f7;
  border-radius: 12px;
  padding: 3px;
  gap: 3px;
}
.sv-toggle-btn {
  flex: 1;
  padding: 9px 16px;
  border: none;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  background: transparent;
  color: #7a8fa6;
  transition: background .18s, color .18s, box-shadow .18s;
}
.sv-toggle-btn--active {
  background: #fff;
  color: #1a6bbf;
  box-shadow: 0 1px 4px rgba(74, 144, 226, 0.18);
}
.sv-toggle-btn:hover:not(.sv-toggle-btn--active) {
  color: #4a90e2;
}

/* --- Заголовки групп --- */
.brus-group-title {
  font-size: 11px;
  font-weight: 700;
  color: #4a90e2;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  padding-bottom: 8px;
  border-bottom: 2px solid #e0ecfb;
}

/* --- Обёртка поля --- */
.brus-field-wrap { display: flex; flex-direction: column; }

/* --- Чипы-подсказки --- */
.brus-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}
.brus-hint {
  display: inline-block;
  padding: 2px 9px;
  border: 1px solid #c8ddf5;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  color: #4a90e2;
  background: #f0f7ff;
  cursor: pointer;
  line-height: 1.8;
  transition: background .15s, color .15s, border-color .15s;
  font-family: inherit;
}
.brus-hint:hover { background: #4a90e2; color: #fff; border-color: #4a90e2; }

/* --- Ошибки валидации --- */
.brus-field-error {
  font-size: 11px;
  font-weight: 500;
  margin-top: 5px;
}

/* --- Блок результатов --- */
.brus-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #c8ddf5;
}
.brus-result-title {
  font-size: 11px;
  font-weight: 700;
  color: #4a90e2;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-family: 'Inter', sans-serif;
  margin: 0;
  padding: 0;
  border: none;
}
.brus-reset-btn {
  background: none;
  border: none;
  color: #9aa5b4;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  font-family: 'Inter', sans-serif;
  transition: color .2s;
  display: flex;
  align-items: center;
  gap: 4px;
}
.brus-reset-btn:hover { color: #e74c3c; background: none; }

/* --- Таблица результатов --- */
.brus-result-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.brus-result-table td {
  padding: 9px 0;
  font-size: 14px;
  border-bottom: 1px solid #f0f6ff;
  vertical-align: middle;
  font-family: 'Inter', sans-serif;
}
.brus-result-table td:first-child { color: #5a6a7e; width: 58%; font-weight: 400; }
.brus-result-table td:last-child  { font-weight: 600; color: #1a2a3a; text-align: right; font-size: 15px; }

.brus-tsection-head td {
  font-size: 10px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #9aa5b4 !important;
  padding: 14px 0 5px !important;
  border-bottom: 1px solid #e0ecfb !important;
}
.brus-result-table tbody:first-child .brus-tsection-head td {
  padding-top: 0 !important;
}

.brus-total-row td {
  background: #eef6ff;
  padding: 11px 10px !important;
  border-bottom: none !important;
}
.brus-total-row td:first-child {
  color: #2c3e50 !important;
  font-weight: 600 !important;
  border-radius: 10px 0 0 10px;
}
.brus-total-row td:last-child {
  color: #2c6fbb !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  border-radius: 0 10px 10px 0;
}
.brus-total-spacer td {
  padding: 4px 0 !important;
  border-bottom: none !important;
}

/* --- Футер: кнопка PDF --- */
.brus-result-footer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #e8f2fd;
}
.calc-samorez-ves .pdf_btn {
  display: block;
  width: 100%;
  padding: 13px 20px;
  height: auto;
  line-height: normal;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  text-align: center;
}

/* --- Адаптив --- */
@media (max-width: 768px) {
  .sv-toggle-btn { font-size: 12px; padding: 8px 10px; }
  .brus-result-header { flex-direction: row; }
}

/* =========================================
   Справочная таблица весов саморезов
   ========================================= */

/* Скрываем ::before — заголовок теперь h2 в разметке */
.calc-section.calc-samorez-ves-table::before { content: none; display: none; }

.sv-ref-heading {
  display: flex;
  align-items: center;
  background: var(--blue-grad);
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  padding: 18px 26px;
  margin: 0;
}

.calc-samorez-ves-table,
.calc-samorez-ves-table table {
  font-family: 'Inter', 'Open Sans', sans-serif;
}

.sv-ref-intro {
  font-size: 13px;
  color: #5a6a7e;
  margin-bottom: 18px;
  line-height: 1.6;
}

.sv-ref-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  min-width: 0; /* flex-item должен уметь сжиматься, иначе overflow-x не работает */
}

.sv-ref-table {
  width: 100%;
  min-width: 520px;
  border-collapse: separate;
  border-spacing: 0;
}

.sv-ref-table thead th {
  background: #4a90e2;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 10px 8px;
  text-align: center;
  white-space: nowrap;
}
.sv-ref-table thead th:first-child {
  text-align: left;
  padding-left: 14px;
  border-radius: 10px 0 0 0;
}
.sv-ref-table thead th:last-child {
  border-radius: 0 10px 0 0;
}

.sv-ref-table tbody td {
  padding: 8px;
  font-size: 13px;
  text-align: center;
  border-bottom: 1px solid #f0f6ff;
  color: #1a2a3a;
  font-weight: 500;
}
.sv-ref-table tbody tr:last-child td { border-bottom: none; }
.sv-ref-table tbody tr:nth-child(even) { background: #f8fbff; }

.sv-ref-len {
  text-align: left !important;
  color: #4a5568 !important;
  font-weight: 600 !important;
  padding-left: 14px !important;
  white-space: nowrap;
}
.sv-ref-na {
  color: #c8d4e0 !important;
  font-weight: 400 !important;
  font-size: 12px !important;
}
