/* =============================================
   PRICING CALCULATOR STYLES
   Version: 2.0.0 - Visual Enhancement Update
   ============================================= */

/* Calculator Container */
.pricing-calculator {
  background: var(--color-deep-forest);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  padding: var(--spacing-md) 0;
}

.pricing-calculator.calculator-visible {
  opacity: 1;
  transform: translateY(0);
}

.calculator-wrapper {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: var(--spacing-lg);
  align-items: start;
}

/* Left Column - Configuration */
.calculator-config {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

/* Config Section Cards - Enhanced */
.config-section {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: var(--spacing-sm) var(--spacing-md);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.config-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-moss-green), var(--color-river-clay));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.config-section:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.04) 100%);
  border-color: rgba(112, 141, 87, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.config-section:hover::before {
  opacity: 1;
}

/* Section Titles - Enhanced */
.config-section-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--color-sand-white);
  margin-bottom: var(--spacing-sm);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.config-section-title svg {
  color: var(--color-moss-green);
  opacity: 1;
  filter: drop-shadow(0 2px 4px rgba(112, 141, 87, 0.3));
}

/* Sliders - Enhanced */
.slider-group {
  margin-bottom: var(--spacing-xs);
}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.slider-label {
  color: rgba(247, 244, 238, 0.9);
  font-size: 0.9375rem;
  font-weight: 500;
}

.slider-value {
  background: linear-gradient(135deg, var(--color-moss-green), var(--color-river-clay));
  color: white;
  padding: 0.375rem 1rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 1rem;
  min-width: 3.5rem;
  text-align: center;
  box-shadow: 0 4px 12px rgba(112, 141, 87, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.slider-value.updating {
  transform: scale(1.15);
  box-shadow: 0 6px 20px rgba(112, 141, 87, 0.5);
}

/* Custom Range Slider - Enhanced */
.calc-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: linear-gradient(90deg, rgba(112, 141, 87, 0.3) 0%, rgba(79, 109, 122, 0.3) 100%);
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.calc-slider:hover {
  background: linear-gradient(90deg, rgba(112, 141, 87, 0.5) 0%, rgba(79, 109, 122, 0.5) 100%);
  box-shadow: 0 0 12px rgba(112, 141, 87, 0.2);
}

.calc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  background: linear-gradient(135deg, var(--color-moss-green), #5a7a47);
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 0 0 4px rgba(112, 141, 87, 0.2);
  border: 3px solid rgba(255, 255, 255, 0.9);
}

.calc-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 6px 20px rgba(112, 141, 87, 0.5), 0 0 0 6px rgba(112, 141, 87, 0.3);
}

.calc-slider::-moz-range-thumb {
  width: 26px;
  height: 26px;
  background: linear-gradient(135deg, var(--color-moss-green), #5a7a47);
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 0 0 4px rgba(112, 141, 87, 0.2);
}

.calc-slider::-moz-range-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 6px 20px rgba(112, 141, 87, 0.5), 0 0 0 6px rgba(112, 141, 87, 0.3);
}

/* Toggle Switches - Enhanced */
.toggle-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.toggle-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.toggle-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateX(4px);
}

.toggle-item:has(input:checked) {
  background: rgba(112, 141, 87, 0.1);
  border-color: rgba(112, 141, 87, 0.3);
}

.toggle-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.toggle-label {
  color: var(--color-sand-white);
  font-size: 1rem;
  font-weight: 600;
}

.toggle-price {
  color: var(--color-moss-green);
  font-size: 0.875rem;
  font-weight: 500;
}

/* Custom Toggle Switch - Enhanced */
.toggle-switch {
  position: relative;
  width: 56px;
  height: 30px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 30px;
  transition: all 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 22px;
  width: 22px;
  left: 2px;
  bottom: 2px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.toggle-switch input:checked + .toggle-slider {
  background: linear-gradient(135deg, var(--color-moss-green), #5a7a47);
  border-color: var(--color-moss-green);
  box-shadow: 0 0 20px rgba(112, 141, 87, 0.4);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(26px);
}

.toggle-switch input:focus + .toggle-slider {
  box-shadow: 0 0 0 4px rgba(112, 141, 87, 0.3);
}

/* Hosting Tier Selection - Enhanced */
.hosting-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hosting-option {
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hosting-option:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateX(4px);
}

.hosting-option.selected {
  background: linear-gradient(135deg, rgba(112, 141, 87, 0.15) 0%, rgba(112, 141, 87, 0.05) 100%);
  border-color: var(--color-moss-green);
  box-shadow: 0 0 30px rgba(112, 141, 87, 0.2), inset 0 0 20px rgba(112, 141, 87, 0.05);
}

.hosting-option input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.hosting-option-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hosting-option-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.hosting-radio {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  background: rgba(0, 0, 0, 0.2);
}

.hosting-option.selected .hosting-radio {
  border-color: var(--color-moss-green);
  background: rgba(112, 141, 87, 0.2);
  box-shadow: 0 0 12px rgba(112, 141, 87, 0.4);
}

.hosting-radio::after {
  content: '';
  width: 12px;
  height: 12px;
  background: var(--color-moss-green);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.hosting-option.selected .hosting-radio::after {
  opacity: 1;
  transform: scale(1);
}

.hosting-details h4 {
  color: var(--color-sand-white);
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.375rem;
}

.hosting-details span {
  color: rgba(247, 244, 238, 0.6);
  font-size: 0.875rem;
}

.hosting-price {
  text-align: right;
}

.hosting-price .amount {
  color: var(--color-sand-white);
  font-size: 1.5rem;
  font-weight: 800;
  display: block;
}

.hosting-option.selected .hosting-price .amount {
  color: var(--color-moss-green);
}

.hosting-price .period {
  color: rgba(247, 244, 238, 0.5);
  font-size: 0.875rem;
}

.hosting-popular-badge {
  position: absolute;
  top: -12px;
  right: 1.25rem;
  background: linear-gradient(135deg, var(--color-moss-green), #5a7a47);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 12px rgba(112, 141, 87, 0.4);
}

/* =============================================
   RIGHT COLUMN - SUMMARY PANEL
   ============================================= */

.calculator-summary {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
  position: sticky;
  top: calc(var(--header-height, 80px) + var(--spacing-sm));
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  transition: all 0.4s ease;
}

.calculator-summary:hover {
  border-color: rgba(112, 141, 87, 0.3);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.25), 0 0 40px rgba(112, 141, 87, 0.1);
}

/* Summary Header - Enhanced */
.summary-header {
  text-align: center;
  margin-bottom: var(--spacing-sm);
  padding-bottom: var(--spacing-sm);
  border-bottom: 2px solid rgba(112, 141, 87, 0.3);
  position: relative;
}

.summary-header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: var(--color-moss-green);
}

.summary-header h3 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  color: var(--color-sand-white);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.summary-header p {
  color: rgba(247, 244, 238, 0.6);
  font-size: 0.9375rem;
}

/* Price Display - Enhanced */
.price-display {
  margin-bottom: var(--spacing-sm);
  background: rgba(0, 0, 0, 0.15);
  border-radius: var(--radius-md);
  padding: var(--spacing-xs);
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem var(--spacing-xs);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.price-row:last-child {
  border-bottom: none;
}

.price-row.primary {
  padding: 1.25rem var(--spacing-xs);
  background: rgba(112, 141, 87, 0.1);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
}

.price-label {
  color: rgba(247, 244, 238, 0.8);
  font-size: 1rem;
}

.price-label.primary {
  color: var(--color-sand-white);
  font-weight: 600;
  font-size: 1.0625rem;
}

.price-amount {
  font-weight: 700;
  color: var(--color-sand-white);
  font-size: 1.25rem;
  transition: all 0.3s ease;
}

.price-amount.highlight {
  color: var(--color-moss-green);
  font-size: 2rem;
  font-weight: 800;
  text-shadow: 0 2px 12px rgba(112, 141, 87, 0.3);
}

.price-amount.savings {
  color: var(--color-moss-green);
}

/* Savings Callout - Enhanced */
.savings-callout {
  background: linear-gradient(135deg, rgba(112, 141, 87, 0.2) 0%, rgba(112, 141, 87, 0.1) 100%);
  border: 2px solid rgba(112, 141, 87, 0.4);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: var(--spacing-sm);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.savings-callout::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(112, 141, 87, 0.1) 0%, transparent 60%);
  animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { transform: scale(0.8); opacity: 0.5; }
  50% { transform: scale(1.2); opacity: 0.8; }
}

.savings-callout p {
  color: rgba(247, 244, 238, 0.9);
  font-size: 0.9375rem;
  margin-bottom: 0.375rem;
  position: relative;
}

.savings-callout .savings-amount {
  color: var(--color-moss-green);
  font-size: 2rem;
  font-weight: 800;
  position: relative;
  text-shadow: 0 2px 12px rgba(112, 141, 87, 0.4);
}

.savings-callout .savings-note {
  color: rgba(247, 244, 238, 0.6);
  font-size: 0.8125rem;
  margin-top: 0.375rem;
  position: relative;
}

/* Feature Summary - Enhanced */
.feature-summary {
  margin-bottom: var(--spacing-sm);
  padding: var(--spacing-xs) 0;
}

.feature-summary h4 {
  color: var(--color-moss-green);
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.feature-summary h4::before {
  content: '';
  width: 20px;
  height: 2px;
  background: var(--color-moss-green);
}

.feature-summary ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.feature-summary ul::-webkit-scrollbar {
  width: 4px;
}

.feature-summary ul::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
}

.feature-summary ul::-webkit-scrollbar-thumb {
  background: var(--color-moss-green);
  border-radius: 2px;
}

.feature-summary li {
  color: rgba(247, 244, 238, 0.85);
  font-size: 0.9375rem;
  padding-left: 1.5rem;
  position: relative;
  transition: all 0.2s ease;
}

.feature-summary li:hover {
  color: var(--color-sand-white);
  transform: translateX(4px);
}

.feature-summary li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--color-moss-green);
  font-weight: 700;
  font-size: 0.875rem;
}

/* CTA Button - Enhanced */
.calculator-cta {
  text-align: center;
}

.calculator-cta .btn {
  width: 100%;
  padding: 1.125rem 2rem;
  font-size: 1.125rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--color-moss-green) 0%, #5a7a47 100%);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(112, 141, 87, 0.3);
  position: relative;
  overflow: hidden;
}

.calculator-cta .btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.calculator-cta .btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(112, 141, 87, 0.5);
}

.calculator-cta .btn:hover::before {
  left: 100%;
}

.calculator-cta .btn:active {
  transform: translateY(-1px);
}

.calculator-cta .cta-note {
  color: rgba(247, 244, 238, 0.6);
  font-size: 0.875rem;
  margin-top: 1rem;
}

/* =============================================
   VISUAL CONNECTION ELEMENTS
   ============================================= */

/* Connecting line between columns */
.calculator-wrapper::before {
  content: '';
  position: absolute;
  top: 50%;
  left: calc(100% - 420px - var(--spacing-lg) / 2);
  width: 1px;
  height: 60%;
  background: linear-gradient(180deg, transparent 0%, rgba(112, 141, 87, 0.3) 20%, rgba(112, 141, 87, 0.3) 80%, transparent 100%);
  transform: translateY(-50%);
  pointer-events: none;
}

/* Make wrapper position relative for the connector */
.calculator-wrapper {
  position: relative;
}

/* =============================================
   RESPONSIVE DESIGN
   ============================================= */

@media (max-width: 1024px) {
  .calculator-wrapper {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

  .calculator-wrapper::before {
    display: none;
  }

  .calculator-summary {
    position: static;
    order: -1;
  }

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

@media (max-width: 640px) {
  .pricing-calculator {
    padding: var(--spacing-sm) 0;
  }

  .config-section {
    padding: var(--spacing-sm);
  }

  .config-section-title {
    font-size: 1.125rem;
  }

  .hosting-option {
    padding: 1rem;
  }

  .hosting-option-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .hosting-price {
    text-align: left;
    margin-left: 2.5rem;
  }

  .calculator-summary {
    padding: var(--spacing-sm);
  }

  .summary-header h3 {
    font-size: 1.5rem;
  }

  .price-amount.highlight {
    font-size: 1.5rem;
  }

  .savings-callout .savings-amount {
    font-size: 1.5rem;
  }
}

/* =============================================
   REDUCED MOTION
   ============================================= */

@media (prefers-reduced-motion: reduce) {
  .pricing-calculator,
  .config-section,
  .calc-slider::-webkit-slider-thumb,
  .toggle-slider,
  .toggle-slider::before,
  .hosting-option,
  .calculator-cta .btn,
  .calculator-cta .btn::before,
  .savings-callout::before {
    transition: none;
    animation: none;
  }
}
