/**
 * Tilgungsrechner Styles
 * Ergänzung zu style.css
 */

/* Calculator Form */
.calculator-wrapper {
  margin-top: 1.5rem;
}

.calculator-form {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}

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

.form-group label {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.input-group {
  display: flex;
  align-items: stretch;
}

.input-group input {
  flex: 1;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-right: none;
  border-radius: 6px 0 0 6px;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-group input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.input-suffix {
  display: flex;
  align-items: center;
  padding: 0 1rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 0 6px 6px 0;
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.35rem;
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

/* Result Section */
.calculator-result {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.calculator-result h3 {
  margin: 0 0 1.25rem;
  font-size: 1.25rem;
}

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

.result-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
}

.result-label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.result-value {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--brand);
}

/* Tables */
.table-container {
  margin-top: 1.5rem;
}

.table-container h4 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.tilgungstabelle {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.tilgungstabelle th,
.tilgungstabelle td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.tilgungstabelle th {
  background: var(--bg-alt);
  font-weight: 600;
  white-space: nowrap;
}

.tilgungstabelle td.number {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tilgungstabelle tbody tr:hover {
  background: rgba(37, 99, 235, 0.03);
}

.tilgungstabelle tbody tr:last-child td {
  border-bottom: none;
}

.tilgungstabelle .highlight-row {
  background: rgba(37, 99, 235, 0.08);
  font-weight: 600;
}

.tilgungstabelle .info-row {
  background: rgba(234, 179, 8, 0.1);
}

.tilgungstabelle .info-cell {
  text-align: center;
  color: var(--text);
  font-size: 0.85rem;
  padding: 0.6rem 1rem;
}

/* Toggle Section */
.toggle-section {
  margin-top: 1.5rem;
  text-align: center;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Disclaimer Box */
.disclaimer-box {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  background: rgba(234, 179, 8, 0.1);
  border: 1px solid rgba(234, 179, 8, 0.3);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text);
}

.disclaimer-box p {
  margin: 0;
  line-height: 1.6;
}

/* Content Section */
.content-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.content-section h2 {
  margin: 0 0 1.25rem;
}

.content-section h3 {
  margin: 2rem 0 1rem;
  font-size: 1.15rem;
}

.content-section p {
  line-height: 1.7;
  margin-bottom: 1rem;
  color: var(--text);
}

/* Link Grid */
.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.link-card {
  display: block;
  padding: 1.25rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.link-card:hover {
  border-color: var(--brand);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.link-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: var(--brand);
}

.link-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Comparison Section */
.comparison-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.comparison-section h2 {
  margin: 0 0 1rem;
}

/* FAQ Section */
.faq-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.faq-section h2 {
  margin: 0 0 1.5rem;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
}

.faq-question {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  color: var(--text);
}

.faq-answer {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.6;
}

.faq-answer p {
  margin: 0;
}

/* CTA Section */
.cta-section {
  margin-top: 3rem;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(37, 99, 235, 0.1));
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 12px;
  text-align: center;
}

.cta-section h2 {
  margin: 0 0 0.75rem;
}

.cta-section p {
  margin: 0 0 1.5rem;
  color: var(--text);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Print Styles */
@media print {
  .form-actions,
  .action-buttons,
  .toggle-section,
  .cta-section,
  header,
  footer,
  .breadcrumbs,
  .trust-badges {
    display: none !important;
  }

  .calculator-result {
    border: none;
    padding: 0;
  }

  .tilgungstabelle {
    font-size: 0.75rem;
  }

  .tilgungstabelle th,
  .tilgungstabelle td {
    padding: 0.4rem 0.6rem;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

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

  .result-value {
    font-size: 1.1rem;
  }

  .tilgungstabelle {
    font-size: 0.8rem;
  }

  .tilgungstabelle th,
  .tilgungstabelle td {
    padding: 0.5rem 0.6rem;
  }

  .link-grid {
    grid-template-columns: 1fr;
  }
}

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

  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn {
    width: 100%;
  }

  .cta-buttons {
    flex-direction: column;
  }

  .cta-buttons .btn {
    width: 100%;
  }
}