/* Совместимость овощей — /sovmestimost-ovoschey/ */
.sov-interactive {
  display: grid;
  gap: 24px;
  align-items: start;
  margin-bottom: 40px;
  min-width: 0;
  max-width: 100%;
}

.sov-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  overflow-y: auto;
  padding: 4px;
  margin: -4px;
  min-width: 0;
  max-width: 100%;
  align-self: start;
  scrollbar-width: thin;
  scrollbar-color: #b8c9a9 #eef2e8;
}

.sov-picker-wrap {
  position: relative;
  align-self: start;
  min-width: 0;
  max-width: 100%;
}

.sov-picker-wrap::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 10px;
  height: 24px;
  background: linear-gradient(to bottom, rgba(246, 249, 243, 0), rgba(246, 249, 243, 0.95));
  pointer-events: none;
  border-radius: 0 0 var(--radius, 8px) var(--radius, 8px);
}

.sov-picker-wrap:has(.sov-picker--no-scroll)::after,
.sov-picker-wrap--at-end::after {
  display: none;
}

.sov-picker::-webkit-scrollbar {
  width: 10px;
}

.sov-picker::-webkit-scrollbar-track {
  background: #eef2e8;
  border-radius: 5px;
}

.sov-picker::-webkit-scrollbar-thumb {
  background: #b8c9a9;
  border-radius: 5px;
  border: 2px solid #eef2e8;
}

.sov-picker::-webkit-scrollbar-thumb:hover {
  background: var(--green-main, #3a7d22);
}

.sov-picker--no-scroll {
  max-height: none;
  overflow-y: visible;
}

@media (max-width: 600px) {
  .sov-picker {
    max-height: calc(2.7 * 96px);
  }
}

@media (min-width: 601px) and (max-width: 900px) {
  .sov-picker {
    grid-template-columns: repeat(5, 1fr);
    max-height: calc(2 * 96px + 8px);
    gap: 5px;
  }
}

@media (min-width: 901px) {
  .sov-interactive {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .sov-picker {
    grid-template-columns: repeat(auto-fill, 96px);
    justify-content: center;
    gap: 8px;
    max-height: calc(2 * 96px + 8px);
  }
}

@media (max-width: 900px) {
  .sov-picker {
    position: static;
  }
}

/* ФИЛЬТРЫ */
.sov-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.sov-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #fff;
  border: 1px solid var(--border, #dde8d5);
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dark, #1a1a1a);
  transition: background 0.15s, border-color 0.15s;
  line-height: 1;
}

.sov-filter:hover {
  background: var(--green-light, #e8f5e1);
  border-color: var(--green-main, #3a7d22);
}

.sov-filter--active {
  background: var(--green-main, #3a7d22);
  border-color: var(--green-main, #3a7d22);
  color: #fff;
}

.sov-filter--active:hover {
  background: var(--green-dark, #2d6a1f);
  border-color: var(--green-dark, #2d6a1f);
}

.sov-filter-icon {
  font-size: 16px;
  line-height: 1;
}

.sov-filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  padding: 1px 6px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.sov-filter--active .sov-filter-count {
  background: rgba(255, 255, 255, 0.22);
}

.sov-culture-tile {
  appearance: none;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  width: 96px;
  height: 96px;
  justify-self: center;
  padding: 4px 2px 6px;
  background: #fff;
  border: 1px solid var(--border, #dde8d5);
  border-radius: var(--radius, 8px);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  font-family: var(--font-head);
  line-height: 1.2;
  min-height: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.sov-culture-tile:hover {
  background: var(--green-light, #e8f5e1);
  border-color: var(--green-main, #3a7d22);
}

.sov-culture-tile[aria-selected="true"] {
  background: var(--green-light, #e8f5e1);
  border-color: var(--green-main, #3a7d22);
  border-width: 2px;
  padding: 3px 1px 5px;
}

.sov-culture-tile-check {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  background: var(--green-main, #3a7d22);
  color: #fff;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.sov-culture-tile-check svg {
  display: block;
  width: 11px;
  height: 11px;
}

.sov-culture-tile[aria-selected="true"] .sov-culture-tile-check {
  display: inline-flex;
}

.sov-culture-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark, #1a1a1a);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
  padding: 0 4px;
  line-height: 1.2;
  flex-shrink: 0;
}

.sov-culture-tile[aria-selected="true"] .sov-culture-name {
  color: var(--green-dark, #2d6a1f);
}

.sov-picker .culture-icon {
  width: 65px;
  height: 65px;
  flex: 0 0 65px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 41px;
}

.sov-picker .culture-icon img {
  width: 65px;
  height: 65px;
  display: block;
  object-fit: contain;
  aspect-ratio: 1 / 1;
  max-width: 65px !important;
  max-height: 65px !important;
}

.culture-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  overflow: hidden;
  font-size: 40px;
  line-height: 1;
}

.culture-icon img,
.sov-result-card img {
  max-width: 100%;
  max-height: 100%;
  width: 72px;
  height: 72px;
  object-fit: contain;
  display: block;
  aspect-ratio: 1 / 1;
}

/* Перебивает mobile-base.css img { height: auto } */
.page-wrap .culture-icon img,
.sov-result-card .culture-icon img {
  max-width: 100% !important;
  max-height: 100% !important;
  width: 72px !important;
  height: 72px !important;
  object-fit: contain !important;
  aspect-ratio: 1 / 1;
}

.culture-icon--lg {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  font-size: 40px;
}

.culture-icon--lg img {
  width: 64px !important;
  height: 64px !important;
  max-width: 64px !important;
  max-height: 64px !important;
}

.sov-neighbor .culture-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  font-size: 22px;
}

.sov-neighbor .culture-icon img {
  width: 32px !important;
  height: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;
}

.culture-icon--sm,
.sov-neighbor-pill .culture-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  font-size: 16px;
}

.culture-icon--sm img,
.sov-neighbor-pill .culture-icon img {
  width: 22px !important;
  height: 22px !important;
  max-width: 22px !important;
  max-height: 22px !important;
}

.sov-result {
  min-width: 0;
}

.sov-result-empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--text-soft, #6b7468);
  background: var(--white, #fff);
  border: 1px dashed var(--border, #dde8d5);
  border-radius: var(--radius, 12px);
  font-size: 17px;
}

.sov-empty-hint {
  text-align: center;
  color: var(--text-soft, #666);
  font-size: 14px;
  margin: 16px 0 0;
  font-style: italic;
}

.sov-result-card {
  background: var(--white, #fff);
  border: 1px solid var(--border, #dde8d5);
  border-radius: var(--radius, 12px);
  padding: 20px;
  box-shadow: var(--shadow, 0 2px 12px rgba(42, 100, 20, 0.08));
}

.sov-result-header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border, #dde8d5);
}

.sov-result-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--green-dark, #2d6a1f);
}

.sov-result-meta {
  font-size: 14px;
  color: #1a1a1a;
  margin: 4px 0 0;
}

.sov-result-plant-link {
  font-size: 14px;
  font-weight: 600;
}

.sov-block {
  margin-bottom: 20px;
  padding: 16px;
  border-radius: var(--radius, 12px);
  border: 1px solid;
}

.sov-block h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 12px;
}

.sov-block--good {
  background: var(--green-light, #e8f5e1);
  border-color: #c5ddb8;
}

.sov-block--neutral {
  background: #f1efe8;
  border-color: var(--border, #dde8d5);
}

.sov-block--bad {
  background: #fceaea;
  border-color: #f7c1c1;
}

.sov-neighbors {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.sov-neighbors--pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sov-neighbor {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  background: var(--white, #fff);
  border: 1px solid var(--border, #dde8d5);
  border-radius: var(--radius, 12px);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.sov-block--good .sov-neighbor {
  border-color: #c5ddb8;
}

.sov-block--bad .sov-neighbor {
  border-color: #f7c1c1;
}

.sov-neighbor:hover {
  text-decoration: none;
  transform: translateX(3px);
  border-color: var(--green-main, #3a7d22);
}

.sov-neighbor-body {
  min-width: 0;
  flex: 1;
}

.sov-neighbor-name {
  display: block;
  font-weight: 700;
  font-size: 15px;
  color: var(--text-dark, #1a1a1a);
}

.sov-neighbor-why {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #1a1a1a;
  margin-top: 6px;
  line-height: 1.45;
}

.sov-neighbor-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border, #dde8d5);
  background: var(--white, #fff);
  font-size: 13px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.sov-neighbor-pill:hover {
  text-decoration: none;
  border-color: var(--green-main, #3a7d22);
  background: var(--green-light, #e8f5e1);
}

.sov-empty {
  font-size: 14px;
  color: var(--text-soft, #6b7468);
  margin: 0;
  grid-column: 1 / -1;
}

.sov-related-articles {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border, #dde8d5);
}

.sov-related-articles__title {
  font-size: 16px;
  margin: 0 0 10px;
  color: var(--green-dark, #2d6a1f);
}

.sov-related-articles__list {
  margin: 0;
  padding-left: 20px;
  line-height: 1.7;
}

.sov-text h2 {
  font-size: 22px;
  margin: 36px 0 12px;
  color: var(--green-dark, #2d6a1f);
}

.sov-text h3 {
  font-size: 18px;
  margin: 24px 0 10px;
  color: var(--green-dark, #2d6a1f);
}

.sov-text-block.sov-placeholder {
  color: var(--text-soft, #6b7468);
  font-style: italic;
  border-left: 3px solid var(--border, #dde8d5);
  padding: 8px 0 8px 12px;
  margin: 12px 0 20px;
  line-height: 1.55;
}

.sov-matrix-details {
  margin: 32px 0;
}

.sov-matrix-summary {
  font-size: 22px;
  font-weight: 700;
  color: var(--green-dark, #2d6a1f);
  cursor: pointer;
}

.sov-matrix-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 16px;
}

.sov-matrix {
  border-collapse: collapse;
  font-size: 12px;
  min-width: 100%;
}

.sov-matrix th,
.sov-matrix td {
  border: 1px solid var(--border, #dde8d5);
  text-align: center;
  padding: 0;
}

.sov-matrix thead th {
  background: var(--green-main, #3a7d22);
  color: #fff;
  font-weight: 700;
  min-width: 36px;
  height: 36px;
  font-size: 11px;
}

.sov-matrix__row-head {
  background: var(--green-light, #e8f5e1);
  font-weight: 600;
  text-align: left;
  padding: 4px 8px !important;
  white-space: nowrap;
  font-size: 12px;
  position: sticky;
  left: 0;
  z-index: 1;
}

.sov-matrix-cell {
  width: 40px;
  height: 40px;
  min-width: 36px;
  min-height: 36px;
  font-size: 14px;
  font-weight: 700;
}

.sov-matrix-cell--good {
  background: #c8e6c9;
}

.sov-matrix-cell--neutral {
  background: #f5f5f5;
}

.sov-matrix-cell--bad {
  background: #ffcdd2;
}

.sov-matrix-cell--self {
  background: #444;
  color: #fff;
}

.sov-disclaimer {
  margin: 32px 0 0;
  padding: 16px 18px;
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: var(--radius, 12px);
  font-size: 15px;
  line-height: 1.55;
}

@media (max-width: 900px) {
  .sov-interactive {
    gap: 16px;
  }

  .sov-matrix-cell {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
  }

  .sov-neighbors {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 24px;
  }
}
