/* Подписка / лиды: app/themes/proxymo/views/page/tez/widgets/_lead0.html.erb
   Референс: .index-page-block11.spaced-block */

.site_subscribe_section {
    width: 100%;
    margin: 0;
    padding: 55px 0;
    background-color: color-mix(in srgb, var(--primary-color) 80%, transparent);
    background-repeat: no-repeat;
    background-position: center top;
    background-size: cover;
    box-sizing: border-box;
}

.subscribe_container_reveal.animate__animated.animate__fadeInDown {
    animation-duration: 0.7s;
    animation-fill-mode: both;
    animation-name: subscribe_container_fade_in_down;
}

@keyframes subscribe_container_fade_in_down {
    from {
        opacity: 0;
        transform: translate3d(0, -28px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.subscribe_container {
    width: 100%;
    max-width: 1170px;
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
    color: #ffffff;
    text-align: left;
}

.subscribe_container_title {
    margin: 0;
    padding: 0;
    color: #ffffff;
    font-family: var(--site-font-family);
    font-size: 30px;
    font-weight: 700;
    line-height: 1.25;
}

.subscribe_container_intro {
    margin: 10px 0 0;
    padding: 0;
    color: #ffffff;
    font-family: var(--site-font-family);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.35;
    text-transform: uppercase;
}

.subscribe_container_delimiter {
    width: 45px;
    height: 3px;
    margin: 25px 0;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.6);
}

.subscribe_form {
    width: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
}

.subscribe_form_body {
    width: 100%;
}

.subscribe_form_body .leadform_wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin: 0 -5px;
    padding: 0;
    max-width: none;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    font-family: var(--site-font-family);
}

.subscribe_form_body .leadform_wrap > h3 {
    display: none;
}

.subscribe_form_body .leadform_item:not(.btn) {
    position: relative;
    flex-grow: 1;
    flex-shrink: 1;
    flex-basis: 0;
    min-width: 0;
    margin: 0;
    padding: 5px;
    box-sizing: border-box;
}

.subscribe_form_body .leadform_item:not(.btn) + .leadform_item:not(.btn)::before {
    display: none;
}

.subscribe_form_body .leadform_item i {
    display: none;
}

.subscribe_form_body .leadform_item input[type="text"] {
    display: block;
    width: 100%;
    height: 50px;
    margin: 0;
    padding: 0 15px;
    box-sizing: border-box;
    color: #1e1e1e;
    font-family: var(--site-font-family);
    font-size: 16px;
    font-weight: 300;
    text-indent: 0;
    background: #ffffff;
    border: 0px solid #eaeaea;
    border-radius: 4px;
    box-shadow: none;
    outline: none;
}

.subscribe_form_body .leadform_item input[type="text"]:hover,
.subscribe_form_body .leadform_item input[type="text"]:focus {
    border: 1px solid #eaeaea;
    box-shadow: none;
}

.subscribe_form_body .leadform_item input[type="text"]::placeholder {
    color: #a3a3a3;
    opacity: 1;
}

.subscribe_form_body .leadform_item input[type="text"]::-webkit-input-placeholder {
    color: #a3a3a3;
    opacity: 1;
}

.subscribe_form_body .leadform_item.btn {
    flex-grow: 0;
    flex-shrink: 0;
    flex-basis: 240px;
    width: 240px;
    max-width: 100%;
    margin: 0;
    padding: 5px;
    box-sizing: border-box;
}

.subscribe_form_body .leadform_item.btn input[type="submit"] {
    display: block;
    width: 100%;
    height: 50px;
    min-height: 50px;
    min-width: 0;
    margin: 0;
    padding: 0 20px;
    box-sizing: border-box;
    color: var(--button-text-color);
    font-family: var(--site-font-family);
    font-size: 14px;
    font-weight: 700;
    line-height: 50px;
    text-indent: 0;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
    background-color: var(--button-bg-color);
    border: 0;
    border-radius: 4px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.subscribe_form_body .leadform_item.btn input[type="submit"]:hover {
    background-color: var(--button-hover-bg-color);
    color: var(--button-hover-text-color);
}

/* Успех / валидация — оставляем рабочие состояния формы */

.subscribe_form_body #leadform_success {
    display: none;
    opacity: 0;
    border-radius: 4px;
    background: #ffffff;
    transition: opacity 0.5s ease;
}

.subscribe_form_body #leadform_success.lf_visible {
    display: flex;
    min-height: 120px;
    opacity: 1;
}

.subscribe_form_body .leadform_success_wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 28px 20px;
    text-align: center;
    font-family: var(--site-font-family);
}

.subscribe_form_body .leadform_success_icon {
    width: 72px;
    height: 72px;
    margin-bottom: 16px;
}

.subscribe_form_body .lf_checkmark {
    width: 72px;
    height: 72px;
    border-radius: 50%;
}

.subscribe_form_body .lf_checkmark__circle {
    animation: lf0_stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
    stroke: #13bdf1;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
}

.subscribe_form_body .lf_checkmark__check {
    animation: lf0_stroke 0.4s cubic-bezier(0.65, 0, 0.45, 1) 0.5s forwards;
    stroke: #13bdf1;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.5;
}

@keyframes lf0_stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

.subscribe_form_body .lf_success_title {
    animation: lf0_fadein 0.4s ease 0.8s forwards;
    margin: 0 0 8px;
    color: #333333;
    font-size: 20px;
    font-weight: 700;
    opacity: 0;
    transform: translateY(10px);
}

.subscribe_form_body .lf_success_subtitle {
    animation: lf0_fadein 0.4s ease 1s forwards;
    max-width: 550px;
    margin: 0 0 18px;
    padding: 10px 14px;
    color: #2c3a4a;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    background: rgba(19, 189, 241, 0.1);
    border: 1px solid rgba(19, 189, 241, 0.25);
    border-radius: 4px;
    opacity: 0;
    transform: translateY(10px);
}

.subscribe_form_body .lf_success_subtitle .lf_eta_value {
    display: inline-block;
    margin-left: 4px;
    padding: 2px 8px;
    color: #0d4689;
    font-size: 1.18em;
    font-weight: 800;
    background: rgba(19, 189, 241, 0.18);
    border-radius: 999px;
}

.subscribe_form_body .lf_success_subtitle .lf_schedule_inline {
    margin-top: 10px;
    color: #46586b;
    font-size: 0.9em;
    font-weight: 500;
    line-height: 1.4;
}

@keyframes lf0_fadein {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.subscribe_form_body .lf_countdown_ring {
    animation: lf0_fadein 0.4s ease 1.2s forwards;
    position: relative;
    width: 60px;
    height: 60px;
    opacity: 0;
}

.subscribe_form_body .lf_ring_svg {
    width: 60px;
    height: 60px;
    transform: rotate(-90deg);
}

.subscribe_form_body .lf_ring_bg {
    fill: none;
    stroke: #eee;
    stroke-width: 3;
}

.subscribe_form_body .lf_ring_progress {
    fill: none;
    stroke: #13bdf1;
    stroke-dasharray: 119.4;
    stroke-dashoffset: 0;
    stroke-linecap: round;
    stroke-width: 3;
    transition: stroke-dashoffset 1s linear;
}

.subscribe_form_body .lf_ring_number {
    position: absolute;
    top: 50%;
    left: 50%;
    color: #0d4689;
    font-size: 18px;
    font-weight: 700;
    transform: translate(-50%, -50%);
}

.subscribe_form_body .lf_back_text {
    animation: lf0_fadein 0.4s ease 1.4s forwards;
    margin-top: 10px;
    color: #6a7683;
    font-size: 14px;
    opacity: 0;
}

.subscribe_form_body #leadform_remote_form {
    width: 100%;
    margin: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.subscribe_form_body #leadform_remote_form.lf_hiding {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.97);
}

.subscribe_form_body .leadform_item input.lf_field_error {
    box-shadow: inset 0 0 0 2px #e05252;
}

.subscribe_form_body .leadform_item input.lf_field_valid {
    box-shadow: inset 0 0 0 2px #3cb878;
}

.subscribe_form_body .leadform_item input.lf_field_error.lf_shake {
    animation: subscribe_form_shake 0.35s ease;
}

@keyframes subscribe_form_shake {
    0%,
    100% {
        transform: translateX(0);
    }

    20%,
    60% {
        transform: translateX(-4px);
    }

    40%,
    80% {
        transform: translateX(4px);
    }
}

.subscribe_form_body .leadform_item .lf_hint_msg {
    display: inline-flex;
    align-items: center;
    position: absolute;
    top: calc(100% + 2px);
    left: 5px;
    z-index: 3;
    max-width: calc(100% - 10px);
    margin: 0;
    padding: 5px 12px;
    box-sizing: border-box;
    color: #fff !important;
    font-family: var(--site-font-family);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    pointer-events: none;
    border-radius: 4px;
    animation: subscribe_form_hint_in 0.2s ease;
    gap: 5px;
}

@keyframes subscribe_form_hint_in {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

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

.subscribe_form_body .leadform_item .lf_hint_msg.lf_hint_error {
    background: #e05252;
    box-shadow: 0 4px 14px 0 rgba(224, 82, 82, 0.35);
}

.subscribe_form_body .leadform_item .lf_hint_msg.lf_hint_error::before {
    content: "✕";
    font-size: 11px;
    font-weight: 700;
}

.subscribe_form_body .leadform_item .lf_hint_msg.lf_hint_valid {
    background: #13bdf1;
    box-shadow: 0 4px 14px 0 rgba(19, 189, 241, 0.35);
}

.subscribe_form_body .leadform_item .lf_hint_msg.lf_hint_valid::before {
    content: "✓";
    font-size: 11px;
    font-weight: 700;
}

@media (max-width: 767.98px) {
    .site_subscribe_section {
        padding: 36px 0;
    }

    .subscribe_container_title {
        font-size: 24px;
    }

    .subscribe_form_body .leadform_wrap {
        flex-direction: column;
        margin: 0;
    }

    .subscribe_form_body .leadform_item:not(.btn),
    .subscribe_form_body .leadform_item.btn {
        flex-basis: 100%;
        width: 100%;
        padding: 5px 0;
    }

    .subscribe_form_body .leadform_item .lf_hint_msg {
        left: 0;
        max-width: 100%;
        white-space: normal;
    }
}
