/* ==========================================================================
   Migrations-Check · Popup (Variante E)
   Baut auf den vorhandenen Webflow-Klassen der Seite auf:
   mg-frame, mg-h3, mg-p, mg-note2, mg-items, mg-item, mg-ic, mg-f,
   mg-form-grid, mg-in is-l, mg-card, mg-ghost, button-rainbow is-mg.
   Diese Datei enthält NUR, was es auf der Seite noch nicht gibt (Präfix mc-).
   ========================================================================== */

:root {
  --mc-ink: #151513;
  --mc-orange: #FF4F1A;
  --mc-muted: rgba(12, 12, 11, .6);
  --mc-line: rgba(12, 12, 11, .1);
  --mc-error: #B42318;
  --mc-ring: 0 0 0 4px rgba(255, 79, 26, .18);
}

.mc-lock { overflow: hidden; }

/* ---------- Overlay & Dialog (Dialog trägt zusätzlich .mg-frame) ---------- */
.mc-overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(12, 12, 11, .62);
  opacity: 0; transition: opacity .2s ease;
}
.mc-overlay.is-open { opacity: 1; }
.mc-overlay[hidden] { display: none; }

.mg-frame.mc-dialog {
  box-sizing: border-box;
  width: 100%; max-width: 560px;
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  padding: 24px 32px 32px;
  gap: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
  transform: translateY(12px); transition: transform .25s ease;
}
.mc-overlay.is-open .mc-dialog { transform: none; }
.mc-dialog *, .mc-dialog *::before, .mc-dialog *::after { box-sizing: border-box; }

/* ---------- Kopfzeile ---------- */
.mc-head { display: flex; align-items: center; gap: 16px; }
.mc-head--done { justify-content: flex-end; }
.mc-progress { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.mc-progress__bar { display: flex; gap: 4px; }
.mc-progress__seg { flex: 1; height: 4px; border-radius: 4px; background: var(--mc-line); transition: background .2s ease; }
.mc-progress__seg.is-done { background: var(--mc-orange); }

/* Rahmen ändern beim Fokus/Auswählen nur die Farbe – keine Breitenänderung, nichts verschiebt sich.
   Die stärkere Kontur entsteht per box-shadow (inset), der kein Layout beeinflusst. */

/* Icon-Buttons auf Basis von .mg-ic (Tap-Fläche 44 px) */
.mg-ic.mc-icon-btn { width: 44px; height: 44px; flex-basis: 44px; border: 0; border-radius: 12px; padding: 0; color: var(--mc-orange); cursor: pointer; }
.mg-ic.mc-icon-btn--close { background-color: rgba(12, 12, 11, .06); color: var(--mc-ink); }
.mg-ic.mc-icon-btn:hover { filter: brightness(.96); }
.mc-icon-btn svg, .mc-opt__check svg { display: block; }

/* ---------- Texte (Ergänzungen zu mg-h3 / mg-p / mg-note2) ---------- */
.mc-body { display: flex; flex-direction: column; gap: 16px; }
.mg-h3.mc-title { margin: 0; font-size: 26px; line-height: 1.05; }
.mg-p.mc-sub { margin-top: -6px; letter-spacing: .3px; }
.mg-note2.mc-meta, .mg-note2.mc-label { margin: 0; font-size: 14px; color: var(--mc-muted); }
.mg-note2.mc-legal { margin: 0; font-size: 13px; line-height: 1.45; color: var(--mc-muted); text-align: center; }
.mg-note2.mc-legal a { color: var(--mc-ink); }
.mc-center { text-align: center; }

/* ---------- Antworten auf Basis von .mg-items / .mg-item ---------- */
.mg-items.mc-items--list { grid-template-columns: 1fr; }
.mg-item.mc-opt {
  width: 100%; min-height: 56px; padding-top: 0; padding-bottom: 0;
  border: 1.5px solid var(--mc-line);
  font-size: 15px; text-align: left; cursor: pointer;
}
.mg-item.mc-opt:hover { border-color: var(--mc-ink); transform: translateY(-1px); }
.mg-item.mc-opt.is-selected { border-color: var(--mc-ink); box-shadow: inset 0 0 0 1px var(--mc-ink), var(--mc-ring); }
.mc-opt__main { font-size: 16px; font-weight: 700; }
.mc-opt__desc, .mc-opt__size { font-weight: 400; color: var(--mc-muted); }
.mc-opt__size { margin-left: auto; }
.mg-ic.mc-opt__check { display: none; margin-left: auto; width: 26px; height: 26px; flex-basis: 26px; border-radius: 8px; color: var(--mc-orange); }
.mc-opt__size + .mc-opt__check { margin-left: 0; }
.mc-opt.is-selected .mc-opt__check { display: flex; }

/* „Andere" als Eingabefeld in einer .mg-item-Kachel */
.mg-item.mc-other { padding: 0 6px 0 0; min-height: 56px; border: 1.5px solid var(--mc-line); cursor: text; }
.mg-item.mc-other:hover { border-color: var(--mc-ink); }
.mg-item.mc-other:focus-within { border-color: var(--mc-ink); box-shadow: inset 0 0 0 1px var(--mc-ink), var(--mc-ring); }
.mc-other input { flex: 1; min-width: 0; height: 52px; border: 0; background: transparent; padding: 0 16px; font: inherit; color: inherit; outline: none; }
.mc-other input::placeholder { color: var(--mc-ink); opacity: 1; }
.mc-other input:focus::placeholder { color: rgba(12, 12, 11, .45); font-weight: 400; }
.mg-ic.mc-other__go { display: none; width: 40px; height: 40px; flex-basis: 40px; border: 0; border-radius: 12px; color: var(--mc-orange); cursor: pointer; }
.mc-other.has-value .mc-other__go { display: flex; }

/* ---------- Formular (mg-form-grid / mg-f / mg-in is-l) ---------- */
.mg-form-grid.mc-fields { gap: 12px; }
.mg-in.is-l.mc-input { width: 100%; height: 48px; }
.mg-in.is-l.mc-select { width: 100%; height: 44px; padding: 0 10px; }
.mg-in.is-l:focus { outline: none; border-color: var(--mc-ink); box-shadow: inset 0 0 0 1px var(--mc-ink), var(--mc-ring); }
.mg-in.is-l::placeholder { color: rgba(12, 12, 11, .45); }
.mg-in.is-l[aria-invalid="true"] { border-color: var(--mc-error); box-shadow: inset 0 0 0 1px var(--mc-error); }
.mc-error { margin: 0; font-size: 13px; color: var(--mc-error); }
.mc-error:empty { display: none; }
.mc-form-error { margin: 0; padding: 10px 12px; border-radius: 12px; background: #FDECEA; color: var(--mc-error); font-size: 14px; }
.mc-form-error:empty { display: none; }

.mg-card.mc-summary { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: 16px; background-color: rgba(12, 12, 11, .04); }
.mc-summary__grid { display: grid; grid-template-columns: .8fr 1.3fr 1fr; gap: 8px; }

/* Buttons: vorhandene Klassen, nur auf volle Breite gezogen */
.button-rainbow.mc-full { width: 100%; height: 54px; }
.button-rainbow[disabled] { opacity: .6; cursor: progress; transform: none; }
.mg-ghost.mc-full { width: 100%; height: 50px; margin-top: 0; justify-content: center; align-items: center; align-self: stretch; }

/* ---------- Danke ---------- */
.mg-ic.mc-done-icon { width: 56px; height: 56px; flex-basis: 56px; border-radius: 16px; color: var(--mc-orange); }
.mc-divider { border: 0; border-top: 1px solid var(--mc-line); margin: 4px 0 0; }

/* ---------- Fokus & Bewegung ---------- */
.mc-dialog :focus-visible { outline: 3px solid var(--mc-orange); outline-offset: 2px; }
.mc-other input:focus-visible, .mc-dialog .mg-in:focus-visible { outline: none; }
.mc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) {
  .mc-overlay, .mc-dialog, .mc-opt, .mc-progress__seg, .button-rainbow { transition: none; }
}

/* ---------- Mobile: Bottom Sheet, Kontakt im Vollbild ---------- */
@media (max-width: 600px) {
  .mc-overlay { align-items: flex-end; padding: 0; }
  .mg-frame.mc-dialog {
    max-width: none; max-height: 92dvh;
    border-radius: 24px 24px 0 0;
    padding: 16px 20px calc(24px + env(safe-area-inset-bottom, 0px));
    gap: 16px; transform: translateY(40px);
  }
  .mg-frame.mc-dialog.mc-dialog--full { height: 100dvh; max-height: 100dvh; border-radius: 0; padding-top: calc(12px + env(safe-area-inset-top, 0px)); }
  .mc-dialog--full .mc-submit-area { margin-top: auto; }
  .mg-h3.mc-title { font-size: 22px; }
  .mg-form-grid.mc-fields, .mc-summary__grid { grid-template-columns: 1fr; }
}

/* ---------- Calendly-Popup über dem Migrations-Check ---------- */
.mc-overlay { z-index: 9990; }
.calendly-overlay { z-index: 10000 !important; }
.mg-ghost.mc-full { cursor: pointer; background: transparent; }
.mg-ghost.mc-full[disabled] { opacity: .6; cursor: progress; }

/* Hinweis unter einem Formularfeld */
.mg-note2.mc-field-hint { margin: 2px 0 0; font-size: 12.5px; line-height: 1.45; }

/* Hinweis, wenn vor dem Öffnen noch kein Shopsystem gewählt ist */
.mc-attention { outline: 2px solid #FF4F1A !important; outline-offset: 3px; transition: outline-color .3s; }
