/* ════════════════════════════════════════════════════════════════════════════
   MwSt-Rechner – Stylesheet
   Design: Clean Financial / Professional German Aesthetic
   Fonts: Playfair Display (display) + IBM Plex Sans (body)
   ════════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=IBM+Plex+Sans:wght@300;400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --mwst-navy:      #0d1b2e;
  --mwst-navy-mid:  #162540;
  --mwst-blue:      #1a56db;
  --mwst-blue-dark: #1240b0;
  --mwst-gold:      #c8a84b;
  --mwst-gold-lt:   #f0d98a;
  --mwst-green:     #0e9f6e;
  --mwst-red:       #e02424;
  --mwst-bg:        #f4f6fb;
  --mwst-card-bg:   #ffffff;
  --mwst-border:    #dde3f0;
  --mwst-text:      #1a2038;
  --mwst-muted:     #64728c;
  --mwst-radius:    14px;
  --mwst-shadow:    0 4px 32px rgba(13,27,46,.10), 0 1px 4px rgba(13,27,46,.07);
  --mwst-transition: .2s cubic-bezier(.4,0,.2,1);
}

/* ── Wrapper ────────────────────────────────────────────────────────────── */
.mwst-rechner-wrapper {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  color: var(--mwst-text);
  max-width: 820px;
  margin: 0 auto;
  padding: 0 0 48px;
}

/* ── Card ───────────────────────────────────────────────────────────────── */
.mwst-card {
  background: var(--mwst-card-bg);
  border-radius: var(--mwst-radius);
  box-shadow: var(--mwst-shadow);
  border: 1px solid var(--mwst-border);
  overflow: hidden;
  margin-bottom: 40px;
}

.mwst-card__header {
  background: var(--mwst-navy);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.mwst-card__icon {
  width: 54px;
  height: 54px;
  background: var(--mwst-gold);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 900;
  color: var(--mwst-navy);
  flex-shrink: 0;
  letter-spacing: -1px;
}

.mwst-card__title {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px;
  line-height: 1.2;
}

.mwst-card__subtitle {
  font-size: 13px;
  color: rgba(255,255,255,.6);
  margin: 0;
  font-weight: 300;
}

.mwst-card__body {
  padding: 28px 32px 32px;
}

/* ── Field Group ────────────────────────────────────────────────────────── */
.mwst-field-group {
  margin-bottom: 22px;
}

.mwst-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--mwst-muted);
  margin-bottom: 8px;
}

/* ── Segmented Controls ─────────────────────────────────────────────────── */
.mwst-segmented {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.mwst-seg {
  padding: 9px 18px;
  border-radius: 8px;
  border: 1.5px solid var(--mwst-border);
  background: #fff;
  color: var(--mwst-muted);
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--mwst-transition);
  white-space: nowrap;
}

.mwst-seg:hover {
  border-color: var(--mwst-blue);
  color: var(--mwst-blue);
  background: #eef3ff;
}

.mwst-seg.active {
  background: var(--mwst-navy);
  border-color: var(--mwst-navy);
  color: #fff;
  box-shadow: 0 2px 8px rgba(13,27,46,.2);
}

/* ── Satz-Buttons ───────────────────────────────────────────────────────── */
.mwst-satz-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.mwst-satz-btn {
  padding: 9px 20px;
  border-radius: 8px;
  border: 1.5px solid var(--mwst-border);
  background: #fff;
  color: var(--mwst-muted);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--mwst-transition);
}

.mwst-satz-btn:hover {
  border-color: var(--mwst-gold);
  color: var(--mwst-navy);
  background: #fffbf0;
}

.mwst-satz-btn.active {
  background: var(--mwst-gold);
  border-color: var(--mwst-gold);
  color: var(--mwst-navy);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(200,168,75,.3);
}

.mwst-satz-btn.custom-btn {
  border-style: dashed;
}
.mwst-satz-btn.custom-btn.active {
  background: var(--mwst-navy);
  border-color: var(--mwst-navy);
  color: #fff;
}

/* ── Custom Satz Input ──────────────────────────────────────────────────── */
.mwst-custom-satz {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
}

/* ── Text Inputs ────────────────────────────────────────────────────────── */
.mwst-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.mwst-input {
  width: 100%;
  padding: 11px 44px 11px 16px;
  border: 1.5px solid var(--mwst-border);
  border-radius: 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 15px;
  color: var(--mwst-text);
  background: #fff;
  transition: border-color var(--mwst-transition), box-shadow var(--mwst-transition);
  -webkit-appearance: none;
  box-sizing: border-box;
}

.mwst-input:focus {
  outline: none;
  border-color: var(--mwst-blue);
  box-shadow: 0 0 0 3px rgba(26,86,219,.12);
}

.mwst-input--large {
  font-size: 20px;
  padding: 14px 52px 14px 18px;
  font-weight: 500;
}

.mwst-custom-satz .mwst-input {
  width: 120px;
  padding-right: 36px;
}

.mwst-input-suffix {
  position: absolute;
  right: 14px;
  font-size: 14px;
  color: var(--mwst-muted);
  font-weight: 600;
  pointer-events: none;
}

/* ── Calculate Button ───────────────────────────────────────────────────── */
.mwst-btn-calc {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--mwst-blue) 0%, var(--mwst-navy) 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: .03em;
  transition: all var(--mwst-transition);
  margin-top: 8px;
  box-shadow: 0 4px 16px rgba(26,86,219,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.mwst-btn-calc:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(26,86,219,.35);
}

.mwst-btn-calc:active {
  transform: translateY(0);
}

.mwst-btn-spinner {
  display: inline-block;
  animation: mwst-spin .8s linear infinite;
  font-size: 18px;
}

@keyframes mwst-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── Result Box ─────────────────────────────────────────────────────────── */
.mwst-ergebnis {
  margin-top: 24px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--mwst-border);
  animation: mwst-fadein .3s ease;
}

@keyframes mwst-fadein {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.mwst-ergebnis__header {
  background: var(--mwst-navy);
  color: rgba(255,255,255,.7);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: 10px 20px;
}

.mwst-ergebnis__grid {
  background: #fff;
}

.mwst-ergebnis__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid #f0f4fb;
  transition: background var(--mwst-transition);
}

.mwst-ergebnis__row:hover {
  background: #f8faff;
}

.mwst-ergebnis__row--brutto {
  background: #f0f8f4;
  border-bottom: none;
}

.mwst-ergebnis__row--brutto:hover {
  background: #e6f4ee;
}

.mwst-ergebnis__label {
  font-size: 14px;
  color: var(--mwst-muted);
  font-weight: 500;
}

.mwst-ergebnis__value {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 18px;
  font-weight: 600;
  color: var(--mwst-text);
}

.mwst-ergebnis__row--mwst .mwst-ergebnis__value {
  color: var(--mwst-blue);
}

.mwst-ergebnis__row--brutto .mwst-ergebnis__label {
  font-weight: 700;
  color: var(--mwst-text);
}

.mwst-ergebnis__row--brutto .mwst-ergebnis__value {
  color: var(--mwst-green);
  font-size: 22px;
}

/* ── Copy Button ────────────────────────────────────────────────────────── */
.mwst-btn-copy {
  width: 100%;
  padding: 10px;
  background: #f4f6fb;
  border: none;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 13px;
  color: var(--mwst-muted);
  cursor: pointer;
  transition: all var(--mwst-transition);
  letter-spacing: .02em;
}

.mwst-btn-copy:hover {
  background: #eef3ff;
  color: var(--mwst-blue);
}

/* ── Error ──────────────────────────────────────────────────────────────── */
.mwst-error {
  margin-top: 16px;
  padding: 12px 16px;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  color: var(--mwst-red);
  font-size: 14px;
  font-weight: 500;
}

/* ── SEO Text ───────────────────────────────────────────────────────────── */
.mwst-seo-text {
  background: var(--mwst-card-bg);
  border-radius: var(--mwst-radius);
  border: 1px solid var(--mwst-border);
  padding: 36px 40px;
  line-height: 1.75;
}

.mwst-seo-text h2 {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--mwst-navy);
  margin: 0 0 18px;
  line-height: 1.3;
}

.mwst-seo-text h3 {
  font-family: 'Playfair Display', serif;
  font-size: 19px;
  font-weight: 700;
  color: var(--mwst-navy);
  margin: 32px 0 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--mwst-gold-lt);
  display: inline-block;
}

.mwst-seo-text p {
  font-size: 15px;
  color: #374151;
  margin: 0 0 16px;
}

.mwst-seo-text ul {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}

.mwst-seo-text ul li {
  font-size: 15px;
  color: #374151;
  padding: 5px 0 5px 22px;
  position: relative;
}

.mwst-seo-text ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--mwst-gold);
  font-size: 12px;
  top: 7px;
}

/* ── Formula Grid ───────────────────────────────────────────────────────── */
.mwst-formel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin: 16px 0 24px;
}

.mwst-formel-card {
  background: var(--mwst-navy);
  border-radius: 10px;
  padding: 18px;
  color: #fff;
}

.mwst-formel-card__title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--mwst-gold);
  margin-bottom: 8px;
}

.mwst-formel-card code {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12.5px;
  color: #a5b8d9;
  background: rgba(255,255,255,.06);
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 8px;
  word-break: break-all;
}

.mwst-formel-card small {
  font-size: 12px;
  color: rgba(255,255,255,.55);
}

.mwst-formel-card small strong {
  color: rgba(255,255,255,.85);
}

/* ── FAQ ────────────────────────────────────────────────────────────────── */
.mwst-faq-item {
  border: 1px solid var(--mwst-border);
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
}

.mwst-faq-item summary {
  padding: 14px 18px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--mwst-navy);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background var(--mwst-transition);
}

.mwst-faq-item summary:hover {
  background: #f4f6fb;
}

.mwst-faq-item summary::after {
  content: '+';
  font-size: 20px;
  color: var(--mwst-blue);
  font-weight: 300;
}

.mwst-faq-item[open] summary::after {
  content: '−';
}

.mwst-faq-item p {
  padding: 0 18px 16px;
  font-size: 14px;
  margin: 0;
  color: #4b5563;
}

/* ── Disclaimer ─────────────────────────────────────────────────────────── */
.mwst-disclaimer {
  margin-top: 28px !important;
  padding: 14px 18px;
  background: #fffbf0;
  border: 1px solid var(--mwst-gold-lt);
  border-radius: 8px;
  font-size: 13px !important;
  color: #78560a !important;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .mwst-card__header { padding: 20px; gap: 14px; }
  .mwst-card__body   { padding: 20px; }
  .mwst-seo-text     { padding: 24px 20px; }
  .mwst-card__title  { font-size: 18px; }
  .mwst-seo-text h2  { font-size: 21px; }
  .mwst-ergebnis__value { font-size: 16px; }
  .mwst-ergebnis__row--brutto .mwst-ergebnis__value { font-size: 18px; }
  .mwst-seg, .mwst-satz-btn { font-size: 13px; padding: 8px 13px; }
}

/* ── Intro / H1 ─────────────────────────────────────────────────────────── */
.mwst-intro {
  margin-bottom: 28px;
}

.mwst-intro__title {
  font-family: 'Playfair Display', serif;
  font-size: 34px;
  font-weight: 900;
  color: var(--mwst-navy);
  margin: 0 0 12px;
  line-height: 1.2;
}

.mwst-intro__lead {
  font-size: 16px;
  color: var(--mwst-muted);
  line-height: 1.7;
  margin: 0;
  max-width: 680px;
}

@media (max-width: 600px) {
  .mwst-intro__title { font-size: 24px; }
  .mwst-intro__lead  { font-size: 14px; }
}
