.nxml-form-wrap,
.nxml-form-wrap * { box-sizing: border-box; }

.nxml-form-wrap {
    --nxml-primary: #6c4cf1;
    --nxml-button-text: #fff;
    --nxml-bg: #fff;
    --nxml-text: #18181b;
    --nxml-muted: #60646c;
    --nxml-border: #dfe1e6;
    --nxml-input-bg: #fff;
    --nxml-radius: 14px;
    --nxml-max-width: 760px;
    width: 100%;
    max-width: var(--nxml-max-width);
    margin: 0 auto;
    color: var(--nxml-text);
    font: inherit;
}

.nxml-form {
    position: relative;
    width: 100%;
    margin: 0;
    color: inherit;
}

.nxml-layout--card .nxml-form {
    padding: clamp(22px, 4vw, 42px);
    border: 1px solid var(--nxml-border);
    border-radius: var(--nxml-radius);
    background: var(--nxml-bg);
}

.nxml-layout--minimal .nxml-form {
    padding: 10px 0;
    background: transparent;
}

.nxml-layout--split .nxml-form {
    display: grid;
    grid-template-columns: minmax(0, .78fr) minmax(320px, 1.22fr);
    overflow: hidden;
    border: 1px solid var(--nxml-border);
    border-radius: var(--nxml-radius);
    background: var(--nxml-bg);
}

.nxml-layout--split .nxml-form__intro {
    padding: clamp(28px, 5vw, 52px);
    background: color-mix(in srgb, var(--nxml-primary) 11%, var(--nxml-bg));
    border-right: 1px solid var(--nxml-border);
}

.nxml-layout--split .nxml-form__body {
    padding: clamp(28px, 5vw, 52px);
}

.nxml-form__intro { margin: 0 0 22px; }
.nxml-layout--split .nxml-form__intro { margin: 0; }

.nxml-form__heading {
    margin: 0;
    color: var(--nxml-text);
    font: inherit;
    font-size: clamp(1.45rem, 3vw, 2.25rem);
    font-weight: 750;
    line-height: 1.08;
    letter-spacing: -.035em;
}

.nxml-form__description {
    margin-top: 12px;
    color: var(--nxml-muted);
    font-size: .98rem;
    line-height: 1.55;
}

.nxml-form__description p { margin: 0 0 8px; }
.nxml-form__description p:last-child { margin-bottom: 0; }

.nxml-form__fields {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 0 -7px;
}

.nxml-input-group {
    position: relative;
    flex: 0 0 calc(100% - 14px);
    width: calc(100% - 14px);
    margin: 0 7px;
}
.nxml-width--50 { flex-basis: calc(50% - 14px); width: calc(50% - 14px); }
.nxml-width--33 { flex-basis: calc(33.333% - 14px); width: calc(33.333% - 14px); }

.nxml-input-group label {
    display: block;
    margin: 0 0 7px;
    color: var(--nxml-text);
    font-size: .86rem;
    font-weight: 650;
    line-height: 1.3;
}

.nxml-input-group label i,
.nxml-consent__text i {
    color: var(--nxml-primary);
    font-style: normal;
}

.nxml-form--compact-labels .nxml-input-group label {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.nxml-input-group input {
    display: block;
    width: 100%;
    min-height: 50px;
    margin: 0;
    padding: 12px 15px;
    color: var(--nxml-text);
    background: var(--nxml-input-bg);
    border: 1px solid var(--nxml-border);
    border-radius: max(4px, calc(var(--nxml-radius) * .62));
    box-shadow: none;
    outline: none;
    font: inherit;
    font-size: 16px;
    line-height: 1.3;
    transition: border-color .16s ease, outline-color .16s ease, background-color .16s ease;
    appearance: none;
}

.nxml-input-group input::placeholder { color: color-mix(in srgb, var(--nxml-muted) 70%, transparent); }
.nxml-input-group input:hover { border-color: color-mix(in srgb, var(--nxml-border) 45%, var(--nxml-text)); }
.nxml-input-group input:focus {
    border-color: var(--nxml-primary);
    outline: 3px solid color-mix(in srgb, var(--nxml-primary) 18%, transparent);
    outline-offset: 0;
}
.nxml-input-group.is-invalid input { border-color: #c62828; }
.nxml-input-group.is-invalid input:focus { outline-color: rgba(198, 40, 40, .15); }

.nxml-input-error {
    display: block;
    min-height: 0;
    margin-top: 5px;
    color: #b42318;
    font-size: .78rem;
    line-height: 1.3;
}

.nxml-form__consents {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.nxml-consent {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 9px;
    align-items: start;
    margin: 0;
    cursor: pointer;
}

.nxml-consent > input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.nxml-consent__box {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    border: 1px solid var(--nxml-border);
    border-radius: max(3px, calc(var(--nxml-radius) * .3));
    background: var(--nxml-input-bg);
    transition: background .15s ease, border-color .15s ease, outline-color .15s ease;
}
.nxml-consent__box svg { width: 14px; height: 14px; fill: none; stroke: var(--nxml-button-text); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(.7); transition: .15s ease; }
.nxml-consent > input:checked + .nxml-consent__box { background: var(--nxml-primary); border-color: var(--nxml-primary); }
.nxml-consent > input:checked + .nxml-consent__box svg { opacity: 1; transform: scale(1); }
.nxml-consent > input:focus-visible + .nxml-consent__box { outline: 3px solid color-mix(in srgb, var(--nxml-primary) 18%, transparent); }
.nxml-consent.is-invalid .nxml-consent__box { border-color: #c62828; outline: 2px solid rgba(198,40,40,.12); }

.nxml-consent__text {
    color: var(--nxml-muted);
    font-size: .79rem;
    line-height: 1.45;
}
.nxml-consent__text a { color: var(--nxml-text); text-decoration: underline; text-underline-offset: 2px; }

.nxml-form__actions { margin-top: 18px; }
.nxml-submit {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    min-width: 150px;
    padding: 12px 21px;
    margin: 0;
    border: 1px solid var(--nxml-primary);
    border-radius: max(4px, calc(var(--nxml-radius) * .62));
    background: var(--nxml-primary);
    color: var(--nxml-button-text);
    box-shadow: none;
    cursor: pointer;
    font: inherit;
    font-size: .95rem;
    font-weight: 720;
    line-height: 1.2;
    text-decoration: none;
    transition: filter .15s ease, transform .15s ease, opacity .15s ease;
}
.nxml-submit:hover { filter: brightness(.94); }
.nxml-submit:active { transform: translateY(1px); }
.nxml-submit:focus-visible { outline: 3px solid color-mix(in srgb, var(--nxml-primary) 22%, transparent); outline-offset: 2px; }
.nxml-submit:disabled { opacity: .7; cursor: wait; }
.nxml-submit__spinner {
    display: none;
    width: 16px;
    height: 16px;
    margin-left: 9px;
    border: 2px solid color-mix(in srgb, var(--nxml-button-text) 35%, transparent);
    border-top-color: var(--nxml-button-text);
    border-radius: 50%;
    animation: nxml-spin .7s linear infinite;
}
.nxml-form.is-loading .nxml-submit__spinner { display: inline-block; }
@keyframes nxml-spin { to { transform: rotate(360deg); } }

.nxml-form__message {
    display: none;
    margin-top: 14px;
    padding: 11px 13px;
    border-radius: max(4px, calc(var(--nxml-radius) * .5));
    font-size: .86rem;
    line-height: 1.4;
}
.nxml-form__message.is-success { display: block; color: #15603d; background: #eaf8f0; border: 1px solid #b9e6cb; }
.nxml-form__message.is-error { display: block; color: #8d211b; background: #fff0ef; border: 1px solid #f4c5c1; }

.nxml-hp { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.nxml-form-wrap.is-preview { min-width: 0; }
.nxml-form-wrap.is-preview .nxml-form { pointer-events: none; }
.nxml-form-missing { padding: 12px; border: 1px dashed #b7bcc5; }

@media (max-width: 720px) {
    .nxml-layout--split .nxml-form { grid-template-columns: 1fr; }
    .nxml-layout--split .nxml-form__intro { border-right: 0; border-bottom: 1px solid var(--nxml-border); }
    .nxml-width--33, .nxml-width--50 { flex-basis: calc(100% - 14px); width: calc(100% - 14px); }
    .nxml-submit { width: 100%; }
}
