/*
 * indexering-calculator.css
 * Simmelink Advocaten — Indexering alimentatie calculator
 *
 * Bouwt voort op CSS-variabelen uit style.css (:root).
 * Enqueue via functions.php: wp_enqueue_style('simmelink-indexering-calculator', ...)
 * Directory op server: wp-content/themes/simmelink/
 */

/* ============================================================
   LOKALE VARIABELEN
   (gold is geen onderdeel van style.css :root)
   ============================================================ */

.indexering-calculator-wrap {
  --gold:       #c9a84c;
  --gold-light: #e0c070;
  --gold-pale:  #f5eed8;
}


/* ============================================================
   1. WRAPPER
   ============================================================ */

.indexering-calculator-wrap {
  width: 100%;
  font-family: var(--ff-body, 'Source Serif 4', Georgia, serif);
}


/* ============================================================
   2. KEUZEKAARTEN (drie modi)
   ============================================================ */

.ix-optie-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

@media (max-width: 640px) {
  .ix-optie-grid {
    grid-template-columns: 1fr;
  }
}

.ix-optie-kaart {
  border: 2px solid var(--base-400);
  border-radius: var(--radius-default);
  padding: 20px 18px 18px;
  cursor: pointer;
  background: var(--base-100);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
  display: flex;
  flex-direction: column;
  gap: 7px;
  text-align: left;
}

.ix-optie-kaart:hover {
  border-color: var(--brand-1);
  box-shadow: 0 3px 12px rgba(0, 42, 80, 0.10);
  transform: translateY(-2px);
}

.ix-optie-kaart.active {
  border-color: var(--brand-1);
  background: var(--brand-1);
  box-shadow: 0 4px 16px rgba(0, 42, 80, 0.18);
}

.ix-optie-kaart.active .ix-optie-icon { color: var(--gold); }
.ix-optie-kaart.active .ix-optie-titel { color: var(--contrast-100); }
.ix-optie-kaart.active .ix-optie-omschrijving { color: rgba(255,255,255,0.65); }
.ix-optie-kaart.active .ix-optie-tag {
  background: rgba(201,168,76,0.18);
  color: var(--gold);
}

.ix-optie-icon {
  font-size: 24px;
  color: var(--gold);
  line-height: 1;
}

.ix-optie-titel {
  font-family: var(--ff-display, 'Playfair Display', Georgia, serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-1);
  line-height: 1.3;
  margin: 0;
}

.ix-optie-omschrijving {
  font-size: 0.82rem;
  color: var(--contrast-300);
  line-height: 1.5;
  font-style: italic;
  margin: 0;
}

.ix-optie-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 20px;
  background: var(--base-300);
  color: var(--contrast-300);
  margin-top: 4px;
  align-self: flex-start;
}


/* ============================================================
   3. FORMULIERKAART
   ============================================================ */

.ix-card {
  background: var(--base-100);
  border: 1px solid var(--base-400);
  border-radius: var(--radius-default);
  padding: var(--space-l) var(--space-l) var(--space-m);
  margin-bottom: 20px;
  box-shadow: 0 1px 4px rgba(0,42,80,0.06);
}

.ix-card-titel {
  font-family: var(--ff-display, 'Playfair Display', Georgia, serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--brand-1);
  margin: 0 0 var(--space-m);
  padding-bottom: var(--space-s);
  border-bottom: 1px solid var(--base-300);
}

/* Info box */
.ix-info-box {
  background: var(--gold-pale);
  border-left: 3px solid var(--gold);
  padding: 10px 14px;
  border-radius: 0 var(--radius-default) var(--radius-default) 0;
  font-size: 0.9rem;
  color: var(--brand-1);
  line-height: 1.6;
  margin-bottom: var(--space-m);
}

/* Waarschuwingsbox (verjaring) */
.ix-warning-box {
  background: #fff5f5;
  border-left: 3px solid var(--error);
  padding: 10px 14px;
  border-radius: 0 var(--radius-default) var(--radius-default) 0;
  font-size: 0.88rem;
  color: #7a1515;
  line-height: 1.6;
  margin-bottom: var(--space-m);
}

/* Formulierrijen */
.ix-form-row {
  margin-bottom: var(--space-m);
}

.ix-form-row:last-child {
  margin-bottom: 0;
}

.ix-form-row label {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--contrast-500);
  margin-bottom: 6px;
}

.ix-label-hint {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--contrast-300);
  font-style: italic;
  margin-left: 4px;
}

/* Invoervelden */
.ix-input-prefix {
  position: relative;
  display: flex;
  align-items: center;
}

.ix-input-prefix .ix-prefix-sym {
  position: absolute;
  left: 12px;
  font-size: 0.95rem;
  color: var(--contrast-300);
  pointer-events: none;
  z-index: 1;
}

.ix-input-prefix input {
  padding-left: 30px;
}

.ix-calculator-wrap input[type="number"],
.ix-calculator-wrap input[type="text"],
.ix-calculator-wrap input[type="email"],
.ix-calculator-wrap input[type="tel"],
.ix-calculator-wrap select,
.ix-form-row input[type="number"],
.ix-form-row input[type="text"],
.ix-form-row input[type="email"],
.ix-form-row input[type="tel"],
.ix-form-row select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--base-100);
  border: 1px solid var(--base-400);
  border-radius: var(--radius-default);
  color: var(--contrast-500);
  font-size: 1rem;
  font-family: var(--ff-body, 'Source Serif 4', Georgia, serif);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  -moz-appearance: textfield;
  appearance: textfield;
}

.ix-form-row input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.ix-form-row input:focus,
.ix-form-row select:focus {
  outline: none;
  border-color: var(--brand-2);
  box-shadow: 0 0 0 3px rgba(0,94,140,0.15);
}

.ix-form-row input.ix-error {
  border-color: var(--error);
  background: #fff5f5;
}

/* Select pijltje */
.ix-form-row select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23404040' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

/* Grid twee kolommen */
.ix-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 520px) {
  .ix-form-grid {
    grid-template-columns: 1fr;
  }
}

/* Foutmelding onder veld */
.ix-field-error {
  color: var(--error);
  font-size: 0.8rem;
  margin-top: 4px;
  display: none;
}

.ix-field-error.visible {
  display: block;
}

/* Bereken-knop */
.ix-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: var(--space-s);
  padding: 0.85rem var(--space-l);
  background: var(--brand-1);
  color: var(--contrast-100);
  border: none;
  border-radius: var(--radius-default);
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--ff-body, 'Source Serif 4', Georgia, serif);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.ix-btn-primary:hover {
  background: var(--brand-2);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.12);
}

.ix-btn-primary:active {
  transform: translateY(0);
}


/* ============================================================
   4. RESULTAAT
   ============================================================ */

#ix-result-area {
  display: none;
}

#ix-result-area.visible {
  display: block;
  animation: ix-fadeInUp 0.35s ease both;
}

@keyframes ix-fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Resultaatkoptekst (navy blok) */
.ix-result-header {
  background: var(--brand-1);
  color: var(--contrast-100);
  padding: var(--space-l) var(--space-l) var(--space-m);
  border-radius: var(--radius-default) var(--radius-default) 0 0;
  border-bottom: 3px solid var(--gold);
}

.ix-result-label {
  font-size: 0.72rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 300;
  margin-bottom: 8px;
  display: block;
}

.ix-result-amount {
  font-family: var(--ff-display, 'Playfair Display', Georgia, serif);
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 700;
  line-height: 1;
  color: var(--contrast-100);
}

.ix-result-amount .ix-euro {
  font-size: 60%;
  opacity: 0.8;
  margin-right: 2px;
}

.ix-result-sub {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  margin-top: 5px;
  font-style: italic;
}

.ix-result-badge {
  display: inline-block;
  background: var(--gold);
  color: var(--brand-1);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 10px;
}

.ix-result-badge.rood {
  background: var(--error);
  color: var(--contrast-100);
}

/* Resultaatlichaam */
.ix-result-body {
  background: var(--base-100);
  border: 1px solid var(--base-400);
  border-top: none;
  border-radius: 0 0 var(--radius-default) var(--radius-default);
  padding: var(--space-m) var(--space-l);
  margin-bottom: 16px;
}

/* Key-value rijen */
.ix-result-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid var(--base-300);
  font-size: 0.95rem;
  gap: 12px;
}

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

.ix-result-row .ix-rl {
  color: var(--contrast-300);
  flex-shrink: 0;
}

.ix-result-row .ix-rv {
  font-weight: 600;
  color: var(--brand-1);
  font-size: 1rem;
  text-align: right;
}

.ix-result-row .ix-rv.gold {
  color: var(--gold);
}

/* Tabel (meerjarig + achterstand) */
.ix-table-scroll {
  overflow-x: auto;
  margin-top: 4px;
}

table.ix-tabel {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.ix-tabel th {
  background: var(--brand-1);
  color: var(--contrast-100);
  padding: 8px 12px;
  text-align: left;
  font-size: 0.78rem;
  letter-spacing: 0.3px;
  font-weight: 600;
  border: none;
}

.ix-tabel th:not(:first-child) {
  text-align: right;
}

.ix-tabel td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--base-300);
  color: var(--contrast-500);
  background: var(--base-100);
}

.ix-tabel td:not(:first-child) {
  text-align: right;
  font-weight: 600;
}

.ix-tabel tr:nth-child(even) td {
  background: var(--base-200);
}

.ix-tabel tr.ix-huidig-jaar td {
  background: var(--gold-pale);
  font-weight: 700;
}

.ix-tabel tr.ix-huidig-jaar td:first-child {
  border-left: 3px solid var(--gold);
}

.ix-tabel .ix-gemist {
  color: var(--error);
}

.ix-tabel .ix-ok {
  color: var(--success);
}

.ix-tabel tr.ix-totaal-rij td {
  background: var(--brand-1) !important;
  color: var(--contrast-100) !important;
  font-weight: 700 !important;
  border-bottom: none !important;
}


/* ============================================================
   5. DREMPEL-CTA (achterstand > €500)
   ============================================================ */

.ix-drempel-cta {
  background: var(--brand-1);
  border-radius: var(--radius-default);
  padding: var(--space-m) var(--space-l);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: var(--space-m);
  flex-wrap: wrap;
  border-left: 4px solid var(--gold);
}

.ix-drempel-cta-text h3 {
  font-family: var(--ff-display, 'Playfair Display', Georgia, serif);
  font-size: 1.05rem;
  color: var(--contrast-100);
  margin: 0 0 4px;
}

.ix-drempel-cta-text p {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.7);
  margin: 0;
  line-height: 1.5;
}

.ix-drempel-cta-text p strong {
  color: var(--gold);
  font-style: normal;
}

.ix-btn-gold {
  background: var(--gold);
  color: var(--brand-1);
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-default);
  font-family: var(--ff-body, 'Source Serif 4', Georgia, serif);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
  transition: background 0.15s ease;
  flex-shrink: 0;
}

.ix-btn-gold:hover {
  background: var(--gold-light);
}


/* ============================================================
   6. ADVIESGESPREK CTA (onderaan resultaat)
   ============================================================ */

.ix-advies-cta {
  margin-top: var(--space-m);
  padding: var(--space-m) var(--space-l);
  background: var(--base-200);
  border-radius: var(--radius-default);
  border-left: 3px solid var(--gold);
  display: none;  /* verborgen tot berekening gedaan */
  align-items: center;
  justify-content: space-between;
  gap: var(--space-m);
  flex-wrap: wrap;
}

#ix-result-area.visible .ix-advies-cta {
  display: flex;
}

.ix-advies-cta p {
  font-size: 0.92rem;
  color: var(--contrast-300);
  margin: 0;
  line-height: 1.5;
  flex: 1;
}


/* ============================================================
   7. E-MAILBLOK
   ============================================================ */

/* Verborgen totdat een berekening is gedaan */
#ix-result-area #ix-email-section {
  display: none;
}

#ix-result-area.visible #ix-email-section {
  display: block;
  animation: ix-fadeInUp 0.4s ease both;
}

#ix-email-section {
  margin-top: var(--space-l);
  padding: var(--space-l);
  background: var(--surface-accent);
  border: 1px solid var(--brand-3);
  border-radius: var(--radius-default);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  animation: ix-fadeInUp 0.4s ease both;
}

#ix-email-section h3 {
  color: var(--brand-1);
  font-family: var(--ff-display, 'Playfair Display', Georgia, serif);
  margin: 0 0 var(--space-xs);
  font-size: clamp(1rem, 2vw, 1.25rem);
}

#ix-email-section p {
  color: var(--contrast-300);
  font-size: 0.9rem;
  margin: 0 0 var(--space-m);
  line-height: 1.5;
}

.ix-email-rij {
  display: flex;
  gap: var(--space-s);
  margin-bottom: var(--space-s);
  flex-wrap: wrap;
}

#ix-email-section input[type="text"],
#ix-email-section input[type="email"],
#ix-email-section input[type="tel"] {
  flex: 1 1 180px;
  padding: 0.7rem 1rem;
  background: var(--base-100);
  border: 1px solid var(--base-400);
  border-radius: var(--radius-default);
  color: var(--contrast-500);
  font-size: 0.95rem;
  font-family: var(--ff-body, 'Source Serif 4', Georgia, serif);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#ix-email-section input:focus {
  outline: none;
  border-color: var(--brand-2);
  box-shadow: 0 0 0 3px rgba(0,94,140,0.15);
}

#ix-email-section input.ix-email-fout {
  border-color: var(--error);
  background: #fff5f5;
}

/* Opt-in checkbox */
.ix-optin-rij {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: var(--space-s) 0;
}

.ix-optin-rij input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--brand-1);
  cursor: pointer;
}

.ix-optin-rij label {
  font-size: 0.82rem;
  color: var(--contrast-300);
  line-height: 1.5;
  cursor: pointer;
  font-weight: 400;
  margin: 0;
}

/* Verzendknop */
#ix-email-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: var(--space-s);
  padding: 0.75rem var(--space-l);
  background: var(--brand-1);
  color: var(--contrast-100);
  border: none;
  border-radius: var(--radius-default);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--ff-body, 'Source Serif 4', Georgia, serif);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

#ix-email-submit:hover {
  background: var(--brand-2);
  transform: translateY(-2px);
}

#ix-email-submit:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

/* Feedback */
#ix-email-feedback {
  margin-top: var(--space-s);
  font-size: 0.9rem;
}

#ix-email-feedback .ix-feedback-ok {
  padding: 8px 12px;
  background: rgba(46,125,50,0.08);
  color: var(--success);
  border: 1px solid rgba(46,125,50,0.2);
  border-radius: var(--radius-default);
}

#ix-email-feedback .ix-feedback-err {
  padding: 8px 12px;
  background: rgba(198,40,40,0.06);
  color: var(--error);
  border: 1px solid rgba(198,40,40,0.2);
  border-radius: var(--radius-default);
}

/* E-mailfoutregel */
.ix-email-validatie-fout {
  color: var(--error);
  font-size: 0.8rem;
  margin-top: 3px;
  display: none;
}

.ix-email-validatie-fout.visible {
  display: block;
}

@media (max-width: 520px) {
  .ix-email-rij { flex-direction: column; }
  #ix-email-submit { width: 100%; }
}


/* ============================================================
   8. DISCLAIMER
   ============================================================ */

.ix-disclaimer {
  font-size: 0.8rem;
  color: var(--contrast-300);
  font-style: italic;
  line-height: 1.6;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--base-300);
}
