/**
 * Стили для Yandex SmartCaptcha
 *
 * @author Evgeny Maslenkov <emaslenkov@gmail.com>
 * @date 2026-02-04
 */

/* =========================================================================
   Контейнер капчи
   ========================================================================= */

.yandex-captcha-container {
    margin: 15px 0;
    min-height: 100px;
}

/* Состояние загрузки */
.yandex-captcha-container.loading {
    background: #f5f5f5;
    border: 1px dashed #ddd;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.yandex-captcha-container.loading::after {
    content: 'Загрузка капчи...';
    color: #999;
    font-size: 14px;
}

/* =========================================================================
   Inline режим (рядом с полем телефона)
   ========================================================================= */

.yandex-captcha-inline {
    margin: 10px 0;
    min-height: 80px;
}

/* =========================================================================
   Сообщение о необходимости капчи
   ========================================================================= */

.captcha-required-message {
    padding: 10px 15px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    color: #856404;
    font-size: 13px;
    margin-bottom: 10px;
}

.captcha-required-message i {
    margin-right: 8px;
}

/* =========================================================================
   Статус капчи
   ========================================================================= */

.captcha-status {
    font-size: 12px;
    margin-top: 5px;
}

.captcha-status.pending {
    color: #999;
}

.captcha-status.passed {
    color: #5cb85c;
}

.captcha-status.passed i {
    margin-right: 5px;
}

/* =========================================================================
   Адаптивность
   ========================================================================= */

@media (max-width: 768px) {
    .yandex-captcha-container {
        margin: 10px 0;
    }

    /* На мобильных капча занимает всю ширину */
    .yandex-captcha-container iframe {
        max-width: 100% !important;
    }
}

@media (max-width: 480px) {
    .yandex-captcha-inline {
        min-height: 70px;
    }
}

/* =========================================================================
   Интеграция с формами Bootstrap
   ========================================================================= */

.form-group .yandex-captcha-container {
    margin-top: 10px;
}

.form-horizontal .yandex-captcha-container {
    padding-left: 0;
}

/* =========================================================================
   Тёмная тема (если нужна)
   ========================================================================= */

.dark-theme .yandex-captcha-container.loading {
    background: #333;
    border-color: #555;
}

.dark-theme .yandex-captcha-container.loading::after {
    color: #aaa;
}

.dark-theme .captcha-required-message {
    background: #433;
    border-color: #644;
    color: #ffc;
}
