.form-success-modal {
    box-sizing: border-box;
    width: 100vw;
    max-width: none;
    height: 100%;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: 24px;
    border: 0;
    background: transparent;
    color: var(--brand-ink, #323842);
    overflow: auto;
}

.form-success-modal[open] {
    display: grid;
    place-items: center;
}

.form-success-modal::backdrop {
    background: rgba(24, 28, 35, 0.68);
    backdrop-filter: blur(3px);
}

.form-success-modal.is-fallback-open {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(24, 28, 35, 0.68);
}

body.has-form-success-modal-fallback {
    overflow: hidden;
}

.form-success-modal__panel {
    position: relative;
    width: min(100%, 540px);
    box-sizing: border-box;
    padding: clamp(32px, 6vw, 52px);
    border-radius: 28px;
    background: var(--brand-surface, #ffffff);
    box-shadow: 0 28px 80px rgba(20, 25, 34, 0.28);
    text-align: center;
    animation: form-success-modal-enter 180ms ease-out both;
}

.form-success-modal__icon-close {
    position: absolute;
    top: 16px;
    right: 16px;
    display: grid;
    width: 44px;
    height: 44px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: currentColor;
    cursor: pointer;
}

.form-success-modal__icon-close:hover,
.form-success-modal__icon-close:focus-visible {
    background: rgba(50, 56, 66, 0.08);
}

.form-success-modal__icon-close svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 1.8;
}

.form-success-modal__success-icon {
    display: grid;
    width: 72px;
    height: 72px;
    margin: 0 auto 24px;
    place-items: center;
    border-radius: 50%;
    background: var(--brand-accent, #f4d31f);
    color: var(--brand-cta-text, #323842);
}

.form-success-modal__success-icon svg {
    width: 34px;
    height: 34px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.4;
}

.form-success-modal__panel h2 {
    max-width: 430px;
    margin: 0 auto 14px;
    color: inherit;
    font: inherit;
    font-size: clamp(1.65rem, 5vw, 2.1rem);
    font-weight: 700;
    line-height: 1.2;
}

.form-success-modal__panel p {
    max-width: 430px;
    margin: 0 auto 28px;
    color: color-mix(in srgb, currentColor 72%, transparent);
    font-size: 1rem;
    line-height: 1.6;
}

.form-success-modal__button {
    min-width: 160px;
    min-height: 50px;
    padding: 13px 28px;
    border: 0;
    border-radius: 999px;
    background: var(--brand-accent, #f4d31f);
    color: var(--brand-cta-text, #323842);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: filter 140ms ease, transform 140ms ease;
}

.form-success-modal__button:hover {
    filter: brightness(1.04);
    transform: translateY(-1px);
}

.form-success-modal__button:focus-visible,
.form-success-modal__icon-close:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--brand-accent, #f4d31f) 75%, #235db8);
    outline-offset: 3px;
}

@keyframes form-success-modal-enter {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.985);
    }

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

@media (max-width: 540px) {
    .form-success-modal {
        padding: 16px;
    }

    .form-success-modal__panel {
        padding: 38px 24px 28px;
        border-radius: 22px;
    }

    .form-success-modal__success-icon {
        width: 64px;
        height: 64px;
        margin-bottom: 20px;
    }

    .form-success-modal__button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .form-success-modal__panel {
        animation: none;
    }

    .form-success-modal__button {
        transition: none;
    }
}
