/* ==========================================
   Модальное окно (Попап)
   ========================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 31, 34, 0.8);
    /* Фирменный темный цвет полупрозрачный */
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: var(--color-bg, #FAFAF9);
    width: 100%;
    max-width: 500px;
    padding: 40px;
    border-radius: 20px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--color-gold);
}

.modal-title {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--color-text);
}

.modal-subtitle {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    margin-bottom: 24px;
    line-height: 1.5;
}

.modal-form .form-group {
    margin-bottom: 20px;
}

.modal-form label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 600;
}

.modal-form input,
.modal-form textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(197, 155, 39, 0.3);
    /* Тонкая золотая рамка */
    border-radius: 8px;
    background: #ffffff;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.modal-form input:focus,
.modal-form textarea:focus {
    outline: none;
    border-color: var(--color-gold);
}

.form-disclaimer {
    font-size: 0.75rem;
    text-align: center;
    color: var(--color-text-muted);
    margin-top: 16px;
    margin-bottom: 0;
}

/* ==========================================
   Чекбокс согласия
   ========================================== */
.form-agreement {
    margin: 16px 0 24px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    gap: 12px;
}

/* Прячем системный чекбокс, но оставляем его для браузерной валидации */
.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Наш кастомный квадратик */
.checkbox-custom {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 1px solid rgba(197, 155, 39, 0.4);
    /* Золотой полупрозрачный */
    border-radius: 4px;
    background-color: #fff;
    position: relative;
    transition: all 0.2s ease;
    margin-top: 2px;
}

/* Рисуем саму галочку (изначально скрыта) */
.checkbox-custom::after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid var(--color-gold, #C59B27);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Когда чекбокс нажат - показываем галочку */
.checkbox-label input[type="checkbox"]:checked~.checkbox-custom::after {
    display: block;
}

/* Подсветка фокуса при навигации с клавиатуры */
.checkbox-label input[type="checkbox"]:focus-visible~.checkbox-custom {
    outline: 2px solid var(--color-gold, #C59B27);
    outline-offset: 2px;
}

/* Текст согласия */
.checkbox-text {
    font-size: 12px;
    color: var(--color-text-muted, #666);
    line-height: 1.4;
}

.checkbox-text a {
    color: var(--color-gold, #C59B27);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.checkbox-text a:hover {
    text-decoration: none;
    color: #000;
}