/* Rate Calculator Styles */

.rate-calculator-section {
  padding: 4rem 0;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.calculator-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

@media (max-width: 768px) {
  .calculator-container {
    padding: 0 1rem;
  }
}

.calculator-header {
  text-align: center;
  margin-bottom: 3rem;
}

.calculator-header h2 {
  font-size: 2.5rem;
  color: #1e293b;
  margin-bottom: 1rem;
}

.calculator-header p {
  font-size: 1.25rem;
  color: #64748b;
  max-width: 600px;
  margin: 0 auto;
}

.calculator-form {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group select {
  padding: 0.75rem;
  border: 2px solid #e2e8f0;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #007bff;
}

.form-group .help-text {
  font-size: 0.875rem;
  color: #64748b;
  margin-top: 0.25rem;
}

.calculator-button {
  width: 100%;
  padding: 1rem;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1.125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.calculator-button:hover {
  background: #0056b3;
}

.calculator-button:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

#calculatorResult {
  display: none;
  margin-top: 2rem;
}

.calculator-loading {
  text-align: center;
  padding: 3rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e2e8f0;
  border-top-color: #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.calculator-results {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  animation: fadeIn 0.5s ease-in;
}

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

.calculator-results h3 {
  text-align: center;
  font-size: 1.75rem;
  color: #1e293b;
  margin-bottom: 1.5rem;
}

.savings-highlight {
  text-align: center;
  padding: 2rem;
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: white;
  border-radius: 12px;
  margin-bottom: 2rem;
}

.savings-amount {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.savings-label {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: 0.5rem;
}

.savings-percentage {
  font-size: 1.5rem;
  font-weight: 600;
  opacity: 0.95;
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.comparison-card {
  padding: 1.5rem;
  border-radius: 8px;
  border: 2px solid #e2e8f0;
}

.comparison-card.current {
  background: #fef2f2;
  border-color: #fca5a5;
}

.comparison-card.processking {
  background: #f0fdf4;
  border-color: #86efac;
}

.comparison-card h4 {
  font-size: 1.25rem;
  color: #1e293b;
  margin-bottom: 1rem;
}

.cost-item {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid #e2e8f0;
}

.cost-item.total {
  border-bottom: none;
  border-top: 2px solid #e2e8f0;
  margin-top: 0.5rem;
  padding-top: 1rem;
  font-weight: 600;
  font-size: 1.125rem;
}

.calculator-cta {
  text-align: center;
  padding: 2rem;
  background: #f8fafc;
  border-radius: 8px;
  margin-top: 2rem;
}

.calculator-cta p {
  font-size: 1.25rem;
  color: #1e293b;
  margin-bottom: 1rem;
}

.calculator-error {
  background: #fef2f2;
  border: 2px solid #fca5a5;
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  color: #991b1b;
}

@media (max-width: 768px) {
  .rate-calculator-section {
    padding: 3rem 0;
  }
  
  .calculator-container {
    padding: 0 1rem;
  }
  
  .calculator-header {
    margin-bottom: 2rem;
  }
  
  .calculator-header h2 {
    font-size: 2rem;
  }
  
  .calculator-header p {
    font-size: 1.125rem;
  }
  
  .calculator-form {
    padding: 1.5rem;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  
  .form-group input,
  .form-group select {
    padding: 16px;
    font-size: 16px; /* Prevent zoom on iOS */
    min-height: 48px;
  }
  
  .calculator-button {
    padding: 18px;
    font-size: 1.0625rem;
    min-height: 52px;
  }
  
  .comparison-grid {
    grid-template-columns: 1fr;
  }
  
  .savings-amount {
    font-size: 2rem;
  }
  
  .calculator-results {
    padding: 1.5rem;
  }
  
  .calculator-results h3 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .calculator-header h2 {
    font-size: 1.75rem;
  }
  
  .calculator-header p {
    font-size: 1rem;
  }
  
  .calculator-form {
    padding: 1.25rem;
  }
  
  .savings-amount {
    font-size: 1.75rem;
  }
  
  .savings-label {
    font-size: 1.125rem;
  }
}

