/* baylan-ukraine 2026-08-27 R1.7: compare page — semantic table, sticky label
   column, horizontal scroll region. Loaded only when bl_scope == 'compare'. */

.bl-compare-body {
  padding-bottom: var(--bl-space-6);
}

.bl-compare-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--bl-space-3);
  flex-wrap: wrap;
  margin-bottom: var(--bl-space-4);
}

.bl-compare-count {
  font-size: 14px;
  color: var(--bl-alpha-text-55);
}

[data-bl-compare-differ][aria-pressed="true"] {
  background: var(--bl-color-accent);
  border-color: var(--bl-color-accent);
  color: #fff;
}

.bl-compare-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: var(--bl-hairline);
}
.bl-compare-scroll:focus-visible {
  outline: 2px solid var(--bl-color-accent);
  outline-offset: 2px;
}

.bl-compare-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 100%;
  background: #fff;
  font-size: 14px;
  line-height: 1.4;
}

.bl-compare-table th,
.bl-compare-table td {
  padding: var(--bl-space-3);
  border: var(--bl-hairline);
  text-align: left;
  vertical-align: top;
  min-width: 180px;
  max-width: 280px;
}

/* sticky label column */
.bl-compare-table thead td.bl-compare-corner,
.bl-compare-table tbody th[scope="row"],
.bl-compare-table tr.bl-compare-actions td.bl-compare-corner {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--bl-color-bg-soft, #f2f5f8);
  min-width: 130px;
  max-width: 170px;
  font-weight: 700;
}

.bl-compare-table thead th.bl-compare-product {
  background: #fff;
  font-weight: 400;
  vertical-align: top;
}

.bl-compare-product-link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--bl-space-2);
  color: var(--bl-color-text);
  text-decoration: none;
}
.bl-compare-product-link:hover .bl-compare-product-name {
  color: var(--bl-color-accent);
}

.bl-compare-thumb {
  width: 120px;
  height: 120px;
  object-fit: contain;
  background: #fff;
}

.bl-compare-product-name {
  font-weight: 700;
}

.bl-compare-price {
  font-weight: 700;
  white-space: nowrap;
}
.bl-compare-price-old {
  margin-left: var(--bl-space-2);
  color: var(--bl-alpha-text-55);
  text-decoration: line-through;
  white-space: nowrap;
}

.bl-compare-group th {
  background: var(--bl-color-bg-soft, #f2f5f8);
  font-weight: 700;
}

.bl-compare-summary {
  font-size: 13px;
  color: var(--bl-alpha-text-55);
}

.bl-compare-actions td {
  vertical-align: middle;
}

.bl-compare-remove {
  display: block;
  margin-top: var(--bl-space-2);
  color: var(--bl-color-accent);
  text-align: center;
  font-size: 13px;
}

@media (max-width: 767px) {
  .bl-compare-table th,
  .bl-compare-table td {
    min-width: 150px;
    padding: var(--bl-space-2);
  }
  .bl-compare-table thead td.bl-compare-corner,
  .bl-compare-table tbody th[scope="row"],
  .bl-compare-table tr.bl-compare-actions td.bl-compare-corner {
    min-width: 110px;
    max-width: 130px;
  }
  .bl-compare-thumb {
    width: 88px;
    height: 88px;
  }
}
