/* Compare Template Styles */
.go-ah-compare-listing {
  margin: 2rem 0;
}

.go-ah-compare-table-wrapper {
  position: relative;
  width: 100%;
  margin: 0 auto;
}

.go-ah-table-container {
  overflow-x: auto;
  position: relative;
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.go-ah-compare-table {
  border-collapse: collapse; /* Changed back to collapse */
  width: 100%;
  position: relative;
  background: #f7f7f7;
}

/* Sticky column styles */
.go-ah-sticky-col {
  position: sticky !important;
  left: -1px !important;
  background: #f7f7f7 !important;
  z-index: 10 !important;
  box-shadow: 3px 0 5px -2px rgba(0, 0, 0, 0.1);
  isolation: isolate;
  word-wrap: break-word;
}

/* Ensure sticky header works with sticky column */
.go-ah-compare-table thead th.go-ah-sticky-col {
  z-index: 11 !important;
  background: #f8f9fa !important;
}

/* Reset some table styles */
.go-ah-compare-table td,
.go-ah-compare-table th {
  padding: 7px 14px;
  border: 1px solid #e8e8e8 !important;
  background: #f7f7f7 !important;
  line-height: 2rem;
}

/* Ensure proper background for hover state */
.go-ah-compare-table tr:hover .go-ah-sticky-col {
  background: #f8f9fa !important;
}

/* Make first column width consistent */
.go-ah-sticky-col {
  min-width: 125px;
  max-width: 125px;
  width: 125px;
}

/* Ensure table takes full width if content is narrow */
.go-ah-compare-table {
  min-width: 100%;
}

.go-ah-compare-table th,
.go-ah-compare-table td {
  background: #f7f7f7 !important;
  border: 1px solid #e8e8e8 !important;
  padding: 7px 14px;
  line-height: 2rem;
}

td.go-ah-cta-cell {
  white-space: nowrap;
}

.go-ah-compare-table thead {
  border-bottom: 3px solid;
}

.go-ah-compare-table thead th {
  background: #f8f9fa;
  font-weight: 700;
  max-width: 140px;
  text-align: center;
}

.go-ah-compare-table thead th:first-child {
  text-align: left;
}

/* Product Images */
.go-ah-product-images img {
  max-width: 100px;
  height: auto;
  margin: 0 auto;
  display: block;
}

/* Product Features */
.go-ah-compare-table tr:hover {
  background: #f8f9fa;
}

/* CTA Row */
.go-ah-cta .go-ah-btn-row {
  margin: 0.5rem auto;
  text-align: center;
}

.go-ah-btn-row a.small {
  padding: 0px 10px !important;
}

/* Responsive Design */
@media (max-width: 768px) {
  .go-ah-compare-table th,
  .go-ah-compare-table td {
    padding: 0.75rem;
    font-size: 0.9rem;
  }

  .go-ah-product-images img {
    max-width: 80px;
  }
}

/* Mobile Optimizations */
@media (max-width: 576px) {
  .go-ah-compare-table th,
  .go-ah-compare-table td {
    padding: 0.5rem;
    font-size: 0.8rem;
  }

  .go-ah-product-images img {
    max-width: 60px;
  }
}
