/*
 * Confirmation pages ("Danke-Seiten", 25.11.2026, Baymard #596/#891/#545/#707).
 *
 * Single source for:
 *  - the shared contact thank-you element (tt_content 4270, referenced by every
 *    /kontakt/danke-seite via shortcut) -> classes set in the RTE markup
 *  - shop BasketOrder/Success.html
 * Signature/Complete.html (jkr_docusign_shop) keeps its own inline copy of the
 * .abschluss-ablauf rules; keep both in sync.
 *
 * Rules: the text is visible immediately and never waits for the animation;
 * only the check mark draws itself once (< 1 s); reduced motion -> static.
 */

/* Wrapper of the RTE element */
.abschluss {
    max-width: 38rem;
    margin: 0 auto;
}

/* Headline with drawn check mark above it (RTE markup: h1/h2.abschluss-titel) */
.abschluss-titel {
    position: relative;
    text-align: center;
    padding-top: 88px;
    margin-bottom: 1rem;
}
.abschluss-titel::before,
.abschluss-titel::after {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 72px;
    height: 72px;
    margin-left: -36px;
}
.abschluss-titel::before {
    border-radius: 50%;
    background: #198754;
}
.abschluss-titel::after {
    background: no-repeat center / 38px 38px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    clip-path: inset(0 100% 0 0);
    animation: abschlussHakenZeichnen .5s .15s ease-out forwards;
}
@keyframes abschlussHakenZeichnen {
    to { clip-path: inset(0 0 0 0); }
}

.abschluss-lead {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 1.75rem;
}

.abschluss-zwischen {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

/* Numbered steps from plain RTE <ol> markup (no extra spans needed) */
.abschluss-schritte {
    list-style: none;
    counter-reset: abschluss;
    margin: 0 0 1.5rem;
    padding: 0;
}
.abschluss-schritte li {
    counter-increment: abschluss;
    position: relative;
    padding: 0 0 1rem 2.875rem;
    min-height: 2.5rem;
}
.abschluss-schritte li::before {
    content: counter(abschluss);
    position: absolute;
    left: 0;
    top: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: 2px solid #dee2e6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .85rem;
    color: #6c757d;
    background: #fff;
}
.abschluss-schritte li:first-child::before {
    background: #212529;
    border-color: #212529;
    color: #fff;
}
.abschluss-schritte li:not(:last-child)::after {
    content: "";
    position: absolute;
    left: calc(1rem - 1px);
    top: 2.1rem;
    bottom: .2rem;
    width: 2px;
    background: #dee2e6;
}
.abschluss-schritte strong {
    display: block;
}

/* Template markup (Success.html), same look as Signature/Complete.html */
.abschluss-kopf {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.abschluss-haken {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #198754;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.abschluss-haken polyline {
    stroke-dasharray: 30;
    stroke-dashoffset: 30;
    animation: abschlussZeichnen .5s .15s ease-out forwards;
}
@keyframes abschlussZeichnen {
    to { stroke-dashoffset: 0; }
}
.abschluss-ablauf {
    list-style: none;
    margin: 0 auto 1.5rem;
    padding: 0;
    max-width: 34rem;
    text-align: left;
    display: grid;
}
.abschluss-ablauf li {
    display: grid;
    grid-template-columns: 2rem 1fr;
    column-gap: .875rem;
    padding-bottom: 1rem;
    position: relative;
}
.abschluss-ablauf li:not(:last-child)::after {
    content: "";
    position: absolute;
    left: calc(1rem - 1px);
    top: 2.1rem;
    bottom: .2rem;
    width: 2px;
    background: #dee2e6;
}
.abschluss-nr {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: 2px solid #dee2e6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .85rem;
    color: #6c757d;
}
.abschluss-ablauf li:first-child .abschluss-nr {
    background: #212529;
    border-color: #212529;
    color: #fff;
}
.abschluss-ablauf strong {
    display: block;
}
.abschluss-ablauf .abschluss-detail {
    color: #6c757d;
    font-size: .95rem;
}

/* Calm box: "nothing else to do" + phone */
.abschluss-ruhig {
    max-width: 38rem;
    margin: 0 auto 1.5rem;
    text-align: left;
    background: #f1f3f5;
    border-radius: .5rem;
    padding: .875rem 1rem;
}
.abschluss-ruhig p {
    margin: 0;
}

/* Order overview on Success.html */
.abschluss-uebersicht {
    max-width: 38rem;
    margin: 0 auto 1.5rem;
    text-align: left;
}

@media (prefers-reduced-motion: reduce) {
    .abschluss-titel::after {
        animation: none;
        clip-path: none;
    }
    .abschluss-haken polyline {
        animation: none;
        stroke-dashoffset: 0;
    }
}
