/* ОВЕРЛЕЙ (Фон) */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    
    /* Скрыто по умолчанию */
    display: none;
    
    /* Центрирование */
    justify-content: center;
    align-items: center;
}

/* ОКНО */
.auth-wrapper {
    background: #fff;
    padding: 30px 40px;
    width: 100%;
    max-width: 400px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    box-sizing: border-box;
    color: #333;
    display: flex;
    flex-direction: column;
}

/* ШАПКА ОКНА (для крестика) */
.auth-header {
    display: flex;
    justify-content: flex-end; /* Прижимает крестик вправо */
    margin-bottom: 10px;
    margin-top: -10px;
    margin-right: -10px;
}

/* КРЕСТИК */
.auth-close {
    background: transparent;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #999;
    cursor: pointer; /* Тут оставляем, так как это кнопка */
    padding: 0;
    transition: color 0.2s;
}

.auth-close:hover {
    color: rgb(136,76,147);
}

/* ЗАГОЛОВКИ */
.auth-window h3 {
    margin-top: 0;
    margin-bottom: 25px;
    text-align: center;
    font-size: 24px;
    color: rgb(136,76,147);
    font-weight: bold;
    font-family: inherit;
}

/* ПОЛЯ ВВОДА */
.auth-window .form-item {
    margin-bottom: 15px;
}

.auth-window label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    /* Убрал cursor */
}

/* Стилизация всех инпутов */
.auth-window input[type="text"],
.auth-window input[type="tel"],
.auth-window input[type="email"],
.auth-window input[type="number"] {
    display: block !important;
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 16px;
    outline: none;
    background: #fff;
    color: #333;
    transition: border-color 0.2s;
    /* Убрал cursor */
}

.auth-window input:focus {
    border-color: rgb(136,76,147);
}

.auth-window input:disabled {
    background: #f5f5f5;
    color: #777;
}

/* КНОПКИ */
.auth-window button.button--primary {
    display: block !important;
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer; /* Тут оставляем, так как это кнопка */
    margin-top: 15px;
    background-color: rgb(136,76,147);
    color: #fff;
    border: none;
    border-radius: 6px;
    transition: background 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-window button.button--primary:hover {
    background-color: rgb(116, 56, 127);
}

.auth-window button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* РАДИО КНОПКИ (Выбор метода) */
.auth-methods {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
}

.auth-window .auth-methods label {
    font-weight: normal;
    display: flex;
    align-items: center;
    font-size: 16px;
}

.form-agreement > label {
    display: inline !important;
}

.auth-methods input {
    margin-right: 8px;
    accent-color: rgb(136,76,147);
    width: auto !important;
    /* Убрал cursor */
}

/* ТАЙМЕР */
#timer-block {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    color: #666;
}

/* DaData Fix */
.suggestions-wrapper {
    position: relative;
    text-align: left;
}
.suggestions-suggestions {
    background: #fff;
    border: 1px solid #ddd;
    z-index: 10005 !important;
}

/* Звездочка обязательного поля */
.required-star {
    color: #e3342f;
    margin-left: 3px;
    font-weight: bold;
}

/* Класс ошибки для input (добавляется через JS) */
.input-error {
    border-color: #e3342f !important;
    background-color: #fff5f5 !important;
}

/* Сообщение об ошибке (опционально, если будете выводить текст) */
.error-message {
    color: #e3342f;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

/* БЛОК СООБЩЕНИЙ (Вместо alert) */
.auth-message {
    display: none; /* Скрыто по умолчанию */
    padding: 12px 15px;
    margin-bottom: 15px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
}

/* Стиль для ошибки */
.auth-message.error {
    background-color: #fef2f2;
    color: #ef4444; /* Красный цвет */
    border: 1px solid #fecaca;
}

/* Стиль для успеха (на будущее) */
.auth-message.success {
    background-color: #ecfdf5;
    color: #059669; /* Зеленый цвет */
    border: 1px solid #a7f3d0;
}

/* Анимация ошибки инпута (тряска) */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
  20%, 40%, 60%, 80% { transform: translateX(4px); }
}

.input-error {
    border-color: #ef4444 !important;
    background-color: #fff5f5 !important;
    animation: shake 0.4s ease-in-out;
}

.required-star {
    color: #ef4444;
    margin-left: 3px;
    font-weight: bold;
}

/* ... (Старые стили оставляем) ... */

/* Чекбокс согласия */
.form-agreement {
    display: flex;
    align-items: flex-start; /* Выравнивание по верху, если текст длинный */
    font-size: 13px;
    margin-top: 10px;
    margin-bottom: 20px !important;
}

.form-agreement input {
    margin-right: 10px;
    margin-top: 3px; /* Чуть опустить чекбокс под текст */
    width: 18px !important;
    height: 18px;
    cursor: pointer;
}

.form-agreement label {
    font-weight: normal;
    font-size: 13px;
    line-height: 1.4;
    cursor: pointer;
    margin: 0;
    color: #555;
    display: inline; /* Чтобы текст обтекал */
}

.form-agreement a {
    color: rgb(136,76,147);
    text-decoration: underline;
}

/* Ошибка чекбокса (подсветка текста) */
.agreement-error label {
    color: #e3342f;
}

/* Подсказка таймера под кнопкой */
.timer-hint {
    margin-top: 10px;
    text-align: center;
    font-size: 13px;
    color: #666;
}