﻿.mfcpk-module {
    --mfcpk-text: #182233;
    --mfcpk-muted: #5f6f82;
    --mfcpk-line: rgba(72, 99, 126, 0.18);
    --mfcpk-blue: #1477d4;
    --mfcpk-blue-dark: #075da9;
    --mfcpk-focus: rgba(20, 119, 212, 0.24);
    margin-top: 28px;
    scroll-margin-top: 120px;
}

.mfcpk-jump {
    display: flex;
    justify-content: center;
    margin: 26px 0 34px;
}

.mfcpk-jump__button,
.mfcpk-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 26px;
    border: 0;
    border-radius: 15px;
    background: linear-gradient(135deg, #1685e6, #6c5ce7);
    box-shadow: 0 12px 28px rgba(55, 104, 190, 0.25);
    color: #ffffff !important;
    font: inherit;
    font-weight: 800;
    text-align: center;
    text-decoration: none !important;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}

.mfcpk-jump__button:hover,
.mfcpk-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(55, 104, 190, 0.32);
    filter: saturate(1.08);
}

.mfcpk-jump__button:focus-visible,
.mfcpk-submit:focus-visible,
.mfcpk-control:focus-visible,
.mfcpk-checkbox input:focus-visible {
    outline: 3px solid var(--mfcpk-focus);
    outline-offset: 3px;
}

.mfcpk-card {
    position: relative;
    overflow: hidden;
    padding: clamp(22px, 4vw, 42px);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 24px;
    background:
        radial-gradient(circle at 4% 12%, rgba(114, 195, 255, 0.28), transparent 34%),
        radial-gradient(circle at 96% 90%, rgba(255, 174, 196, 0.22), transparent 34%),
        linear-gradient(135deg, rgba(248, 253, 255, 0.94), rgba(246, 242, 255, 0.92));
    box-shadow:
        0 22px 60px rgba(46, 73, 104, 0.13),
        inset 0 1px 0 rgba(255, 255, 255, 0.78);
    scroll-margin-top: 115px;
}

.mfcpk-card::before {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.22) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.22) 1px, transparent 1px);
    background-size: 28px 28px;
    content: "";
    opacity: 0.3;
    pointer-events: none;
}

.mfcpk-card__intro,
.mfcpk-form-shell {
    position: relative;
    z-index: 1;
}

.mfcpk-card__intro {
    max-width: 780px;
    margin-bottom: 28px;
}

.mfcpk-card__eyebrow,
.mfcpk-success__eyebrow {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--mfcpk-blue-dark);
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.mfcpk-card__title {
    margin: 0 0 12px;
    color: var(--mfcpk-text);
    font-size: clamp(1.65rem, 4vw, 2.35rem);
    line-height: 1.12;
}

.mfcpk-card__description {
    margin: 0;
    color: var(--mfcpk-muted);
    font-size: 1rem;
    line-height: 1.65;
}

.mfcpk-form {
    padding: clamp(20px, 3vw, 30px);
    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 16px 44px rgba(57, 83, 111, 0.1);
    backdrop-filter: blur(16px);
}

.mfcpk-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.mfcpk-field {
    min-width: 0;
}

.mfcpk-field--wide {
    grid-column: 1 / -1;
}

.mfcpk-label {
    display: block;
    margin-bottom: 8px;
    color: var(--mfcpk-text);
    font-weight: 800;
}

.mfcpk-label span {
    color: #d92d20;
}

.mfcpk-control {
    box-sizing: border-box;
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    border: 1px solid var(--mfcpk-line);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--mfcpk-text);
    font: inherit;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.mfcpk-control::placeholder {
    color: #98a2b3;
}

.mfcpk-control:focus {
    border-color: rgba(20, 119, 212, 0.7);
    box-shadow: 0 0 0 4px var(--mfcpk-focus);
    background: #ffffff;
    outline: 0;
}

.mfcpk-control--error {
    border-color: #d92d20 !important;
    box-shadow: 0 0 0 3px rgba(217, 45, 32, 0.12);
}

.mfcpk-select {
    cursor: pointer;
}

.mfcpk-textarea {
    min-height: 142px;
    resize: vertical;
}

.mfcpk-hint,
.mfcpk-required-note {
    display: block;
    margin-top: 7px;
    color: var(--mfcpk-muted);
    font-size: 0.82rem;
}

.mfcpk-error {
    display: block;
    min-height: 1.1em;
    margin-top: 6px;
    color: #b42318;
    font-size: 0.82rem;
    font-weight: 700;
}

.mfcpk-consents {
    display: grid;
    gap: 10px;
    margin: 22px 0;
}

.mfcpk-checkbox {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    color: var(--mfcpk-text);
    line-height: 1.5;
    cursor: pointer;
}

.mfcpk-checkbox input {
    width: 19px;
    height: 19px;
    margin: 2px 0 0;
    accent-color: var(--mfcpk-blue);
}

.mfcpk-checkbox a {
    color: var(--mfcpk-blue-dark);
    font-weight: 800;
}

.mfcpk-captcha-wrap {
    margin: 22px 0;
}

.mfcpk-submit {
    width: 100%;
    min-height: 56px;
}

.mfcpk-submit:disabled {
    cursor: wait;
    filter: grayscale(0.15);
    opacity: 0.78;
    transform: none;
}

.mfcpk-spinner {
    display: none;
    width: 18px;
    height: 18px;
    margin-left: 10px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: mfcpk-spin 0.8s linear infinite;
}

.mfcpk-submit.is-loading .mfcpk-spinner {
    display: inline-block;
}

.mfcpk-form__status {
    margin: 10px 0;
    font-weight: 700;
}

.mfcpk-form__status--error {
    padding: 12px 14px;
    border: 1px solid rgba(217, 45, 32, 0.2);
    border-radius: 12px;
    background: rgba(254, 228, 226, 0.72);
    color: #b42318;
}

.mfcpk-success {
    padding: clamp(28px, 5vw, 52px);
    border: 1px solid rgba(12, 133, 87, 0.18);
    border-radius: 22px;
    background:
        radial-gradient(circle at 10% 10%, rgba(50, 213, 131, 0.17), transparent 34%),
        rgba(255, 255, 255, 0.88);
    text-align: center;
    box-shadow: 0 18px 46px rgba(31, 97, 76, 0.12);
    outline: 0;
}

.mfcpk-success__icon {
    display: grid;
    place-items: center;
    width: 68px;
    height: 68px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #12b76a, #039855);
    box-shadow: 0 12px 30px rgba(18, 183, 106, 0.25);
    color: #ffffff;
    font-size: 38px;
    font-weight: 900;
}

.mfcpk-success__title {
    margin: 0 0 12px;
    color: #12372a;
    font-size: clamp(1.7rem, 4vw, 2.35rem);
}

.mfcpk-success__number,
.mfcpk-success__program,
.mfcpk-success__text {
    max-width: 680px;
    margin: 12px auto;
    color: #38584c;
    line-height: 1.6;
}

.mfcpk-success__number strong {
    color: #067647;
    font-size: 1.25rem;
}

.mfcpk-honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

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

@media (max-width: 720px) {
    .mfcpk-grid {
        grid-template-columns: 1fr;
    }

    .mfcpk-field--wide {
        grid-column: auto;
    }

    .mfcpk-card {
        padding: 16px;
        border-radius: 19px;
    }

    .mfcpk-form {
        padding: 17px;
        border-radius: 16px;
    }

    .mfcpk-jump__button {
        width: 100%;
    }

    .smart-captcha {
        max-width: 100%;
        overflow: hidden;
    }
}

html.dark-theme .mfcpk-card,
body.dark-theme .mfcpk-card {
    --mfcpk-text: #eff5fb;
    --mfcpk-muted: #b7c4d2;
    --mfcpk-line: rgba(255, 255, 255, 0.16);
    background:
        radial-gradient(circle at 4% 12%, rgba(29, 118, 185, 0.26), transparent 34%),
        radial-gradient(circle at 96% 90%, rgba(125, 72, 139, 0.24), transparent 34%),
        linear-gradient(135deg, rgba(24, 34, 47, 0.96), rgba(31, 29, 48, 0.94));
}

html.dark-theme .mfcpk-form,
body.dark-theme .mfcpk-form {
    background: rgba(20, 28, 39, 0.82);
}

html.dark-theme .mfcpk-control,
body.dark-theme .mfcpk-control {
    background: rgba(17, 24, 34, 0.9);
    color: #f8fafc;
}

html.dark-theme .mfcpk-success,
body.dark-theme .mfcpk-success {
    background: rgba(18, 42, 35, 0.9);
}

/* v1.2: поддержка разных вариантов переключателя тёмной темы сайта */
:is(
    html.dark,
    html.dark-theme,
    html.theme-dark,
    html[data-theme="dark"],
    body.dark,
    body.dark-theme,
    body.theme-dark,
    body[data-theme="dark"],
    body.visually-impaired-dark
) .mfcpk-card {
    --mfcpk-text: #f2f6fb;
    --mfcpk-muted: #bdc9d6;
    --mfcpk-line: rgba(255, 255, 255, 0.18);
    background:
        radial-gradient(circle at 4% 12%, rgba(29, 118, 185, 0.28), transparent 34%),
        radial-gradient(circle at 96% 90%, rgba(125, 72, 139, 0.26), transparent 34%),
        linear-gradient(135deg, rgba(19, 29, 42, 0.97), rgba(31, 27, 47, 0.96));
    border-color: rgba(255, 255, 255, 0.12);
}

:is(
    html.dark,
    html.dark-theme,
    html.theme-dark,
    html[data-theme="dark"],
    body.dark,
    body.dark-theme,
    body.theme-dark,
    body[data-theme="dark"],
    body.visually-impaired-dark
) .mfcpk-form {
    background: rgba(16, 24, 35, 0.88);
    border-color: rgba(255, 255, 255, 0.11);
}

:is(
    html.dark,
    html.dark-theme,
    html.theme-dark,
    html[data-theme="dark"],
    body.dark,
    body.dark-theme,
    body.theme-dark,
    body[data-theme="dark"],
    body.visually-impaired-dark
) .mfcpk-control {
    background: rgba(12, 20, 31, 0.94);
    border-color: rgba(255, 255, 255, 0.17);
    color: #f8fafc;
}

:is(
    html.dark,
    html.dark-theme,
    html.theme-dark,
    html[data-theme="dark"],
    body.dark,
    body.dark-theme,
    body.theme-dark,
    body[data-theme="dark"],
    body.visually-impaired-dark
) .mfcpk-control::placeholder {
    color: #8291a3;
}

:is(
    html.dark,
    html.dark-theme,
    html.theme-dark,
    html[data-theme="dark"],
    body.dark,
    body.dark-theme,
    body.theme-dark,
    body[data-theme="dark"],
    body.visually-impaired-dark
) .mfcpk-success {
    background: rgba(15, 43, 34, 0.94);
    border-color: rgba(80, 220, 155, 0.22);
}

.mfcpk-smartcaptcha {
    min-height: 102px;
}

/* v1.3: корректная карточка успешной отправки */

.mfcpk-success__title {
    width: 100%;
    margin: 18px auto 14px;
    text-align: center;
}

.mfcpk-success__eyebrow,
.mfcpk-success__number,
.mfcpk-success__program,
.mfcpk-success__text {
    text-align: center;
}

:is(
    html.dark,
    html.dark-theme,
    html.theme-dark,
    html[data-theme="dark"],
    body.dark,
    body.dark-theme,
    body.theme-dark,
    body[data-theme="dark"],
    body.visually-impaired-dark
) .mfcpk-success__title {
    color: #ecfff6;
}

:is(
    html.dark,
    html.dark-theme,
    html.theme-dark,
    html[data-theme="dark"],
    body.dark,
    body.dark-theme,
    body.theme-dark,
    body[data-theme="dark"],
    body.visually-impaired-dark
) .mfcpk-success__eyebrow {
    color: #9ce9c4;
}

:is(
    html.dark,
    html.dark-theme,
    html.theme-dark,
    html[data-theme="dark"],
    body.dark,
    body.dark-theme,
    body.theme-dark,
    body[data-theme="dark"],
    body.visually-impaired-dark
) .mfcpk-success__number,
:is(
    html.dark,
    html.dark-theme,
    html.theme-dark,
    html[data-theme="dark"],
    body.dark,
    body.dark-theme,
    body.theme-dark,
    body[data-theme="dark"],
    body.visually-impaired-dark
) .mfcpk-success__program,
:is(
    html.dark,
    html.dark-theme,
    html.theme-dark,
    html[data-theme="dark"],
    body.dark,
    body.dark-theme,
    body.theme-dark,
    body[data-theme="dark"],
    body.visually-impaired-dark
) .mfcpk-success__text {
    color: #d2e8df;
}

/* v1.4: выравнивание успешной карточки и увеличение подписи МФЦПК */

/* Верхняя синяя подпись МФЦПК */
.mfcpk-eyebrow,
.mfcpk-card__eyebrow,
.mfcpk-module__eyebrow {
    font-size: 18px;
    line-height: 1.2;
    font-weight: 900;
    letter-spacing: 0.14em;
}

/* Вся текстовая часть результата строго по оси карточки */
.mfcpk-success__number,
.mfcpk-success__program,
.mfcpk-success__text {
    display: block;
    width: 100%;
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
    text-align: center !important;
    box-sizing: border-box;
}

/* Номер заявки */
.mfcpk-success__number {
    margin-top: 0;
    margin-bottom: 22px;
}

/* Название программы */
.mfcpk-success__program {
    margin-top: 0;
    margin-bottom: 24px;
    padding-left: 20px;
    padding-right: 20px;
}

/* Нижнее пояснение */
.mfcpk-success__text {
    margin-top: 0;
    margin-bottom: 0;
    padding-left: 20px;
    padding-right: 20px;
    line-height: 1.65;
}

/* На телефонах не даём длинной программе упираться в края */
@media (max-width: 700px) {
    .mfcpk-eyebrow,
    .mfcpk-card__eyebrow,
    .mfcpk-module__eyebrow {
        font-size: 16px;
    }

    .mfcpk-success__program,
    .mfcpk-success__text {
        max-width: 100%;
        padding-left: 10px;
        padding-right: 10px;
    }
}