:root {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  color: #111827;
}

body {
  margin: 0;
  padding: 0;
  background: #f3f4f6;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
}

.calculator {
  background: #ffffff;
  margin: 2rem 1rem;
  padding: 1.75rem 1.5rem;
  max-width: 520px;
  width: 100%;
  border-radius: 0.75rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}

/* ----------- Logo bovenaan ----------- */
.header-top {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.site-logo {
  max-width: 220px;
  height: auto;
}

/* ----------- Taalkeuze (tekst bolletjes) ----------- */
.language-switch {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1.75rem;
}

.lang-btn {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 2px solid #d1d5db;
  background: #ffffff;
  cursor: pointer;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #6b7280;

  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s, color 0.15s;
}

.lang-btn:hover {
  transform: translateY(-1px);
  border-color: #3d9b35;
  color: #111827;
}

.lang-btn.active {
  border-color: #3d9b35;
  color: #3d9b35;
  box-shadow: 0 0 0 3px rgba(61, 155, 53, 0.18);
  transform: scale(1.06);
}

.calculator h1 {
  margin-top: 0;
  margin-bottom: 0.25rem;
  font-size: 1.4rem;
}

.calculator p.description {
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  color: #4b5563;
}

.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
  font-weight: 500;
}

.field small {
  display: block;
  font-size: 0.8rem;
  color: #6b7280;
}

.field input {
  width: 100%;
  padding: 0.6rem 0.7rem;
  font-size: 1rem;
  border-radius: 0.5rem;
  border: 1px solid #d1d5db;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:focus {
  outline: none;
  border-color: #3d9b35;
  box-shadow: 0 0 0 3px rgba(61, 155, 53, 0.25);
}

.period-toggle {
  margin: 1rem 0 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.period-toggle button {
  flex: 1;
  min-width: 90px;
  padding: 0.45rem 0.6rem;
  font-size: 0.85rem;
  border-radius: 9999px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.period-toggle button.active {
  background: #3d9b35;
  border-color: #3d9b35;
  color: #ffffff;
  font-weight: 600;
}

.period-toggle button:hover:not(.active) {
  border-color: #3d9b35;
}

.actions {
  margin-top: 1.25rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.actions button {
  border: none;
  cursor: pointer;
  padding: 0.7rem 1.1rem;
  font-size: 0.95rem;
  border-radius: 0.5rem;
  font-weight: 500;
}

.actions .primary {
  background: #3d9b35;
  color: #ffffff;
}

.actions .primary:hover {
  background: #2f7a29;
}

.actions .secondary {
  background: #e5e7eb;
  color: #374151;
}

.actions .secondary:hover {
  background: #d1d5db;
}

.result {
  margin-top: 1.5rem;
  padding: 0.9rem 1rem;
  border-radius: 0.6rem;
  font-size: 0.95rem;
  background: #ecfdf3;
  color: #166534;
  display: none;
}

.result strong {
  font-size: 1.05rem;
}

/* CTA link onder resultaat */
.result-cta {
  display: inline-block;
  margin-top: 0.75rem;
  font-weight: 700;
  color: #3d9b35;
  text-decoration: none;
}

.result-cta:hover {
  text-decoration: underline;
}

.error {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #b91c1c;
  display: none;
}

.info {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #047857;
  display: none;
}

/* ----------- Responsive ----------- */
@media (max-width: 480px) {
  .calculator {
    margin: 1.25rem 0.75rem;
    padding: 1.25rem 1rem;
  }

  .site-logo {
    max-width: 160px;
  }

  .lang-btn {
    width: 44px;
    height: 44px;
    font-size: 0.9rem;
  }
}
