/* ========================================================================
   PRICING PAGE STYLES
   ======================================================================== */

/* ===== PRICING HERO SECTION ===== */
.pricing-hero {
  position: relative;
  background: linear-gradient(135deg, hsl(210, 40%, 15%) 0%, hsl(220, 35%, 20%) 100%);
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pricing-hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('/hero_background.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.6;
}

.pricing-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(15, 23, 42, 0.3) 0%,
    rgba(15, 23, 42, 0.2) 50%,
    rgba(15, 23, 42, 0.4) 100%
  );
}

/* ===== PRICING CONTROLS ===== */
.pricing-controls-container {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}

.pricing-controls {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1.5rem 2rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex-wrap: wrap;
  justify-content: center;
}

.billing-toggle {
  display: flex;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.25rem;
  border-radius: var(--radius-md);
}

.billing-toggle-label {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  font-weight: var(--font-weight-medium);
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
}

.billing-toggle-label input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.billing-toggle-label:has(input[type="radio"]:checked) {
  background: hsl(var(--color-primary));
  color: white;
  box-shadow: 0 2px 8px rgba(20, 184, 166, 0.3);
}

.savings-badge {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.125rem 0.5rem;
  background: hsl(var(--color-the-closer));
  color: white;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: var(--font-weight-semibold);
}

.currency-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.currency-select {
  padding: 0.75rem 1.25rem;
  padding-right: 2.5rem;
  border-radius: var(--radius-md);
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: all var(--transition-base);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
}

.currency-select:hover,
.currency-select:focus {
  border-color: hsl(var(--color-primary));
  background: rgba(255, 255, 255, 0.15);
  outline: none;
}

.currency-select option {
  background: hsl(var(--color-background));
  color: hsl(var(--color-foreground));
}

/* ===== TEAM SIZE SLIDER ===== */
.team-size-section {
  position: relative;
  z-index: 1;
  background: linear-gradient(to bottom, hsl(var(--color-background)), hsl(var(--color-background)));
  border-bottom: 1px solid hsl(var(--color-border));
  padding-top: 5rem;
  padding-bottom: 5rem;
}

@media (min-width: 768px) {
  .team-size-section {
    padding-top: 6rem;
    padding-bottom: 6rem;
  }
}

.team-size-controller {
  max-width: 100%;
}

.team-size-label {
  text-align: center;
  font-size: 1.5rem;
  font-weight: var(--font-weight-bold);
  font-family: var(--font-display);
  margin-bottom: 2rem;
  color: hsl(var(--color-foreground));
}

.team-size-slider-container {
  position: relative;
  padding: 2rem 0 4rem;
}

.team-size-slider {
  width: 100%;
  height: 8px;
  border-radius: var(--radius-full);
  background: hsl(var(--color-muted));
  outline: none;
  appearance: none;
  cursor: pointer;
}

.team-size-slider::-webkit-slider-thumb {
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: hsl(var(--color-primary));
  cursor: pointer;
  box-shadow: 0 2px 8px hsl(var(--color-primary) / 0.4);
  transition: all var(--transition-base);
}

.team-size-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 12px hsl(var(--color-primary) / 0.6);
}

.team-size-slider::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: hsl(var(--color-primary));
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 8px hsl(var(--color-primary) / 0.4);
  transition: all var(--transition-base);
}

.team-size-slider::-moz-range-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 12px hsl(var(--color-primary) / 0.6);
}

.team-size-markers {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
}

.team-size-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
  opacity: 0.6;
  flex: 1;
}

.team-size-marker.active {
  opacity: 1;
}

.marker-label {
  font-weight: var(--font-weight-semibold);
  font-size: 1rem;
  margin-bottom: 0.25rem;
  color: hsl(var(--color-foreground));
}

.team-size-marker.active .marker-label {
  color: hsl(var(--color-primary));
  font-size: 1.125rem;
}

.marker-range {
  font-size: 0.875rem;
  color: hsl(var(--color-muted-foreground));
}

.custom-team-input {
  margin-top: 2rem;
  text-align: center;
  padding: 1.5rem;
  background: hsl(var(--color-muted) / 0.3);
  border-radius: var(--radius-lg);
  border: 2px dashed hsl(var(--color-border));
}

.custom-team-input label {
  display: block;
  font-weight: var(--font-weight-semibold);
  margin-bottom: 0.75rem;
  color: hsl(var(--color-foreground));
}

.custom-team-input input[type="number"] {
  width: 120px;
  padding: 0.75rem 1rem;
  border: 2px solid hsl(var(--color-border));
  border-radius: var(--radius-md);
  font-size: 1.25rem;
  font-weight: var(--font-weight-bold);
  text-align: center;
  background: hsl(var(--color-background));
  color: hsl(var(--color-foreground));
  margin: 0 0.5rem;
}

.custom-team-input input[type="number"]:focus {
  outline: none;
  border-color: hsl(var(--color-primary));
  box-shadow: 0 0 0 3px hsl(var(--color-primary) / 0.1);
}

.input-hint {
  color: hsl(var(--color-muted-foreground));
  font-size: 0.875rem;
}

/* ===== PRICING CARDS ===== */
.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
}

.pricing-card.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.pricing-card.most-popular {
  border: 2px solid hsl(var(--color-primary));
  box-shadow: 0 8px 24px hsl(var(--color-primary) / 0.2);
}

@media (min-width: 1024px) {
  .pricing-card.most-popular {
    transform: scale(1.05);
  }
}

.popular-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: hsl(var(--color-the-closer));
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 1;
}

.card-image-container {
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: hsl(var(--color-muted) / 0.2);
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.card-headline {
  font-size: 1.75rem;
  font-weight: var(--font-weight-bold);
  font-family: var(--font-display);
  margin-bottom: 0.75rem;
  color: hsl(var(--color-foreground));
}

.card-subhead {
  font-size: 1rem;
  color: hsl(var(--color-muted-foreground));
  margin-bottom: 1.5rem;
}

.price-display {
  padding: 1.5rem;
  background: hsl(var(--color-muted) / 0.2);
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}

.price-amount {
  font-size: 2.5rem;
  font-weight: var(--font-weight-bold);
  font-family: var(--font-display);
  color: hsl(var(--color-foreground));
  white-space: nowrap;
}

.price-period {
  font-size: 1rem;
  color: hsl(var(--color-muted-foreground));
  margin-left: 0.5rem;
}

.price-comparison {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: hsl(var(--color-muted-foreground));
}

.unavailable-message {
  padding: 1rem;
  background: hsl(var(--color-muted) / 0.5);
  border-radius: var(--radius-md);
  text-align: center;
  color: hsl(var(--color-muted-foreground));
  font-weight: var(--font-weight-medium);
  margin-top: 1rem;
}

/* ===== PRICING TIERS SECTION ===== */
.pricing-tiers-section {
  position: relative;
  z-index: 1;
  background-color: hsl(var(--color-midnight-navy));
  overflow: hidden;
}

.pricing-tiers-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('/the_compare_matrix_background.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.3;
  z-index: 0;
}

.pricing-tiers-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 15, 31, 0.85) 0%,
    rgba(0, 15, 31, 0.9) 50%,
    rgba(0, 15, 31, 0.85) 100%
  );
  z-index: 0;
}

.pricing-tiers-section > .container {
  position: relative;
  z-index: 1;
}

.pricing-tiers-section h2 {
  color: white;
}

.pricing-tiers-section .text-muted-foreground {
  color: rgba(255, 255, 255, 0.8);
}

/* ===== OVERAGE SECTION ===== */
.overage-section {
  position: relative;
  z-index: 1;
  background: linear-gradient(
    135deg,
    hsl(var(--color-background)) 0%,
    hsl(var(--color-muted)) 100%
  );
}

.overage-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: start;
}

@media (min-width: 768px) {
  .overage-content {
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
  }
}

.overage-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.overage-text h2 {
  color: hsl(var(--color-foreground));
}

.overage-math-card {
  padding: 2rem;
  background: hsl(var(--color-background));
  border: 2px solid hsl(var(--color-border));
  border-radius: var(--radius-lg);
}

.savings-calculator {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.calculator-header h3 {
  font-size: 1.25rem;
  color: hsl(var(--color-foreground));
}

.calculator-header #calc-team-size {
  color: hsl(var(--color-primary));
  font-weight: var(--font-weight-bold);
}

.pricing-comparison {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 768px) {
  .pricing-comparison {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .vs-divider {
    text-align: center;
    padding: 0.5rem 0;
  }
}

.comparison-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.comparison-label {
  font-weight: var(--font-weight-semibold);
  font-size: 1.125rem;
  color: hsl(var(--color-foreground));
  margin-bottom: 0.5rem;
}

.ws-pricing .comparison-label {
  color: hsl(var(--color-primary));
}

.competitor-pricing .comparison-label {
  color: hsl(var(--color-the-builder));
}

.breakdown-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  background: hsl(var(--color-muted) / 0.2);
  border-radius: var(--radius-md);
}

.breakdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: hsl(var(--color-muted-foreground));
}

.breakdown-item.overage-line {
  border-top: 1px dashed hsl(var(--color-border));
  padding-top: 0.5rem;
  margin-top: 0.25rem;
}

.breakdown-label {
  flex: 1;
}

.breakdown-value {
  font-weight: var(--font-weight-semibold);
  color: hsl(var(--color-foreground));
  white-space: nowrap;
}

.total-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 2px solid hsl(var(--color-border));
  font-size: 1.125rem;
}

.total-label {
  font-weight: var(--font-weight-semibold);
  color: hsl(var(--color-foreground));
}

.total-value {
  font-size: 1.5rem;
  font-weight: var(--font-weight-bold);
  color: hsl(var(--color-primary));
}

.competitor-total {
  color: hsl(var(--color-the-builder));
}

.vs-divider {
  font-size: 1.5rem;
  font-weight: var(--font-weight-bold);
  color: hsl(var(--color-muted-foreground));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
}

.savings-result {
  margin-top: 1rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, hsl(var(--color-primary) / 0.1) 0%, hsl(var(--color-the-closer) / 0.1) 100%);
  border-radius: var(--radius-lg);
  border: 2px solid hsl(var(--color-primary) / 0.3);
  text-align: center;
}

.savings-amount {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.savings-label {
  font-size: 0.875rem;
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: hsl(var(--color-muted-foreground));
}

.savings-value {
  font-size: 2rem;
  font-weight: var(--font-weight-bold);
  color: hsl(var(--color-the-closer));
  font-family: var(--font-display);
}

.savings-percentage {
  font-size: 1.125rem;
  font-weight: var(--font-weight-semibold);
  color: hsl(var(--color-primary));
}

.savings-annual {
  font-size: 1rem;
  color: hsl(var(--color-muted-foreground));
}

.savings-annual strong {
  color: hsl(var(--color-foreground));
  font-weight: var(--font-weight-bold);
}

.overage-rates-reference {
  padding-top: 1rem;
  margin-top: 1rem;
}

.overage-rates-reference .rate-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.rate-tier {
  font-weight: var(--font-weight-semibold);
  color: hsl(var(--color-foreground));
}

.rate-price {
  font-size: 1rem;
  font-weight: var(--font-weight-bold);
  color: hsl(var(--color-primary));
}

.rate-unit {
  color: hsl(var(--color-muted-foreground));
  font-size: 0.75rem;
}

/* Stack overage rates vertically on mobile */
@media (max-width: 767px) {
  .overage-rates-reference .flex {
    flex-direction: column;
    gap: 0.75rem;
  }
}

.overage-calculator {
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* ===== FAQ SECTION ===== */
.pricing-faq-section {
  position: relative;
  z-index: 1;
  background-color: hsl(var(--color-background));
}

/* ===== COMPARISON MATRIX WITH PARALLAX ===== */
.comparison-matrix-section {
  position: relative;
  min-height: 600px;
  overflow: hidden;
}

.comparison-matrix-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('/the_compare_matrix_background.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  z-index: -1;
}

.comparison-matrix-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(15, 23, 42, 0.85) 0%,
    rgba(15, 23, 42, 0.9) 50%,
    rgba(15, 23, 42, 0.85) 100%
  );
}

.comparison-table {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.comparison-table thead {
  background: rgba(255, 255, 255, 0.08);
}

.comparison-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.comparison-table .category-header td {
  background: rgba(255, 255, 255, 0.08);
  font-weight: var(--font-weight-bold);
  font-size: 1.125rem;
  padding: 1rem 1.5rem;
}

.text-green-400 {
  color: rgb(74, 222, 128);
}

.text-red-400 {
  color: rgb(248, 113, 113);
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 768px) {
  .pricing-controls {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  .team-size-label {
    font-size: 1.25rem;
  }

  .team-size-markers {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .team-size-marker {
    flex: 0 1 45%;
  }

  .marker-label {
    font-size: 0.875rem;
  }

  .marker-range {
    font-size: 0.75rem;
  }

  .pricing-card.most-popular {
    transform: none;
  }

  .overage-content {
    grid-template-columns: 1fr;
  }

  .comparison-matrix-bg {
    background-attachment: scroll;
  }

  .comparison-table {
    font-size: 0.75rem;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 0.5rem 0.25rem;
  }

  .comparison-table thead th {
    font-size: 0.7rem;
    padding: 0.5rem 0.15rem;
  }

  .comparison-table .category-header td {
    font-size: 0.875rem;
    padding: 0.75rem 0.5rem;
  }

  .comparison-table tbody td:first-child {
    font-size: 0.7rem;
    max-width: 120px;
  }

  .comparison-table svg {
    width: 14px;
    height: 14px;
  }

  .comparison-matrix-section .container {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .comparison-matrix-section .max-w-6xl {
    padding-left: 0;
    padding-right: 0;
  }
}

.pricing-hero.hero-half {
  min-height: 50vh;
}

@media (max-width: 1024px) {
  .pricing-hero {
    min-height: 80vh;
  }

  .pricing-hero.hero-half {
    min-height: 50vh;
  }

  .team-size-label {
    font-size: 2rem;
  }
}
