/* Thank-you dialog shown after any lead form is sent (footer.php, hb-thank-you.js).
   Base rules are the finished state; .is-playing runs the check animation from
   the start, so a missing class or reduced motion still shows a complete check. */

dialog.hb-modal--thanks {
    max-width: 400px;
    text-align: center;
}

.hb-modal--thanks .hb-modal__body {
    padding: 44px 32px 32px;
}

.hb-thanks__check {
    display: block;
    width: 96px;
    height: 96px;
    margin: 0 auto 22px;
    overflow: visible;
}

.hb-thanks__ring {
    fill: none;
    stroke: var(--success_bright);
    stroke-width: 4;
    stroke-dasharray: 277;
    stroke-dashoffset: 0;
    transform: rotate(-90deg);
    transform-origin: 48px 48px;
}

.hb-thanks__fill {
    fill: var(--success_bright);
    transform-origin: 48px 48px;
}

.hb-thanks__tick {
    fill: none;
    stroke: #fff;
    stroke-width: 6;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 60;
    stroke-dashoffset: 0;
}

.hb-thanks__title {
    margin: 0 0 8px;
    font-family: var(--heading-font, "Inter", sans-serif);
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.25;
    color: var(--accent);
}

.hb-thanks__text {
    margin: 0 0 6px;
    color: var(--text);
    line-height: 1.6;
}

.hb-thanks__call {
    margin: 0 0 24px;
    font-size: .92rem;
    color: var(--text_muted);
}

.hb-thanks__call a {
    color: var(--accent);
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.hb-thanks__done {
    width: 100%;
    justify-content: center;
}

/* ── Playback ── */
dialog.hb-modal--thanks.is-playing[open] {
    animation: hbt-dialog .32s cubic-bezier(.2, .9, .3, 1.15) both;
}

.is-playing .hb-thanks__check {
    animation: hbt-pop .38s cubic-bezier(.3, 1.6, .5, 1) 1.2s both;
}

.is-playing .hb-thanks__ring {
    animation: hbt-ring .6s cubic-bezier(.65, 0, .35, 1) .15s both;
}

.is-playing .hb-thanks__fill {
    animation: hbt-fill .34s cubic-bezier(.3, 1.45, .6, 1) .7s both;
}

.is-playing .hb-thanks__tick {
    animation: hbt-tick .34s cubic-bezier(.65, 0, .35, 1) .92s both;
}

.is-playing .hb-thanks__reveal {
    animation: hbt-reveal .4s ease-out 1.05s both;
}

@keyframes hbt-dialog {
    from { opacity: 0; transform: translateY(12px) scale(.94); }
    to   { opacity: 1; transform: none; }
}

@keyframes hbt-ring {
    from { stroke-dashoffset: 277; }
    to   { stroke-dashoffset: 0; }
}

@keyframes hbt-fill {
    from { transform: scale(0); }
    to   { transform: scale(1); }
}

@keyframes hbt-tick {
    from { stroke-dashoffset: 60; }
    to   { stroke-dashoffset: 0; }
}

@keyframes hbt-pop {
    0%   { transform: scale(1); }
    45%  { transform: scale(1.08); }
    100% { transform: scale(1); }
}

@keyframes hbt-reveal {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    dialog.hb-modal--thanks.is-playing[open],
    .is-playing .hb-thanks__check,
    .is-playing .hb-thanks__ring,
    .is-playing .hb-thanks__fill,
    .is-playing .hb-thanks__tick,
    .is-playing .hb-thanks__reveal {
        animation: none;
    }
}

@media (max-width: 480px) {
    dialog.hb-modal--thanks {
        max-width: calc(100% - 32px);
    }

    .hb-modal--thanks .hb-modal__body {
        padding: 40px 22px 24px;
    }
}
