/* Purchase Costs Calculator Styles */

/* Hero */
.costs-hero {
  background: linear-gradient(135deg, #1E3A5F 0%, #D97706 60%, #1E88E5 100%);
  color: white;
  padding: 80px 0 60px;
  text-align: center;
}

.costs-hero h1 {
  font-size: 2.6rem;
  font-weight: 900;
  margin-bottom: 20px;
  line-height: 1.2;
}

.costs-hero .lead {
  font-size: 1.15rem;
  opacity: 0.92;
  margin-bottom: 32px;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.costs-hero-badges {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 0;
}

.costs-hero-badge {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 24px;
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Calculator Section */
.costs-calculator-section {
  padding: 48px 0;
  background: #f8faff;
}

/* Calculator Card */
.costs-card {
  background: white;
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.costs-card-header {
  text-align: center;
  margin-bottom: 2rem;
}

.costs-card-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.25rem;
}

.costs-card-subtitle {
  color: #6b7280;
  font-size: 0.9rem;
}

/* Form Groups */
.costs-form-group {
  margin-bottom: 1.75rem;
}

.costs-form-label {
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
  display: block;
  font-size: 0.95rem;
}

.costs-form-input {
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: white;
  width: 100%;
  font-family: 'Inter', sans-serif;
}

.costs-form-input:focus {
  outline: none;
  border-color: #D97706;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.1);
  transform: translateY(-1px);
}

.costs-form-hint {
  font-size: 0.82rem;
  color: #9ca3af;
  margin-top: 4px;
}

/* First Home Checkbox */
.costs-first-home-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.95rem;
  color: #374151;
  line-height: 1.4;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fefce8;
  transition: border-color 0.2s, background 0.2s;
}

.costs-first-home-label:hover {
  border-color: #D97706;
  background: #fef9c3;
}

.costs-checkbox {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 2px solid #d1d5db;
  border-radius: 5px;
  background: white;
  cursor: pointer;
  margin-top: 2px;
  transition: all 0.2s;
  position: relative;
}

.costs-checkbox:checked {
  background: #D97706;
  border-color: #D97706;
}

.costs-checkbox:checked::after {
  content: '✓';
  color: white;
  font-size: 14px;
  font-weight: 700;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.costs-checkbox:focus-visible {
  outline: 2px solid #D97706;
  outline-offset: 2px;
}

.costs-value-display {
  font-size: 0.95rem;
  font-weight: 700;
  color: #D97706;
  text-align: right;
  min-width: 120px;
}

.costs-slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.costs-slider-row input[type="range"] {
  flex: 1;
}

/* Custom Range Slider */
input[type="range"].costs-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #e5e7eb;
  outline: none;
  margin: 8px 0;
}

input[type="range"].costs-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #D97706, #1E88E5);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.4);
  transition: transform 0.15s ease;
}

input[type="range"].costs-range::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

input[type="range"].costs-range::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #D97706, #1E88E5);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.4);
}

/* Market Type Toggle */
.costs-market-toggle {
  display: flex;
  gap: 0;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  background: #f9fafb;
}

.costs-market-btn {
  flex: 1;
  padding: 14px 16px;
  border: none;
  background: transparent;
  font-weight: 600;
  font-size: 0.95rem;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: 'Inter', sans-serif;
  text-align: center;
}

.costs-market-btn:first-child {
  border-right: 1px solid #e5e7eb;
}

.costs-market-btn.active {
  background: linear-gradient(135deg, #D97706, #f59e0b);
  color: white;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.1);
}

.costs-market-btn:hover:not(.active) {
  background: #f0f4f8;
  color: #374151;
}

/* Conditional field visibility */
.costs-hidden {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  margin: 0 !important;
  padding: 0 !important;
  transition: max-height 0.35s ease, opacity 0.25s ease, margin 0.3s ease;
}

.costs-form-group:not(.costs-hidden) {
  max-height: 200px;
  opacity: 1;
  transition: max-height 0.35s ease, opacity 0.25s ease;
}

/* PCC info badge */
.costs-pcc-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  margin-top: 8px;
}

.costs-pcc-badge.costs-pcc-exempt {
  background: #ecfdf5;
  color: #059669;
  border-color: #a7f3d0;
}

/* Section Divider */
.costs-section-label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  margin-bottom: 16px;
  margin-top: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e7eb;
}

/* Primary Button */
.btn-costs-primary {
  background: linear-gradient(135deg, #D97706, #1E88E5);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 16px 32px;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
}

.btn-costs-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(217, 119, 6, 0.3);
}

/* Disclaimer */
.costs-disclaimer {
  background: #fff8e1;
  border: 1px solid #ffd54f;
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 0.82rem;
  color: #5d4037;
  margin-top: 24px;
  line-height: 1.6;
}

/* Result Card */
.costs-result-card {
  background: white;
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  border: 2px solid #e5e7eb;
  margin-top: 24px;
}

/* Result Big Number */
.costs-result-big {
  font-size: 3.2rem;
  font-weight: 900;
  background: linear-gradient(135deg, #D97706, #1E88E5);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}

.costs-result-subtitle {
  font-size: 0.9rem;
  color: #6b7280;
  margin-bottom: 20px;
}

/* Result Stats */
.costs-result-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #f1f5f9;
}

.costs-result-stat-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: #1E3A5F;
}

.costs-result-stat-label {
  font-size: 0.76rem;
  color: #94a3b8;
  margin-top: 2px;
}

/* Low down payment warning */
.costs-low-dp-warning {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  margin-top: 16px;
  font-size: 0.88rem;
  color: #92400e;
}

.costs-low-dp-warning i {
  flex-shrink: 0;
}

/* Breakdown Table */
.costs-breakdown-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.92rem;
}

.costs-breakdown-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: #374151;
}

.costs-breakdown-table td:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
}

.costs-td-value {
  text-align: right;
  font-weight: 600;
  white-space: nowrap;
}

.costs-total-row td {
  border-top: 2px solid #1E3A5F;
  border-bottom: none;
  padding-top: 14px;
  font-size: 1rem;
}

.costs-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* Cost Distribution Bar */
.costs-bar-track {
  display: flex;
  height: 24px;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 16px;
}

.costs-bar-segment {
  transition: width 0.5s ease;
  min-width: 2px;
}

.costs-bar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
  justify-content: center;
}

.costs-bar-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 600;
}

/* Save & Compare */
.costs-save-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

.btn-costs-secondary {
  padding: 10px 20px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  background: white;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  font-family: 'Inter', sans-serif;
}

.btn-costs-secondary:hover {
  border-color: #D97706;
  color: #D97706;
}

/* Saved results grid */
.costs-compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.costs-compare-card {
  background: #f8faff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  position: relative;
}

.costs-compare-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 2px;
  font-size: 1rem;
  line-height: 1;
}

.costs-compare-remove:hover {
  color: #dc2626;
}

.costs-compare-big {
  font-size: 1.6rem;
  font-weight: 900;
  color: #D97706;
  margin-bottom: 2px;
}

.costs-compare-sub {
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: 600;
  margin-bottom: 8px;
}

.costs-compare-detail {
  font-size: 0.82rem;
  color: #64748b;
  margin-bottom: 2px;
}

/* Educational Section */
.costs-edu-section {
  padding: 64px 0;
  background: white;
}

.costs-edu-section h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: #1E3A5F;
  margin-bottom: 16px;
}

.costs-edu-section p {
  color: #555;
  font-size: 0.98rem;
  line-height: 1.8;
  margin-bottom: 16px;
}

.costs-edu-definition {
  background: linear-gradient(135deg, #fffbeb 0%, #f0f7ff 100%);
  border-left: 4px solid #D97706;
  border-radius: 0 12px 12px 0;
  padding: 20px 24px;
  margin: 20px 0 32px;
  font-size: 1.02rem;
  line-height: 1.8;
  color: #1E3A5F;
}

/* Comparison table */
.costs-compare-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 32px;
  font-size: 0.92rem;
}

.costs-compare-table thead th {
  background: #1E3A5F;
  color: white;
  padding: 12px 16px;
  font-weight: 700;
  text-align: left;
}

.costs-compare-table thead th:first-child {
  border-radius: 8px 0 0 0;
}

.costs-compare-table thead th:last-child {
  border-radius: 0 8px 0 0;
}

.costs-compare-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
  color: #374151;
}

.costs-compare-table tbody tr:nth-child(even) {
  background: #f8faff;
}

.costs-cell-yes {
  color: #059669;
  font-weight: 600;
}

.costs-cell-no {
  color: #dc2626;
  font-weight: 600;
}

/* Checklist */
.costs-checklist {
  list-style: none;
  padding: 0;
  margin: 16px 0 32px;
}

.costs-checklist li {
  padding: 8px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: #374151;
}

.costs-check-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 800;
}

.costs-check-icon.yes {
  background: #ecfdf5;
  color: #059669;
}

.costs-check-icon.no {
  background: #fef2f2;
  color: #dc2626;
}

/* Steps */
.costs-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 24px 0 0;
}

.costs-step-card {
  background: #f8faff;
  border-radius: 16px;
  padding: 24px;
  text-align: center;
}

.costs-step-num {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #D97706, #1E88E5);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  margin: 0 auto 12px;
}

.costs-step-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #1E3A5F;
  margin-bottom: 8px;
}

.costs-step-card p {
  color: #64748b;
  font-size: 0.88rem;
  margin: 0;
}

/* FAQ Section */
.costs-faq-section {
  background: #f8faff;
  padding: 64px 0;
}

.costs-faq-section h2 {
  font-size: 2rem;
  font-weight: 800;
  color: #1E3A5F;
  text-align: center;
  margin-bottom: 12px;
}

.costs-faq-lead {
  text-align: center;
  color: #64748b;
  font-size: 1.05rem;
  margin-bottom: 40px;
}

.costs-faq-item {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  background: white;
}

.costs-faq-question {
  padding: 18px 24px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #1E3A5F;
  font-size: 0.95rem;
  transition: background 0.15s;
}

.costs-faq-question:hover {
  background: #fffbeb;
}

.costs-faq-answer {
  padding: 0 24px 0;
  color: #555;
  font-size: 0.93rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  line-height: 1.7;
}

.costs-faq-answer.open {
  max-height: 1000px;
  padding: 0 24px 18px;
}

.costs-faq-chevron {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.costs-faq-question.active .costs-faq-chevron {
  transform: rotate(180deg);
}

/* CTA Section */
.costs-final-cta {
  background: linear-gradient(135deg, #1E3A5F 0%, #D97706 60%, #1E88E5 100%);
  color: white;
  padding: 64px 0;
  text-align: center;
}

.costs-final-cta h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.costs-final-cta p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 28px;
}

.costs-cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-costs-cta-white {
  background: white;
  color: #D97706;
  border: none;
  border-radius: 10px;
  padding: 16px 28px;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-costs-cta-white:hover {
  background: #fffbeb;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  color: #D97706;
}

.btn-costs-cta-outline {
  background: transparent;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 10px;
  padding: 14px 28px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-costs-cta-outline:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: white;
  color: white;
  transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 991px) {
  .costs-card {
    padding: 1.5rem;
  }

  .costs-result-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .costs-hero h1 {
    font-size: 1.9rem;
  }

  .costs-hero .lead {
    font-size: 1rem;
  }

  .costs-result-big {
    font-size: 2.2rem;
  }

  .costs-result-stats {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .costs-steps {
    grid-template-columns: 1fr;
  }

  .costs-compare-grid {
    grid-template-columns: 1fr;
  }

  .costs-cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .costs-market-toggle {
    flex-direction: column;
  }

  .costs-market-btn:first-child {
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
  }
}

@media (max-width: 480px) {
  .costs-hero h1 {
    font-size: 1.6rem;
  }
}

/* Toast notification */
.costs-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.costs-toast-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.costs-toast-content {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #1e293b;
  color: #fff;
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 0.95rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  max-width: 440px;
}
