/* Vehicle compare page */

.as24ci-compare-page {
  background: #f5f7fb;
  padding: 32px 0 48px;
  max-width: none;
}

.as24ci-compare-inner {
  width: min(1440px, calc(100% - 48px));
  margin: 0 auto 32px;
}

@media (max-width: 1100px) {
  .as24ci-compare-inner {
    width: min(1440px, calc(100% - 32px));
  }
}

@media (max-width: 960px) {
  .as24ci-compare-inner {
    width: calc(100% - 24px);
  }
}

.as24ci-compare-title {
  margin: 0 0 20px;
  font-size: var(--as24ci-font-size-title, 28px);
  font-weight: 700;
  color: var(--as24ci-color-title, inherit);
}

/* Table wrapper for horizontal scroll on small screens */

.as24ci-compare-table-wrap {
  margin-bottom: 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Comparison table */

.as24ci-compare-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.as24ci-compare-table tr {
  border-bottom: 1px solid #f0f0f0;
}

.as24ci-compare-table tr:last-child {
  border-bottom: none;
}

.as24ci-compare-table tbody tr:nth-child(even):not(.as24ci-compare-row-image) {
  background: #f9fafb;
}

/* Table header cells (vehicle names) */

.as24ci-compare-corner {
  min-width: 160px;
  background: #ffffff;
}

.as24ci-compare-col-header {
  position: relative;
  padding: 14px 30px 14px 18px;
  text-align: center;
  vertical-align: middle;
  background: #ffffff;
  border-bottom: 2px solid #e5e7eb;
  min-width: 200px;
}

.as24ci-compare-vehicle-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--as24ci-color-title, inherit);
}

.as24ci-compare-vehicle-title a {
  color: inherit;
  text-decoration: none;
}

.as24ci-compare-vehicle-title a:hover {
  text-decoration: underline;
  color: var(--as24ci-color-primary, #004b8d);
}

/* Image row */

.as24ci-compare-row-image td {
  padding: 12px 18px;
}

.as24ci-compare-image-cell {
  text-align: center;
  vertical-align: middle;
}

.as24ci-compare-thumb {
  display: block;
}

.as24ci-compare-thumb-img {
  width: 100%;
  max-width: 280px;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
  aspect-ratio: 16 / 9;
  margin: 0 auto;
}

/* Data cells */

.as24ci-compare-label {
  text-align: left;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--as24ci-color-text, inherit);
  white-space: nowrap;
  min-width: 160px;
}

.as24ci-compare-value {
  padding: 12px 18px;
  font-size: 14px;
  color: var(--as24ci-color-text, inherit);
  text-align: center;
}

/* Remove button in column header */

.as24ci-compare-remove-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.08);
  color: #374151;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  padding: 0;
  -webkit-appearance: none;
}

.as24ci-compare-remove-btn:hover {
  background: #fee2e2;
  color: #dc2626;
}



.as24ci-compare-empty {
  padding: 32px 0 16px;
  font-size: 16px;
  color: #6b7280;
}

/* Back link */

.as24ci-compare-back {
  margin-top: 8px;
}

/* Responsive */

@media (max-width: 768px) {
  .as24ci-compare-table {
    min-width: 600px;
  }
}

/* ============================================================
 * Compare toggle button (archive card overlay + single page)
 * ============================================================ */

/* Base compare toggle button — shared by both overlay and sticky-right variants */
.as24ci-compare-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0;
  margin: 0;
  border: none;
  cursor: pointer;
  background: transparent;
  font-size: 0;
  line-height: 1;
  transition: background 0.15s, border-color 0.15s;
  -webkit-appearance: none;
}

.as24ci-compare-btn .as24ci-compare-icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* ---------- Overlay variant (archive grid thumbnails) ---------- */

.as24ci-compare-btn--overlay {
  position: absolute;
  top: 8px;
  right: 36px;
  z-index: 3;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  border: none;
}

.as24ci-compare-btn--overlay .as24ci-compare-icon {
  color: rgba(50, 50, 50, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.as24ci-compare-btn--overlay:hover {
  background: #fff;
}

.as24ci-compare-btn--overlay:hover .as24ci-compare-icon,
.as24ci-compare-btn--overlay.as24ci-compare-active .as24ci-compare-icon {
  color: var(--as24ci-color-primary, #004b8d);
}

.as24ci-compare-btn--overlay.as24ci-compare-active {
  background: #eff6ff;
}

/* ---------- Sticky-right floating bar on single pages ---------- */

.as24ci-compare-float {
  position: fixed;
  right: 0;
  bottom: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  padding: 0;
}

.as24ci-compare-float__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px 10px 12px;
  background: var(--as24ci-color-primary, #004b8d);
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px 0 0 8px;
  box-shadow: -2px 2px 10px rgba(0, 0, 0, 0.18);
  transition: background 0.2s, box-shadow 0.2s;
  position: relative;
}

.as24ci-compare-float__link:hover {
  background: var(--as24ci-color-primary-hover, #003a6d);
  color: #fff;
  box-shadow: -2px 2px 14px rgba(0, 0, 0, 0.25);
}

.as24ci-compare-float__icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.as24ci-compare-float__icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.as24ci-compare-float__label {
  line-height: 1;
}

/* Counter badge inside floating bar */
.as24ci-compare-float .as24ci-compare-counter__badge {
  position: absolute;
  top: -6px;
  left: -6px;
  background: #e53935;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ---------- Sticky-right bar button variant (inside social share bar) ---------- */

.as24ci-share-btn--compare {
  background: var(--as24ci-color-primary, #004b8d);
}

.as24ci-share-btn--compare:hover {
  background: var(--as24ci-color-primary-hover, #003a6d);
  opacity: 1;
}

.as24ci-share-btn--compare.as24ci-compare-active {
  background: #1e40af;
}

.as24ci-share-placement--sticky-right .as24ci-share-btn--compare .as24ci-compare-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.as24ci-share-placement--sticky-right .as24ci-share-btn--compare .as24ci-compare-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* ---------- Responsive ---------- */

@media (max-width: 600px) {
  .as24ci-compare-float {
    bottom: 16px;
  }
  .as24ci-compare-float__link {
    padding: 8px 10px 8px 8px;
    font-size: 12px;
  }
}
