/* ==========================================================================
   Лендинг «Цифровой рубль» (page-templates/tpl-digital-ruble.php)
   Дизайн в инлайн-стилях шаблона; здесь — hover/анимации и стилизация CF7-формы.
   Всё scoped под .dr-landing.
   ========================================================================== */

@keyframes dr-floaty {
    0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
    50%      { transform: translateY(-12px) rotate(var(--r, 0deg)); }
}

/* Лёгкое «встряхивание» невалидного поля при появлении ошибки. */
@keyframes dr-shake {
    10%, 90%       { transform: translateX(-1px); }
    20%, 80%       { transform: translateX(2px); }
    30%, 50%, 70%  { transform: translateX(-4px); }
    40%, 60%       { transform: translateX(4px); }
}

/* Hover: hero CTA */
.dr-landing .dr-cta:hover {
    background: #7d2a3d;
    transform: translateY(-2px);
}

/* Hover: карточки программы */
.dr-landing .dr-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 42px rgba(20, 20, 20, .11);
}

/* --------------------------------------------------------------------------
   Форма регистрации (CF7) — под дизайн лендинга
   -------------------------------------------------------------------------- */
.dr-landing .dr-reg-card .dr-form-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dr-landing .dr-reg-card .dr-field {
    display: block;
}

.dr-landing .dr-reg-card .dr-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #414141;
    margin-bottom: 6px;
}

.dr-landing .dr-reg-card .dr-req {
    color: #99354b;
}

/* CF7 оборачивает контрол в span.wpcf7-form-control-wrap */
.dr-landing .dr-reg-card .wpcf7-form-control-wrap {
    display: block;
}

.dr-landing .dr-reg-card input[type="text"],
.dr-landing .dr-reg-card input[type="email"],
.dr-landing .dr-reg-card input[type="tel"] {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    font-family: inherit;
    border: 1.5px solid #e3ded9;
    border-radius: 11px;
    background: #faf8f6;
    color: #111;
    transition: border-color .15s;
    box-sizing: border-box;
}

.dr-landing .dr-reg-card input[type="text"]:focus,
.dr-landing .dr-reg-card input[type="email"]:focus,
.dr-landing .dr-reg-card input[type="tel"]:focus {
    outline: none;
    border-color: #32770a;
}

.dr-landing .dr-reg-card input.wpcf7-not-valid {
    border-color: #d0342c;
    background: #fdf3f2;
    box-shadow: 0 0 0 3px rgba(208, 52, 44, .12);
    animation: dr-shake .4s ease both;
}

/* Согласия (чекбоксы) */
.dr-landing .dr-reg-card .dr-consents {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.dr-landing .dr-reg-card .dr-consents .wpcf7-list-item {
    display: block;
    margin: 0;
}

.dr-landing .dr-reg-card .dr-consents .wpcf7-list-item label {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    cursor: pointer;
}

.dr-landing .dr-reg-card .dr-consents input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 1px 0 0;
    accent-color: #32770a;
    flex-shrink: 0;
    cursor: pointer;
}

.dr-landing .dr-reg-card .dr-consents .wpcf7-list-item-label {
    font-size: 13.5px;
    color: #414141;
    line-height: 1.45;
}

.dr-landing .dr-reg-card .dr-consents a {
    color: #32770a;
    font-weight: 600;
}

/* Невалидное согласие: подсветка чекбокса + подсказка под строкой. */
.dr-landing .dr-reg-card .dr-consents .wpcf7-acceptance {
    display: block;
}
.dr-landing .dr-reg-card .dr-consents input[type="checkbox"].wpcf7-not-valid {
    outline: 2px solid #d0342c;
    outline-offset: 2px;
    border-radius: 3px;
}
.dr-landing .dr-reg-card .dr-consents .wpcf7-not-valid-tip {
    margin-top: 8px;
    padding-left: 31px; /* выровнять под текст согласия (чекбокс 20px + gap 11px) */
}

/* Кнопка отправки */
.dr-landing .dr-reg-card .dr-submit,
.dr-landing .dr-reg-card input.wpcf7-submit {
    width: 100%;
    margin-top: 24px;
    background: #32770a;
    color: #fff;
    font-weight: 700;
    font-size: 19px;
    font-family: inherit;
    padding: 18px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(50, 119, 10, .32);
    transition: background .2s, transform .15s;
}

.dr-landing .dr-reg-card .dr-submit:hover,
.dr-landing .dr-reg-card input.wpcf7-submit:hover {
    background: #255a06;
    transform: translateY(-2px);
}

/* Подсказка-ошибка под полем (иконка ⚠ + красный текст). */
.dr-landing .dr-reg-card .wpcf7-not-valid-tip {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    color: #d0342c;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    margin-top: 7px;
}
.dr-landing .dr-reg-card .wpcf7-not-valid-tip::before {
    content: "";
    flex: 0 0 auto;
    width: 15px;
    height: 15px;
    margin-top: 1px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d0342c' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z'/%3E%3Cline x1='12' y1='9' x2='12' y2='13'/%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* Итоговое сообщение CF7 (успех/ошибка) — цвет по data-status формы. */
.dr-landing .dr-reg-card .wpcf7-response-output {
    margin: 18px 0 0;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
}
.dr-landing .dr-reg-card form[data-status="sent"] .wpcf7-response-output {
    border: 1px solid #32770a;
    background: #eef6e7;
    color: #255a06;
}
.dr-landing .dr-reg-card form[data-status="invalid"] .wpcf7-response-output,
.dr-landing .dr-reg-card form[data-status="unaccepted"] .wpcf7-response-output,
.dr-landing .dr-reg-card form[data-status="spam"] .wpcf7-response-output,
.dr-landing .dr-reg-card form[data-status="failed"] .wpcf7-response-output,
.dr-landing .dr-reg-card form[data-status="aborted"] .wpcf7-response-output {
    border: 1px solid #d0342c;
    background: #fdf3f2;
    color: #b02a25;
}

/* Спиннер отправки — теперь ГЛОБАЛЬНЫЙ (assets/css/forms.css + forms.js,
   .dk-cf7-spinner по form[data-status="submitting"]). Локальные правила убраны. */

/* Мобильные уточнения */
@media (max-width: 640px) {
    .dr-landing .dr-cta {
        width: 100%;
        justify-content: center;
    }
}
