/* ==========================================================================
   HandwerkVisuals — Preisseite (/preise)
   Nutzt die Design-Tokens aus style.css (--ink, --steel, --yellow …).
   ========================================================================== */

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.pkg-section { padding-top: 28px; padding-bottom: 24px; }

.pricing-lead { max-width: 60ch; color: var(--ink-soft); font-size: 1.08rem; margin-top: 0.6em; }

/* ---------- Erweiterungen / Hosting ---------- */
.pricing-block { padding-top: 56px; padding-bottom: 8px; }
.pricing-block-end { padding-bottom: 90px; }
#anfrage { scroll-margin-top: 110px; }
.pricing-block h2 { margin-top: 0; }
.pricing-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  border-top: 1px solid var(--line);
  padding-top: 40px;
}
@media (max-width: 860px) { .pricing-split { grid-template-columns: 1fr; gap: 20px; } }
.pricing-text { color: var(--ink-soft); max-width: 46ch; }

.extra-list { margin: 0; }
.extra-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
}
.extra-row:first-child { border-top: 1px solid var(--line-soft); }
.extra-row dt { font-weight: 600; }
.extra-row dd {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.extra-row dd span { font-family: var(--font-body); font-weight: 400; font-size: 0.85rem; color: var(--ink-soft); }

.hosting-toggle {
  display: inline-flex;
  background: rgba(48,48,48,0.06);
  border: 1px solid rgba(48,48,48,0.08);
  border-radius: 100px;
  padding: 4px;
  gap: 2px;
  margin-bottom: 14px;
}
.hosting-opt {
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5em 1.1em;
  border-radius: 100px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.hosting-opt.is-active { background: var(--ink); color: var(--paper); }

.pricing-block .faq-list { margin-top: 1.5rem; }

/* ---------- Rückmeldungen ---------- */
.form-msg, .cfg-msg {
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-size: 0.95rem;
  margin-bottom: 24px;
}
.is-ok  { background: #e6efe3; color: #24451d; border: 1px solid #c4d8bd; }
.is-err { background: #f8e5e1; color: #6e2318; border: 1px solid #e8c3bb; }

/* ---------- Formular (Grundlayout, auch ohne JS) ---------- */
.cfg-form { max-width: 760px; }
.cfg-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.cfg-top .eyebrow { margin-bottom: 0.4em; }
.cfg-title { margin: 0 0 0.6em; font-size: clamp(1.4rem, 3vw, 1.8rem); }
.cfg-close {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.3s var(--ease);
}
.cfg-close:hover { border-color: var(--ink); }
.cfg-close[hidden] { display: none; }

.cfg-step { border: none; padding: 0; margin: 0 0 26px; min-width: 0; }
.cfg-step legend {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 12px;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.6em;
}
.cfg-num { font-family: var(--font-mono); font-size: 0.72rem; color: var(--steel); letter-spacing: 0.08em; }

.cfg-pkgs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

.cfg-pkg {
  position: relative;
  display: grid;
  gap: 2px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper-2);
  cursor: pointer;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.cfg-pkg:hover { border-color: var(--ink-soft); }
.cfg-pkg input { position: absolute; opacity: 0; pointer-events: none; }
.cfg-pkg:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.cfg-pkg:has(input:focus-visible) { outline: 2px solid var(--yellow-dark); outline-offset: 2px; }
.cfg-pkg-name { font-family: var(--font-display); font-weight: 600; }
.cfg-pkg-meta { font-size: 0.8rem; color: var(--ink-soft); }
.cfg-pkg-price { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; margin-top: 4px; font-variant-numeric: tabular-nums; }
.cfg-pkg:has(input:checked)::after {
  content: "✓";
  position: absolute; top: 10px; right: 12px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--yellow);
  font-size: 0.7rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

@media (max-width: 560px) {
  .cfg-pkgs { grid-template-columns: 1fr; gap: 8px; }
  .cfg-pkg { grid-template-columns: 1fr auto; column-gap: 12px; padding: 12px 44px 12px 16px; align-items: center; }
  .cfg-pkg-price { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
  .cfg-pkg:has(input:checked)::after { top: 50%; transform: translateY(-50%); }
}

.cfg-extra {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}
.cfg-extra:first-of-type { border-top: 1px solid var(--line-soft); }
.cfg-extra label { font-weight: 600; display: grid; }
.cfg-extra label small { font-weight: 400; font-size: 0.8rem; color: var(--ink-soft); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 100px; background: var(--paper-2); }
.stepper input {
  width: 3.2em;
  text-align: center;
  border: none;
  background: transparent;
  font: 600 1rem var(--font-display);
  color: var(--ink);
  -moz-appearance: textfield;
  appearance: textfield;
  padding: 8px 0;
}
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper-btn {
  width: 38px; height: 38px;
  border: none;
  background: transparent;
  border-radius: 50%;
  font-size: 1.15rem;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
}
.stepper-btn:hover:not(:disabled) { background: var(--stone); }
.stepper-btn:disabled { color: var(--line); cursor: default; }
.stepper-btn[hidden] { display: none; }

.cfg-hosting { display: flex; flex-wrap: wrap; gap: 8px; }
.cfg-hosting label { cursor: pointer; }
.cfg-hosting input { position: absolute; opacity: 0; pointer-events: none; }
.cfg-hosting span {
  display: inline-block;
  padding: 0.55em 1.1em;
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: 0.88rem;
  font-weight: 600;
  background: var(--paper-2);
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.cfg-hosting input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.cfg-hosting input:focus-visible + span { outline: 2px solid var(--yellow-dark); outline-offset: 2px; }

.cfg-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .cfg-fields { grid-template-columns: 1fr; } }
.fld { display: grid; gap: 5px; font-size: 0.85rem; font-weight: 600; }
.fld-wide { grid-column: 1 / -1; }
.fld input, .fld textarea {
  font: 400 1rem var(--font-body);
  color: var(--ink);
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  width: 100%;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.fld textarea { resize: vertical; min-height: 84px; }
.fld input:focus, .fld textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(250,208,44,0.45); }
.fld input[aria-invalid="true"] { border-color: #b2412f; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.cfg-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.cfg-sum { display: flex; gap: 28px; }
.cfg-sum > div { display: grid; }
.cfg-sum-label { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }
.cfg-sum strong { white-space: nowrap; font-family: var(--font-display); font-size: 1.7rem; line-height: 1.15; font-variant-numeric: tabular-nums; }
.cfg-sum [hidden] { display: none; }
.cfg-submit { display: grid; justify-items: end; gap: 8px; max-width: 340px; }
.cfg-legal { font-size: 0.75rem; color: var(--ink-soft); margin: 0; text-align: right; }
.cfg-legal a { color: inherit; }
.cfg-submit .btn.is-loading { opacity: 0.6; pointer-events: none; }
.cfg-msg { margin: 16px 0 0; }
.cfg-msg[hidden] { display: none; }
.cfg-form.is-sent .cfg-body,
.cfg-form.is-sent .cfg-foot { display: none; }
.cfg-form.is-sent .cfg-msg { font-size: 1.05rem; padding: 22px; }

@media (max-width: 560px) {
  .cfg-foot { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .cfg-sum { gap: 22px; }
  .cfg-sum strong { white-space: nowrap; }
  .cfg-submit { justify-items: stretch; max-width: none; width: 100%; }
  .cfg-submit .btn { justify-content: center; }
  .cfg-legal { text-align: left; font-size: 0.7rem; }
}

/* ---------- Auswahlfenster (mit JavaScript) ---------- */
html.cfg-open { overflow: hidden; }
.cfg-dialog {
  width: min(720px, calc(100vw - 32px));
  max-height: min(880px, calc(100dvh - 48px));
  padding: 0;
  border: none;
  border-radius: var(--radius-lg);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 40px 80px -30px rgba(30,30,30,0.5);
  overflow: hidden;
}
.cfg-dialog::backdrop { background: rgba(38,44,46,0.55); backdrop-filter: blur(3px); }
.cfg-dialog[open] { display: flex; animation: cfg-in 0.45s var(--ease); }
@keyframes cfg-in { from { opacity: 0; transform: translateY(16px) scale(0.985); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .cfg-dialog[open] { animation: none; } }

.cfg-form.is-modal {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  max-height: inherit;
  min-height: 0;
}
.cfg-form.is-modal .cfg-top { padding: 24px 28px 4px; }
.cfg-form.is-modal .cfg-body { padding: 8px 28px 4px; overflow-y: auto; overscroll-behavior: contain; flex: 1; min-height: 0; }
.cfg-form.is-modal .cfg-foot { padding: 16px 28px 22px; background: var(--paper-2); }
.cfg-form.is-modal .cfg-msg { margin: 0 28px 22px; }
.cfg-form.is-modal.is-sent .cfg-msg { margin-top: 8px; }

@media (max-width: 640px) {
  .cfg-dialog {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }
  .cfg-form.is-modal .cfg-top { padding: 16px 18px 0; }
  .cfg-form.is-modal .cfg-body { padding: 8px 18px 4px; }
  .cfg-form.is-modal .cfg-foot { padding: 14px 18px calc(16px + env(safe-area-inset-bottom)); }
  .cfg-form.is-modal .cfg-msg { margin: 0 18px 18px; }
  .cfg-sum strong { font-size: 1.4rem; }
}
