  /* Alle Regeln mit .mvf- präfixiert, um CMS-Konflikte zu vermeiden */

  /* Explizit setzen: Templates wie YOOtheme setzen border-box global, andere
     nicht. Ohne diese Regel ändern sich Maße und damit die Optik je Template. */
  .mvf-wrap,
  .mvf-wrap *,
  .mvf-wrap *::before,
  .mvf-wrap *::after {
    box-sizing: border-box;
  }

  .mvf-wrap {
    --mvf-red: #b4032f;
    --mvf-red-pale: #f8eaed;
    --mvf-red-light: #cc1540;
    --mvf-gray-d: #727272;
    --mvf-gray-l: #75755B;
    --mvf-gray-100: #f5f5f5;
    --mvf-gray-200: #e8e8e8;
    --mvf-green: #2e7d52;
    --mvf-green-bg: #eaf5ef;
    --mvf-radius: 3px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #1a1a1a;
    /* Keine feste Breite: das Modul soll genauso breit sein wie die uebrigen
       Elemente der Seite. Eine Obergrenze setzt man bei Bedarf ueber den
       Modulparameter "Maximale Breite". */
    max-width: var(--mvf-max-width, none);
    margin: 0 auto;
    padding: 0 0 48px;
  }

  /* ── FORM CARD ── */
  .mvf-card {
    border: 1px solid var(--mvf-gray-200);
    padding: 32px 36px;
    background: #fff;
  }

  .mvf-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 22px;
  }

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

  .mvf-field label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    color: var(--mvf-gray-d);
    margin-bottom: 7px;
  }

  .mvf-field label .mvf-req {
    color: var(--mvf-red);
  }

  .mvf-field input {
    width: 100%;
    border: 1px solid var(--mvf-gray-200);
    border-radius: var(--mvf-radius);
    padding: 11px 14px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    color: #1a1a1a;
    outline: none;
    transition: border-color .2s;
    background: #fff;
    -webkit-appearance: none;
  }

  .mvf-field input:focus {
    border-color: var(--mvf-red);
  }

  .mvf-field input::placeholder {
    color: var(--mvf-gray-l);
  }

  .mvf-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: var(--mvf-red);
    color: #fff;
    border: none;
    border-radius: var(--mvf-radius);
    padding: 12px 26px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .2s, transform .1s;
  }

  .mvf-btn:hover {
    background: var(--mvf-red-light);
  }

  .mvf-btn:active {
    transform: scale(.98);
  }

  .mvf-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
  }

  .mvf-spinner {
    display: none;
    width: 13px;
    height: 13px;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: mvf-spin .7s linear infinite;
  }

  @keyframes mvf-spin {
    to {
      transform: rotate(360deg);
    }
  }

  .mvf-error {
    display: none;
    margin-top: 14px;
    background: #fdf2f4;
    border: 1px solid #e4b0ba;
    border-left: 3px solid var(--mvf-red);
    padding: 11px 15px;
    font-size: 13px;
    color: var(--mvf-red);
    border-radius: var(--mvf-radius);
  }

  /* ── RESULT ── */
  .mvf-result {
    display: none;
    margin-top: 28px;
    animation: mvf-up .4s ease both;
  }

  @keyframes mvf-up {
    from {
      opacity: 0;
      transform: translateY(12px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* ── ORDER HEADER ── */
  .mvf-order-header {
    background: var(--mvf-red-pale);
    border: 1px solid #e2b8c0;
    padding: 18px 24px;
    margin-bottom: 28px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    flex-wrap: wrap;
  }

  .mvf-order-header h3 {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-weight: 400;
    font-size: 16px;
    color: var(--mvf-red);
    margin: 0 0 6px;
  }

  .mvf-order-meta {
    font-size: 13px;
    color: var(--mvf-gray-d);
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .mvf-order-meta strong {
    color: #1a1a1a;
  }

  .mvf-badge {
    padding: 5px 13px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    border-radius: 2px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .mvf-badge-transit {
    background: #fff4e0;
    color: #a05c00;
    border: 1px solid #f5d08a;
  }

  .mvf-badge-delivered {
    background: var(--mvf-green-bg);
    color: var(--mvf-green);
    border: 1px solid #b2dcc5;
  }

  .mvf-badge-process {
    background: #eef0fb;
    color: #3a50c0;
    border: 1px solid #c0c9f0;
  }

  /* ── TIMELINE ── */
  .mvf-tl-item {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 0 14px;
    opacity: 0;
    animation: mvf-up .4s ease forwards;
  }

  .mvf-tl-item:nth-child(1) {
    animation-delay: .04s;
  }

  .mvf-tl-item:nth-child(2) {
    animation-delay: .11s;
  }

  .mvf-tl-item:nth-child(3) {
    animation-delay: .18s;
  }

  .mvf-tl-item:nth-child(4) {
    animation-delay: .25s;
  }

  .mvf-tl-item:nth-child(5) {
    animation-delay: .32s;
  }

  .mvf-spine {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .mvf-dot {
    width: 19px;
    height: 19px;
    border-radius: 50%;
    border: 2px solid var(--mvf-gray-200);
    background: #fff;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
  }

  /* Haken als SVG. Ein rotiertes L aus border-left und border-bottom hat seine
     Tinte an der linken und unteren Kante, nicht in der Box-Mitte - nach der
     Drehung sitzt der Haken deshalb sichtbar unten rechts. background-position
     center bezieht sich auf die Padding-Box und ist immer exakt zentriert. */
  .mvf-dot.done {
    background: var(--mvf-red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 6.1 5.1 8.2 9 3.8' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px 12px no-repeat;
    border-color: var(--mvf-red);
  }

  /* Laufender Zustandsschritt: Ring mit Punkt statt Haken. Der Schritt ist
     erreicht, aber noch nicht abgeschlossen. */
  .mvf-dot.laeuft {
    border-color: var(--mvf-red);
    border-width: 3px;
    background: radial-gradient(circle at 50% 50%, var(--mvf-red) 0 3.5px, #fff 3.5px);
    box-shadow: 0 0 0 4px rgba(180, 3, 47, .11);
    animation: mvf-pulse 3.2s ease-in-out infinite;
  }

  @keyframes mvf-pulse {
    0% {
      box-shadow: 0 0 0 4px rgba(180, 3, 47, 0.11);
    }

    60% {
      box-shadow: 0 0 0 12px rgba(180, 3, 47, 0);
    }

    100% {
      box-shadow: 0 0 0 4px rgba(180, 3, 47, 0.11);
    }
  }

  /* Wer Bewegung reduziert haben will, bekommt keine. Wichtig: .mvf-tl-item
     startet mit opacity 0 und wird erst von mvf-up eingeblendet. Nur die
     Animation abzuschalten wuerde die Timeline unsichtbar machen, deshalb hier
     den Endzustand direkt setzen. */
  @media (prefers-reduced-motion: reduce) {
    .mvf-dot.laeuft {
      animation: none;
    }

    .mvf-tl-item,
    .mvf-result {
      animation: none;
      opacity: 1;
      transform: none;
    }

    .mvf-spinner {
      animation-duration: 1.6s;
    }
  }

  .mvf-line {
    width: 2px;
    flex: 1;
    min-height: 28px;
    background: var(--mvf-gray-200);
  }

  .mvf-line.done {
    background: var(--mvf-red);
  }

  .mvf-content {
    padding-bottom: 28px;
  }

  .mvf-tl-item:last-child .mvf-content {
    padding-bottom: 0;
  }

  .mvf-step-label {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin-top: 1px;
    line-height: 1.2;
  }

  .mvf-step-label.pending {
    color: var(--mvf-gray-l);
    font-weight: 400;
  }

  .mvf-step-date {
    font-size: 12px;
    color: var(--mvf-gray-l);
    margin-top: 3px;
  }

  .mvf-step-note {
    font-size: 13px;
    color: var(--mvf-gray-d);
    margin-top: 7px;
    line-height: 1.5;
    background: var(--mvf-gray-100);
    padding: 8px 12px;
    border-radius: var(--mvf-radius);
  }

  /* ── CARRIER BLOCK ── */
  /* ── HEUTE-ZUSTELLUNG ── */
  .mvf-carrier {
    display: none;
    margin-top: 26px;
    padding: 16px 22px;
    border: 1px solid var(--mvf-gray-200);
    background: var(--mvf-gray-100);
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
  }

  .mvf-carrier p {
    font-size: 13px;
    color: var(--mvf-gray-d);
    margin: 0;
  }

  .mvf-carrier strong {
    font-size: 14px;
    display: block;
    color: #1a1a1a;
    margin: 2px 0;
  }

  .mvf-carrier small {
    font-size: 12px;
    color: var(--mvf-gray-l);
  }

  .mvf-btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--mvf-red);
    color: var(--mvf-red);
    background: transparent;
    border-radius: var(--mvf-radius);
    padding: 9px 18px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
    transition: background .2s, color .2s;
  }

  .mvf-btn-outline:hover {
    background: var(--mvf-red);
    color: #fff;
  }
