/* ==========================================================================
   HYPOTHEEK NEDERLAND CALCULATOR - STYLE SHEET
   100% Pure Vanilla CSS - Geen frameworks of externe dependencies.
   Geschikt voor directe deployment op iedere standaard webserver.
   ========================================================================== */

:root {
  --primary: #0e2942;
  --primary-light: #1e3a8a;
  --primary-dark: #081726;
  --accent: #0284c7;
  --accent-hover: #0369a1;
  --accent-light: #e0f2fe;
  --accent-soft: #f0f9ff;
  --success: #059669;
  --success-light: #ecfdf5;
  --warning: #d97706;
  --warning-light: #fffbeb;
  --danger: #dc2626;
  --danger-light: #fef2f2;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-light: #64748b;
  --border: #e2e8f0;
  --border-focus: #0284c7;
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-main);
  background-color: var(--bg-page);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   PRINT HEADER (ALLEEN BIJ AFDRUKKEN / PDF)
   ========================================================================== */
.print-header {
  display: none;
}

/* ==========================================================================
   HEADER & NAVIGATIE
   ========================================================================== */
.site-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #ffffff;
  border-bottom: 3px solid var(--accent);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.header-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.brand-badge {
  background-color: var(--accent);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.brand-titles {
  display: flex;
  flex-direction: column;
}

.brand-main-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.brand-sub-title {
  font-size: 0.75rem;
  color: #94a3b8;
  line-height: 1.2;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  color: #e2e8f0;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav-link:hover {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.btn-header-cta {
  background-color: var(--accent);
  color: #ffffff;
  border: none;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}

.btn-header-cta:hover {
  background-color: var(--accent-hover);
}

@media (max-width: 860px) {
  .header-nav {
    display: none;
  }
}

/* ==========================================================================
   HERO STRIP & VOORBEELD PRESETS
   ========================================================================== */
.hero-strip {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 2.25rem 1.5rem 2rem;
}

.hero-content {
  max-width: 1360px;
  margin: 0 auto;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.hero-tag {
  color: var(--accent-hover);
  font-weight: 600;
}

.hero-divider {
  color: #cbd5e1;
}

.hero-content h1 {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--primary-dark);
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  text-wrap: balance;
}

.hero-lead {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 900px;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.preset-strip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.preset-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.preset-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.preset-btn {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.preset-btn:hover {
  background-color: #e2e8f0;
  border-color: #cbd5e1;
}

.preset-btn.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

/* ==========================================================================
   HOOFDCONTAINER & GRID LAYOUT
   ========================================================================== */
.main-container {
  flex: 1;
  padding: 2rem 1.5rem 3rem;
  background-color: var(--bg-page);
}

.calc-wrapper {
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.calc-top-bar {
  background-color: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.calc-top-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--success);
  display: inline-block;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.2);
}

.calc-top-tools {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-action-tool {
  background-color: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-action-tool:hover {
  background-color: var(--bg-subtle);
  color: var(--text-main);
  border-color: #cbd5e1;
}

/* Twee kolommen grid */
.calc-layout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .calc-layout-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   KAARTEN (CARDS)
   ========================================================================== */
.calc-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.card-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.card-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-dark);
  letter-spacing: -0.01em;
  margin-bottom: 0.25rem;
}

.card-header p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ==========================================================================
   FORMULIER ELEMENTEN & CONTROLS
   ========================================================================== */
.calc-form {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

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

.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 580px) {
  .form-row-2col {
    grid-template-columns: 1fr;
  }
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.field-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.field-display-value {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--accent-hover);
  font-variant-numeric: tabular-nums;
}

.tooltip-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--bg-subtle);
  color: var(--text-light);
  font-size: 0.7rem;
  cursor: help;
  user-select: none;
}

/* Segmented Control */
.segmented-control {
  display: flex;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 2px;
}

.segmented-item {
  flex: 1;
  position: relative;
  text-align: center;
  cursor: pointer;
}

.segmented-item input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.segmented-item span {
  display: block;
  padding: 0.5rem 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 4px;
  transition: all 0.15s ease;
  user-select: none;
  white-space: nowrap;
}

.segmented-item input:checked + span {
  background-color: #ffffff;
  color: var(--primary-dark);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.segmented-stacked {
  flex-direction: column;
}

.segmented-stacked .segmented-item span {
  text-align: left;
  padding: 0.65rem 0.85rem;
}

/* Input Met Addon */
.input-addon-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-addon-left {
  position: absolute;
  left: 0.85rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-light);
  pointer-events: none;
}

.input-addon-right {
  position: absolute;
  right: 0.85rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-light);
  pointer-events: none;
}

.input-field {
  width: 100%;
  padding: 0.6rem 0.85rem;
  font-size: 0.95rem;
  font-family: var(--font-sans);
  color: var(--text-main);
  background-color: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  font-variant-numeric: tabular-nums;
}

.input-field:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.input-has-addon {
  padding-left: 2rem;
}

.input-has-addon-right {
  padding-right: 2rem;
}

.select-wrap {
  position: relative;
}

.select-field {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23475569%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 0.65rem auto;
  padding-right: 2rem;
}

/* Range Slider */
.range-slider {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: #e2e8f0;
  border-radius: 3px;
  outline: none;
  margin: 0.5rem 0 0.25rem;
  cursor: pointer;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  cursor: pointer;
  transition: transform 0.1s ease, background-color 0.15s ease;
}

.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  background: var(--accent);
}

.range-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  cursor: pointer;
}

.slider-markers {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-light);
  font-variant-numeric: tabular-nums;
}

.form-hint-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.badge-subtle {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  background-color: var(--bg-subtle);
  border: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Feature Toggles Box */
.feature-toggles-box {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.toggle-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}

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

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: 0.2s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.2s;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--success);
}

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

.toggle-text {
  display: flex;
  flex-direction: column;
}

.toggle-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.toggle-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* ==========================================================================
   AANKOOPKOSTEN & HYPOTHEEKKOSTEN (ACCORDION)
   ========================================================================== */
.costs-accordion-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: #ffffff;
}

.btn-toggle-costs {
  width: 100%;
  background: #ffffff;
  border: none;
  padding: 0.9rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
  text-align: left;
}

.btn-toggle-costs:hover {
  background-color: var(--bg-subtle);
}

.costs-toggle-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.costs-summary-badge {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--accent-hover);
  background-color: var(--accent-soft);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent-light);
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

.costs-toggle-arrow {
  font-size: 0.75rem;
  color: var(--text-light);
  transition: transform 0.2s ease;
}

.costs-detail-panel {
  padding: 1.25rem;
  background-color: var(--bg-subtle);
  border-top: 1px solid var(--border);
}

.costs-intro-text {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 1rem;
}

.sub-form-group {
  margin-bottom: 1rem;
}

.costs-grid-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 600px) {
  .costs-grid-inputs {
    grid-template-columns: 1fr;
  }
}

.cost-input-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cost-input-item label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-main);
}

.small-addon .input-field {
  padding: 0.45rem 0.65rem 0.45rem 1.75rem;
  font-size: 0.875rem;
}

.small-addon .input-addon-left {
  left: 0.65rem;
  font-size: 0.85rem;
}

.tax-deduct-tag {
  font-size: 0.7rem;
  color: var(--success);
  font-weight: 600;
}

.tax-non-deduct-tag {
  font-size: 0.7rem;
  color: var(--text-light);
}

.costs-summary-box {
  background-color: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.8125rem;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.summary-line strong {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.text-emerald {
  color: var(--success);
}

/* ==========================================================================
   RESULTATEN DASHBOARD & KPIS
   ========================================================================== */
.monthly-payment-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-md);
}

.mph-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.mph-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mph-badge {
  background-color: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
}

.mph-amount-wrap {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}

.mph-currency {
  font-size: 1.75rem;
  font-weight: 700;
  color: #93c5fd;
}

.mph-amount {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.mph-period {
  font-size: 1rem;
  color: #94a3b8;
}

.mph-sub-indicators {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.8125rem;
  flex-wrap: wrap;
}

.mph-sub-item {
  display: flex;
  gap: 0.35rem;
}

.mph-sub-label {
  color: #cbd5e1;
}

.mph-sub-val {
  font-weight: 700;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

.mph-sub-divider {
  color: rgba(255, 255, 255, 0.25);
}

.mph-net-estimate {
  margin-top: 0.75rem;
  background-color: rgba(5, 150, 105, 0.25);
  border: 1px solid rgba(5, 150, 105, 0.4);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.net-icon {
  font-weight: bold;
  color: #6ee7b7;
}

.mph-net-estimate strong {
  margin-left: auto;
  font-size: 0.95rem;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

/* KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 580px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }
}

.kpi-card {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.kpi-card.highlight-card {
  background-color: var(--accent-soft);
  border-color: var(--accent-light);
}

.kpi-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.kpi-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.kpi-value.text-accent {
  color: var(--accent-hover);
}

.kpi-hint {
  font-size: 0.72rem;
  color: var(--text-light);
}

.kpi-status-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.kpi-status-tag.status-good {
  background-color: var(--success-light);
  color: var(--success);
}

.kpi-status-tag.status-warning {
  background-color: var(--warning-light);
  color: var(--warning);
}

.kpi-status-tag.status-danger {
  background-color: var(--danger-light);
  color: var(--danger);
}

/* Benodigd Eigen Geld Notaris Afrekening Box */
.funds-breakdown-card {
  background-color: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  margin-bottom: 1.5rem;
}

.funds-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.75rem;
}

.funds-table {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.85rem;
}

.funds-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.funds-val {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.divider-row {
  height: 1px;
  background-color: var(--border);
  margin: 0.35rem 0;
}

.funds-total-row {
  font-size: 0.95rem;
}

.text-primary {
  color: var(--primary);
}

.funds-note {
  font-size: 0.72rem;
  color: var(--text-light);
  margin-top: 0.65rem;
  line-height: 1.35;
}

/* ==========================================================================
   GRAFIEK & VISUELE SCHULDAFBOUW
   ========================================================================== */
.chart-section {
  background-color: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.chart-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.chart-header-row h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.legend-color {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.legend-debt {
  background-color: var(--primary);
}

.legend-principal {
  background-color: var(--success);
}

.legend-interest {
  background-color: var(--accent);
}

.svg-chart-container {
  width: 100%;
  height: 180px;
  position: relative;
}

#mortgage-svg-chart {
  width: 100%;
  height: 100%;
  display: block;
}

.chart-footer-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-light);
  margin-top: 0.5rem;
  padding: 0 0.5rem;
}

/* ==========================================================================
   AMORTISATIETABEL SECTIE
   ========================================================================== */
.table-card {
  margin-top: 1rem;
}

.table-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.table-card-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.table-card-header p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.small-segmented {
  padding: 2px;
}

.small-segmented .segmented-item span {
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
}

.table-search-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.small-input {
  max-width: 320px;
  padding: 0.45rem 0.75rem;
  font-size: 0.85rem;
}

.table-info-counter {
  font-size: 0.8125rem;
  color: var(--text-light);
  white-space: nowrap;
}

.table-scroll-container {
  max-height: 480px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  position: relative;
  background-color: #ffffff;
}

.amortization-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

.amortization-table th {
  background-color: var(--bg-subtle);
  color: var(--text-main);
  font-weight: 700;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 2;
  white-space: nowrap;
}

.amortization-table td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.amortization-table tbody tr:nth-child(even) {
  background-color: #fafbfc;
}

.amortization-table tbody tr:hover {
  background-color: #f1f5f9;
}

.amortization-table tfoot td {
  background-color: var(--bg-subtle);
  font-weight: 800;
  color: var(--primary-dark);
  padding: 0.85rem 1rem;
  border-top: 2px solid var(--border);
  position: sticky;
  bottom: 0;
  z-index: 2;
}

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

/* ==========================================================================
   KENNISBANK & FAQ
   ========================================================================== */
.info-card {
  margin-top: 1rem;
}

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

.info-item {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.info-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.info-item h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.4rem;
}

.info-item p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.faq-section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 1rem;
}

.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.faq-block {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background-color: #ffffff;
  overflow: hidden;
}

.faq-trigger {
  width: 100%;
  padding: 0.9rem 1.15rem;
  background: none;
  border: none;
  text-align: left;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.faq-trigger:hover {
  background-color: var(--bg-subtle);
}

.faq-icon-arrow {
  font-size: 0.75rem;
  color: var(--text-light);
  transition: transform 0.2s ease;
}

.faq-trigger[aria-expanded="true"] .faq-icon-arrow {
  transform: rotate(180deg);
}

.faq-content {
  display: none;
  padding: 0 1.15rem 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
  border-top: 1px solid #f1f5f9;
  padding-top: 0.75rem;
}

.faq-content.open {
  display: block;
}

/* ==========================================================================
   DISCLAIMER & FOOTER
   ========================================================================== */
.calc-disclaimer {
  background-color: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.25rem;
  font-size: 0.78rem;
  color: var(--text-light);
  line-height: 1.45;
}

.site-footer {
  background-color: var(--primary-dark);
  color: #94a3b8;
  border-top: 1px solid #1e293b;
  padding: 3rem 1.5rem 2rem;
  margin-top: auto;
}

.footer-inner {
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
}

@media (max-width: 768px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

.footer-badge {
  display: inline-block;
  background-color: var(--accent);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.8rem;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
}

.brand-col p {
  font-size: 0.85rem;
  line-height: 1.6;
  max-width: 400px;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid #1e293b;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: #64748b;
}

/* ==========================================================================
   TOAST NOTIFICATIE
   ========================================================================== */
.toast-popup {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: var(--primary-dark);
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast-popup.show {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   PRINT STYLESHEET (VOOR PDF OF PRINTEN VAN HET RAPPORT)
   ========================================================================== */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 11pt;
  }

  .site-header,
  .hero-strip,
  .calc-top-bar,
  .preset-strip,
  .btn-action-tool,
  .btn-header-cta,
  .table-actions,
  .table-search-row,
  .site-footer,
  .toast-popup,
  .range-slider,
  .slider-markers,
  .tooltip-trigger {
    display: none !important;
  }

  .print-header {
    display: block !important;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #000000;
  }

  .print-brand {
    font-size: 16pt;
    font-weight: bold;
  }

  .print-date {
    font-size: 9pt;
    color: #555555;
  }

  .main-container {
    padding: 0 !important;
  }

  .calc-layout-grid {
    display: block !important;
  }

  .calc-card {
    border: 1px solid #cccccc !important;
    box-shadow: none !important;
    page-break-inside: avoid;
    margin-bottom: 20px;
    padding: 15px !important;
  }

  .monthly-payment-hero {
    background: #f1f5f9 !important;
    color: #000000 !important;
    border: 2px solid #333333;
    box-shadow: none !important;
  }

  .mph-currency,
  .mph-sub-val,
  .mph-net-estimate strong {
    color: #000000 !important;
  }

  .table-scroll-container {
    max-height: none !important;
    overflow: visible !important;
    border: 1px solid #000000 !important;
  }

  .amortization-table th {
    position: static !important;
    background: #eeeeee !important;
  }

  .amortization-table tfoot td {
    position: static !important;
    background: #eeeeee !important;
  }
}
