/* ===================================================
   Math CAPTCHA — стили
   Совместимы с темой Themify и стандартным WP
   =================================================== */

/* Обёртка поля */
.math-captcha-wrap {
    margin: 16px 0;
    padding: 14px 18px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-left: 4px solid #0073aa;
    border-radius: 4px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
}

/* Лейбл */
.math-captcha-wrap label {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: #333;
    font-weight: 500;
    cursor: default;
    margin-bottom: 0 !important; /* сброс Themify */
}

/* Пример (жирный) */
.math-captcha-question {
    display: inline-block;
    padding: 4px 10px;
    background: #0073aa;
    color: #fff;
    border-radius: 3px;
    font-size: 15px;
    letter-spacing: .5px;
    white-space: nowrap;
}

/* Поле ввода */
.math-captcha-input {
    width: 90px !important;
    min-width: 70px;
    max-width: 110px;
    padding: 8px 10px !important;
    border: 1px solid #bbb !important;
    border-radius: 3px !important;
    font-size: 15px !important;
    text-align: center;
    transition: border-color .2s, box-shadow .2s;
    background: #fff !important;
    color: #222 !important;
    -moz-appearance: textfield;
}

.math-captcha-input::-webkit-outer-spin-button,
.math-captcha-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.math-captcha-input:focus {
    border-color: #0073aa !important;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, .25) !important;
    outline: none !important;
}

/* ===== Страница входа / регистрации ===== */
#loginform  .math-captcha-wrap,
#registerform .math-captcha-wrap {
    margin: 12px 0;
}

/* ===== Форма комментариев ===== */
#commentform .math-captcha-wrap {
    width: 100%;
    box-sizing: border-box;
}

/* ===== Themify Builder — сброс конфликтных правил ===== */
.themify_builder .math-captcha-wrap,
.themify-contact-form .math-captcha-wrap {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-left: 4px solid #0073aa;
    padding: 14px 18px;
}

/* ===== Адаптив ===== */
@media (max-width: 480px) {
    .math-captcha-wrap {
        flex-direction: column;
        align-items: flex-start;
    }
    .math-captcha-input {
        width: 100% !important;
        max-width: 100%;
        text-align: left;
    }
}
