/* ---------------------------------------------------------------------------
   Вкладки — skladservice.by
   ---------------------------------------------------------------------------
   Чистый CSS, без JavaScript: переключение через скрытые radio и label.
   Отдельный файл с версией в имени, потому что бандлы Astro хешированы
   и отдаются immutable на год.
--------------------------------------------------------------------------- */

.tabs { margin: 1.9rem 0; }

.tabs__radio {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}

.tabs__nav {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: 0;
  border-bottom: 2px solid var(--color-line, #e3e8ee);
}

.tabs__label {
  margin-bottom: -2px;
  padding: .65rem 1.1rem;
  color: var(--color-ink-600, #5a6b7c);
  font-size: var(--text-sm, .9375rem);
  font-weight: 650;
  line-height: 1.2;
  cursor: pointer;
  background: var(--color-surface-soft, #f5f8fa);
  border: 1px solid var(--color-line, #e3e8ee);
  border-bottom: none;
  border-radius: var(--radius-sm, 8px) var(--radius-sm, 8px) 0 0;
  transition: color .15s, background-color .15s;
}

.tabs__label:hover { color: var(--color-ink-950, #102325); }

.tabs__radio:focus-visible ~ .tabs__nav .tabs__label {
  outline: 2px solid var(--color-accent, #e8a23b);
  outline-offset: -2px;
}

.tabs__panel {
  display: none;
  padding: 1.25rem 0 .25rem;
}

.tabs__panel > *:first-child { margin-top: 0; }
.tabs__panel > *:last-child { margin-bottom: 0; }

/* Активная метка */
.tabs__radio:nth-of-type(1):checked ~ .tabs__nav .tabs__label:nth-child(1),
.tabs__radio:nth-of-type(2):checked ~ .tabs__nav .tabs__label:nth-child(2),
.tabs__radio:nth-of-type(3):checked ~ .tabs__nav .tabs__label:nth-child(3),
.tabs__radio:nth-of-type(4):checked ~ .tabs__nav .tabs__label:nth-child(4) {
  color: var(--color-ink-950, #102325);
  background: #fff;
  border-color: var(--color-line, #e3e8ee);
  border-bottom-color: #fff;
}

/* Активная панель */
.tabs__radio:nth-of-type(1):checked ~ .tabs__panels .tabs__panel:nth-child(1),
.tabs__radio:nth-of-type(2):checked ~ .tabs__panels .tabs__panel:nth-child(2),
.tabs__radio:nth-of-type(3):checked ~ .tabs__panels .tabs__panel:nth-child(3),
.tabs__radio:nth-of-type(4):checked ~ .tabs__panels .tabs__panel:nth-child(4) {
  display: block;
}

@media (max-width: 42rem) {
  .tabs__nav { flex-direction: column; border-bottom: none; }
  .tabs__label {
    margin-bottom: 0;
    border-bottom: 1px solid var(--color-line, #e3e8ee);
    border-radius: var(--radius-sm, 8px);
  }
}

/* Сводная таблица-сравнение внутри статьи */
.compare-table {
  width: 100%;
  margin: 1.5rem 0;
  border-collapse: collapse;
  font-size: var(--text-sm, .9375rem);
}

.compare-table th,
.compare-table td {
  padding: .7rem .9rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--color-line, #e3e8ee);
}

.compare-table th {
  color: var(--color-ink-950, #102325);
  font-weight: 670;
  background: var(--color-surface-soft, #f5f8fa);
}

.compare-table td { color: var(--color-ink-700, #3c4a57); line-height: 1.55; }
