/* Comparison Table Toggle Styles */

.view-toggle-wrapper {
  text-align: center;
  margin: var(--spacing-md) 0 var(--spacing-lg) 0;
}

.view-toggle-btn {
  background: linear-gradient(135deg, var(--sting-yellow), #fbbf24);
  color: var(--bg-main);
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(234, 179, 8, 0.3);
}

.view-toggle-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(234, 179, 8, 0.4);
}

.view-toggle-btn:active {
  transform: translateY(0);
}

.toggle-icon {
  font-size: 20px;
  line-height: 1;
}

/* Fade transitions */
#cardView,
#tableView {
  animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Comparison Table Styles */

.comparison-table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin: var(--spacing-lg) 0;
  border-radius: 16px;
  background: var(--bg-elevated);
  padding: var(--spacing-md);
  -webkit-overflow-scrolling: touch;
}

.table-scroll {
  overflow-x: auto;
  border-radius: 12px;
}

.editions-comparison-table {
  width: 100%;
  min-width: 900px;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
}

.editions-comparison-table thead {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.2), rgba(251, 191, 36, 0.1));
  position: sticky;
  top: 0;
  z-index: 10;
}

.editions-comparison-table th {
  padding: var(--spacing-md);
  text-align: center;
  color: var(--text-primary);
  font-weight: 600;
  border-bottom: 2px solid var(--sting-yellow);
  font-size: 14px;
}

.editions-comparison-table th.feature-col {
  text-align: left;
  min-width: 180px;
  background: var(--bg-card);
  position: sticky;
  left: 0;
  z-index: 11;
}

.editions-comparison-table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.2s ease;
}

.editions-comparison-table tbody tr:hover {
  background: rgba(234, 179, 8, 0.05);
}

.editions-comparison-table td {
  padding: var(--spacing-sm) var(--spacing-md);
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.03);
}

.editions-comparison-table td.feature-name {
  text-align: left;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-card);
  position: sticky;
  left: 0;
  z-index: 5;
  border-right: 2px solid rgba(234, 179, 8, 0.2);
}

.editions-comparison-table td:last-child {
  border-right: none;
}

/* Category rows */
.category-row td {
  background: rgba(234, 179, 8, 0.15) !important;
  color: var(--sting-yellow) !important;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
  padding: var(--spacing-xs) var(--spacing-md);
  border-top: 2px solid rgba(234, 179, 8, 0.3);
  border-bottom: 2px solid rgba(234, 179, 8, 0.3);
}

/* Edition column highlights */
.ce-col {
  background: rgba(59, 130, 246, 0.05);
}

.pro-col {
  background: rgba(139, 92, 246, 0.05);
}

.enterprise-col {
  background: rgba(234, 179, 8, 0.05);
}

.plus-col {
  background: rgba(249, 115, 22, 0.05);
}

.cloud-col {
  background: rgba(6, 182, 212, 0.05);
}

.cloud-enterprise-col {
  background: rgba(14, 165, 233, 0.05);
}

/* Edition badges in table */
.editions-comparison-table .edition-badge {
  font-size: 10px;
  padding: 4px 8px;
  margin: 0 auto 4px auto;
  display: inline-block;
}

/* Table CTA buttons */
.table-cta-btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.3s ease;
  text-align: center;
  white-space: nowrap;
}

.table-cta-btn.ce-btn {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid #60a5fa;
}

.table-cta-btn.ce-btn:hover {
  background: rgba(59, 130, 246, 0.3);
  transform: translateY(-2px);
}

.table-cta-btn.pro-btn {
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
  color: white;
  border: none;
}

.table-cta-btn.pro-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.table-cta-btn.enterprise-btn,
.table-cta-btn.plus-btn {
  background: linear-gradient(135deg, var(--sting-yellow), #fbbf24);
  color: var(--bg-main);
  border: none;
}

.table-cta-btn.enterprise-btn:hover,
.table-cta-btn.plus-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(234, 179, 8, 0.4);
}

.table-cta-btn.cloud-btn,
.table-cta-btn.cloud-enterprise-btn {
  background: rgba(6, 182, 212, 0.2);
  color: #22d3ee;
  border: 1px solid #22d3ee;
}

.table-cta-btn.cloud-btn:hover,
.table-cta-btn.cloud-enterprise-btn:hover {
  background: rgba(6, 182, 212, 0.3);
  transform: translateY(-2px);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .comparison-table-wrapper {
    padding: var(--spacing-sm);
    position: relative;
  }

  /* Scroll hint indicator */
  .comparison-table-wrapper::after {
    content: '← Scroll to see all →';
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(234, 179, 8, 0.9);
    color: var(--bg-main);
    padding: 6px 16px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    pointer-events: none;
    animation: fadeInOut 3s ease-in-out infinite;
    z-index: 20;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  }

  @keyframes fadeInOut {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
  }

  .editions-comparison-table {
    min-width: 800px;
    font-size: 13px;
  }

  .editions-comparison-table th,
  .editions-comparison-table td {
    padding: 10px 12px;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .editions-comparison-table th.feature-col,
  .editions-comparison-table td.feature-name {
    min-width: 140px;
  }

  .table-cta-btn {
    padding: 8px 12px;
    font-size: 11px;
  }

  .view-toggle-btn {
    padding: 10px 20px;
    font-size: 14px;
  }

  /* On mobile, default to card view for better UX */
  .pricing-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Sticky column shadow effect */
.editions-comparison-table th.feature-col::after,
.editions-comparison-table td.feature-name::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 10px;
  background: linear-gradient(90deg, rgba(234, 179, 8, 0.1), transparent);
  pointer-events: none;
}
