/* === style_telegram_auth.css === */

/* Фон затемнения для всех окон */
.popup-overlay, 
.telegram-code-popup-overlay,
.telegram-password-popup-overlay,
.telegram-load-popup-overlay,
.telegram-camera-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Белое окно (контейнер) */
.popup-content,
.telegram-code-popup-content,
.telegram-password-popup-content,
.telegram-load-popup-content,
.telegram-camera-popup-content {
    background-color: #ffffff !important; /* Точно белый фон */
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    max-width: 400px;
    width: 90%;
    color: #000000 !important; /* ВЕСЬ ТЕКСТ ЧЕРНЫЙ */
}

/* Заголовки (H2) */
.popup-title,
.telegram-code-popup-title,
.telegram-password-popup-title,
.telegram-load-popup-title,
.telegram-camera-popup-title {
    font-size: 20px;
    margin-bottom: 20px;
    color: #000000 !important; /* Черный цвет принудительно */
    font-weight: bold;
    line-height: 1.4;
}

/* Синий текст "Telegram" */
.popup-telegram {
    color: #3390ec !important;
    text-decoration: none;
}

/* Подписи над полями (Label) */
.popup-label,
.telegram-code-popup-label,
.telegram-password-popup-label,
.telegram-camera-popup-label {
    display: block;
    margin-bottom: 8px;
    text-align: left;
    color: #000000 !important; /* Черный */
    font-size: 14px;
    font-weight: normal;
}

/* Поля ввода (Input) */
.popup-input,
.telegram-code-popup-input,
.telegram-password-popup-input,
.telegram-camera-popup-input {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 8px;
    outline: none;
    font-size: 16px;
    color: #000000 !important; /* Текст, который вводишь - черный */
    background-color: #ffffff !important; /* Фон поля белый */
    box-sizing: border-box; /* Чтобы padding не ломал ширину */
}

.popup-input::placeholder,
.telegram-code-popup-input::placeholder,
.telegram-password-popup-input::placeholder {
    color: #999999 !important;
}

/* Кнопки (Button) */
.popup-btn,
.telegram-code-popup-btn,
.telegram-password-popup-btn,
.telegram-camera-popup-btn {
    background-color: #3390ec !important;
    color: #ffffff !important; /* Текст на кнопке белый */
    border: none;
    padding: 12px;
    cursor: pointer;
    border-radius: 8px;
    width: 100%;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.3s;
}

.popup-btn:hover,
.telegram-code-popup-btn:hover,
.telegram-password-popup-btn:hover {
    background-color: #2b7ac4 !important;
}

/* Кнопка вызова (если есть на странице) */
.popup-trigger {
    display: block;
    margin: 20px auto;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
}

/* Анимация загрузки */
.loading-icon {
    font-size: 40px;
    color: #3390ec;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Инлайн лоадер для кнопок */
.btn-loader {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

/* Скрываем текст кнопки во время загрузки */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}