/* Estimation Section */
.estimation-section {
  margin-bottom: 60px;
  background: var(--pure-white);
  padding: 20px 12px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.estimation-section h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 16px;
  text-align: center;
  color: var(--deep-navy);
}

.estimation-section p {
  font-size: 1.1rem;
  color: var(--medium-gray);
  margin-bottom: 24px;
  text-align: center;
}

.estimation-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  max-width: 800px;
  margin: 2rem auto;
  padding: 1.5rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}

.estimation-inputs .form-group {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 1rem;
  background-color: #ffffff;
  border-radius: 0.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.estimation-inputs .form-group:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.estimation-inputs .form-group input,
.estimation-inputs .form-group select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.estimation-inputs .form-group input:focus,
.estimation-inputs .form-group select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
  outline: none;
}

.form-group input[type="checkbox"] {
  display: none;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--deep-navy);
  cursor: pointer;
  position: relative;
  transition: color 0.3s ease, text-decoration 0.3s ease;
}

.checkbox-label::before {
  content: "✓";
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 6px;
  text-align: center;
  line-height: 20px;
  font-weight: bold;
  border-radius: 4px;
  border: 1px solid #ccc;
  background-color: #e5e7eb;
  color: #10b981;
  transition: all 0.3s ease, transform 0.2s ease;
}

.form-group input[type="checkbox"]:not(:checked)+.checkbox-label::before {
  content: "✕";
  color: #ef4444;
  background-color: #f3f4f6;
  border-color: #d1d5db;
  transform: scale(1.2);
  animation: pop 0.2s ease;
}

.form-group input[type="checkbox"]:not(:checked)+.checkbox-label {
  text-decoration: line-through;
  color: #6b7280;
}

@keyframes pop {
  0% {
    transform: scale(0.8);
  }

  50% {
    transform: scale(1.3);
  }

  100% {
    transform: scale(1);
  }
}

.tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 260px;
  background: var(--deep-navy);
  color: var(--pure-white);
  text-align: left;
  border-radius: 6px;
  padding: 6px 8px;
  position: absolute;
  z-index: 10;
  bottom: 125%;
  left: 0;
  font-size: 12px;
  line-height: 1.4;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
  transform: translateY(-3px);
}

.table-count-input {
  display: none;
  width: 60px;
  padding: 4px 6px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
}

.cost-chart {
  background: var(--pure-white);
  padding: 20px;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

.cost-chart canvas {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
}

.cost-chart h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--deep-navy);
  text-align: center;
}

/* Packs Section */
.pack-details {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pack-details li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid #e5e7eb; /* subtle line */
  background: #fafafa; /* light row background */
  transition: background 0.2s ease;
  min-height: 100px;
}

.pack-details li i {
  color: #10b981; /* green for check */
  min-width: 20px; /* keeps icons aligned */
}

.pack-details li .disabled {
  color: #d1d5db; /* grey for disabled */
}

.pack-details li:hover {
  background: #f0f9ff; /* light highlight on hover */
}

.packs-section {
  padding: 40px 0;
}

.packs-section h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 32px;
  text-align: center;
  color: var(--deep-navy);
}

.packs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.pack-card {
  background: var(--pure-white);
  border-radius: 16px;
  padding: 16px 32px 32px;
  box-shadow: var(--shadow-md);
  position: relative;
  border: 2px solid var(--tech-blue);
  transition: var(--transition);
  overflow: hidden;
}

.pack-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--tech-blue), var(--fresh-green));
  opacity: 0;
  transition: var(--transition);
}

.pack-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.pack-card:hover::before {
  opacity: 1;
}

/* Disabled AI Optimizer Pack */
.pack-card.disabled {
  background: var(--disabled-lightgray);
  opacity: 0.7;
  pointer-events: none;
  border-color: var(--medium-gray);
}

.pack-card.disabled h3,
.pack-card.disabled .pack-cost,
.pack-card.disabled .pack-cost span,
.pack-card.disabled p,
.pack-card.disabled .pack-details li {
  color: var(--medium-gray);
}

.pack-card.disabled::before,
.pack-card.disabled.recommended::after {
  display: none;
}

/* Distinct styling for each pack */
.pack-card.pay-as-you-go {
  border-color: var(--fresh-green);
}

.pack-card.pay-as-you-go h3 {
  color: var(--fresh-green);
}

.pack-card.pay-as-you-go::before {
  background: var(--fresh-green);
}

.pack-card.pay-as-you-go .pack-cost span {
  color: var(--fresh-green);
}

.pack-card.pay-as-you-go .btn-primary {
  background-color: var(--fresh-green);
}

.pack-card.pay-as-you-go .btn-primary:hover {
  background-color: #27ae60;
}

.pack-card.basic-ai-pack {
  border-color: var(--tech-blue);
}

.pack-card.basic-ai-pack h3 {
  color: var(--tech-blue);
}

.pack-card.basic-ai-pack::before {
  background: var(--tech-blue);
}

.pack-card.basic-ai-pack .pack-cost span {
  color: var(--tech-blue);
}

.pack-card.basic-ai-pack .btn-primary {
  background-color: var(--tech-blue);
}

.pack-card.basic-ai-pack .btn-primary:hover {
  background-color: #2980b9;
}

.pack-card.ai-optimizer {
  border-color: var(--highlight-purple);
}

.pack-card.ai-optimizer h3 {
  color: var(--highlight-purple);
}

.pack-card.ai-optimizer::before {
  background: var(--highlight-purple);
}

.pack-card.ai-optimizer .pack-cost span {
  color: var(--highlight-purple);
}

.pack-card.ai-optimizer .btn-primary {
  background-color: var(--highlight-purple);
}

.pack-card.ai-optimizer .btn-primary:hover {
  background-color: #6a1b9a;
}

.pack-card.ai-optimizer .btn-primary.disabled {
  background-color: var(--disabled-gray);
  color: var(--medium-gray);
  pointer-events: none;
  box-shadow: none;
}

/* Recommended Pack Highlight */
.pack-card.recommended::after {
  content: 'Recommended';
  position: absolute;
  top: 20px;
  right: -36px;
  color: var(--pure-white);
  padding: 6px 48px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  transform: rotate(45deg);
  box-shadow: var(--shadow-sm);
}
.pack-card.ai-optimizer.recommended::after {
  background: linear-gradient(45deg, var(--highlight-purple), #AB47BC);
}

.pack-card.ai-optimizer.recommended {
  border-width: 3px;
  box-shadow: 0 12px 24px rgba(123, 31, 162, 0.25);
}

.pack-card.standard-ai-pack.recommended::after {
  background: linear-gradient(45deg, var(--tech-blue), #2980b9);
}

.pack-card.standard-ai-pack.recommended {
  border-width: 3px;
  box-shadow: 0 12px 24px var(--tech-blue);
}

.pack-cost {
  font-size: 1.3rem;
  font-weight: 600;
  padding: 12px 16px;
  margin-bottom: 16px;
  background: var(--light-gray);
  border-radius: 8px;
  color: var(--deep-navy);
  text-align: center;
}

.pack-cost span {
  font-weight: 700;
}

.pack-card h3 {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 16px 0;
}

.pack-card p {
  font-size: 1rem;
  color: var(--medium-gray);
  margin-bottom: 20px;
}

.pack-details {
  list-style: none;
  margin-bottom: 24px;
}

.pack-details li {
  font-size: 0.95rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--deep-navy);
}

.pack-details li i.fa-check {
  color: var(--fresh-green);
  font-size: 1.1rem;
}

.pack-details li i.fa-times.disabled {
  color: var(--accent-red);
  opacity: 0.6;
}

.pack-addons {
  margin-bottom: 24px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--pure-white);
  text-decoration: none;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  background-color: var(--deep-navy);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Test Data Table */
.test-data {
  margin-top: 2rem;
  text-align: center;
}

.test-data h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 1rem;
}

.test-data table {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  border-collapse: collapse;
  background: transparent;
  font-family: 'Inter', sans-serif;
}

/* Default: desktop, show all columns */
.test-data td,
.test-data th {
  display: table-cell;
  /* all columns visible */
}

.test-data th,
.test-data td {
  padding: 0.75rem;
  border: 1px solid var(--light-gray);
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-color);
}

.test-data th {
  background-color: var(--light-gray);
  font-weight: 600;
}

.test-data td {
  background: transparent;
}

.test-data tr td:last-child {
  color: var(--ai-optimizer-color, #6b46c1);
}

.test-data tr td:last-child.ineligible {
  color: var(--text-color);
}

.test-data tr td.effective {
  background-color: var(--disabled-gray);
  color: var(--text-color);
  font-weight: 800;
}

.disclaimer {
  font-size: 0.85rem;
  color: #6b7280; /* neutral gray */
  font-style: italic;
  margin-top: 6px;
}
.text-disclaimer {
  color: var(--accent-red);
}
.disclaimer span {
  color: var(--highlight-black);
}
.form-group-summary {
  display: grid;
  grid-template-columns: 1fr 1fr; /* 2 columns */
  grid-template-rows: auto auto; /* 2 rows */
  gap: 8px 16px; /* row-gap / col-gap */
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fafafa;
  max-width: 400px; /* optional, keeps it compact */
}

.form-group-summary .plan-summary {
  font-weight: 600;
  color: #374151; /* dark gray for labels */
}

.form-group-summary .fee-summary {
  text-align: right;
  color: #111827; /* almost black for values */
  font-weight: 500;
}


.cost-summary {
  max-width: 750px;
  margin: 2rem auto;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.cost-summary table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.cost-summary caption {
  padding: 1rem;
  font-size: 1.2rem;
  font-weight: 600;
  color: #1a1a1a;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
}

.cost-summary th,
.cost-summary td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.cost-summary th {
  background: #f1f5f9;
  color: #374151;
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cost-summary td {
  color: #4b5563;
  font-size: 1rem;
}

.cost-summary tr {
  display: table-row;
}

.cost-summary tr.highlight {
  background: #e0f2fe;
  transition: background 0.2s ease;  
  display: table-row;
}
.cost-summary tr.invisible {
  display: none;
}

.cost-summary tr:hover {
  background: #f3f4f6;
}

.cost-summary td:last-child {
  font-weight: 500;
  color: #1f2937;
}

.cost-summary #free-cost-summary,
.cost-summary #ai-optimizer-cost-summary {
  color: #dc2626;
  font-weight: 600;
}

.cost-summary #standard-ai-cost-summary {
  color: #15803d;
  font-weight: 600;
}

.highlight-text {
  font-weight: 800;
  color: var(--deep-navy);
}

.highlight-price-text {
  font-style: italic;
  color: var(--deep-navy);
}
/* Subtle blinking highlight + pulse */
.highlight-blink{
  display:inline-block;
  padding:0.08em 0.28em;
  border-radius:0.22em;
  color:#000;
  font-weight: 700;
}

/* Background color blink */
@keyframes blink-bg{
  0%   { color:#000; }
  50%  { color:#ebebeb; }
  100% { color:#000; }
}

/* Accessibility: stop animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce){
  .highlight-blink{
    animation: none;
  }
}

/* TEST TABLE*/
.table-header-nav {
  position: sticky;
  top: 0;
  /* sticks to top of table section */
  background: #fff;
  /* white bg to overlay content */
  z-index: 20;
  padding: 0.5rem 0;
  justify-content: center;
}

.table-nav-buttons button {
  background: none;
  border: none;
  border-radius: 6px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s;
}

.table-nav-buttons svg {
  width: 20px;
  height: 20px;
  stroke: #333;
}

.table-carousel-wrapper {
  position: relative;
  overflow: hidden;
  /* hide extra columns */
}

.carousel-prev,
.carousel-next {
  box-shadow: none !important;
}

.table-inner {
  display: flex;
  transition: transform 0.3s ease;
  width: 100%;
  /* table can be wider than wrapper */
}

.table-inner table {
  border-collapse: collapse;
}

.table-inner th,
.table-inner td {
  padding: 12px 16px;
  white-space: pre-wrap;
  border-bottom: 1px solid #eee;
  max-width: 400px;
}

/* Floating buttons */
.button-prev,
.button-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0);
  border: none;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: transform 0.3s;
}

.button-prev:hover,
.button-next:hover {
  transform: translateY(-50%) scale(1.1);
}

.button-prev {
  left: 8px;
}

.button-next {
  right: 8px;
}

.button-prev svg,
.button-next svg {
  width: 20px;
  height: 20px;
  stroke: #333;
}

/* Hide by default on mobile */
@media (max-width: 1024px) {

  .th-page-1,
  .th-page-2,
  .th-page-3,
  .th-page-4 {
    display: none;
  }

  .th-visible {
    display: table-cell !important;
  }
}

/* Responsive design */
@media (max-width: 480px) {
  .cost-summary {
    margin: 1rem;
  }

  .cost-summary table {
    font-size: 0.9rem;
  }

  .cost-summary th,
  .cost-summary td {
    padding: 0.75rem;
  }

  .cost-summary caption {
    font-size: 1.1rem;
    padding: 0.75rem;
  }
}

/* Tooltip for AI Optimizer disabled state */
.pack-card.ai-optimizer.disabled .disabled-tooltip {
  visibility: visible;
  opacity: 1;
  transform: translateY(-3px);
}


/* Responsive adjustments */
@media (max-width: 768px) {
  .test-data table {
    font-size: 0.8rem;
  }

  .test-data th,
  .test-data td {
    padding: 0.5rem;
  }
}

@media (max-width: 480px) {
  .test-data table {
    font-size: 0.7rem;
  }

  .test-data th,
  .test-data td {
    padding: 0.3rem;
  }

  .test-data h3 {
    font-size: 1.25rem;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .pricing-hero {
    padding: 20px 0;
  }

  .pricing-hero h1 {
    font-size: 2rem;
  }

  .estimation-inputs {
    grid-template-columns: 1fr;
  }

  .packs-grid {
    grid-template-columns: 1fr;
  }

  .pack-card {
    padding: 12px 20px 20px;
  }

  .pack-card.recommended::after {
    right: -30px;
    padding: 6px 40px;
  }

  .pack-cost {
    font-size: 1.2rem;
    padding: 10px 12px;
  }

  .btn-primary {
    padding: 10px 20px;
    font-size: 0.95rem;
  }

  .cost-chart {
    padding: 16px;
  }

  .cost-chart h3 {
    font-size: 1.2rem;
  }

  .packs-section h2,
  .estimation-section h2 {
    font-size: 1.5rem;
  }

  .tooltip .tooltiptext {
    width: 200px;
    margin-left: -100px;
  }
}

@media (max-width: 480px) {
  .estimation-section {
    padding: 20px 0;
    margin-bottom: 60px;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
  }

  .estimation-inputs {
    padding: 0;
    border: none;
  }

  .cost-summary {
    margin: 0;
    border: none;
  }

  .pricing-hero h1 {
    font-size: 1.8rem;
  }

  .pack-card h3 {
    font-size: 1.4rem;
  }

  .pack-card p {
    font-size: 0.9rem;
  }

  .pack-details li {
    font-size: 0.9rem;
  }

  .pack-cost {
    font-size: 1.1rem;
    padding: 8px 10px;
  }

  .btn-primary {
    padding: 8px 16px;
    font-size: 0.9rem;
  }

  .cost-chart {
    padding: 12px;
  }

  .cost-chart h3 {
    font-size: 1.1rem;
  }

  .tooltip .tooltiptext {
    width: 150px;
    margin-left: -75px;
    font-size: 0.8rem;
  }
}