/* ========== МОДАЛЬНОЕ ОКНО ========== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.3s ease, opacity 0.3s ease;
    z-index: 1000;
}

.modal--active {
    visibility: visible;
    opacity: 1;
}

.modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    cursor: pointer;
}

.modal__container {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    padding: 40px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.modal--active .modal__container {
    transform: scale(1);
}

.modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    transition: color 0.2s ease;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.modal__close:hover {
    color: #FF6B00;
}

/* ========== СТИЛИ ФОРМЫ ========== */
.popup-form__title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 24px;
    text-align: center;
    color: #1a1a1a;
}

.popup-form__field {
    margin-bottom: 20px;
}

.popup-form__label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
}

.popup-form__input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.2s ease;
    outline: none;
    font-family: inherit;
    box-sizing: border-box;
}

.popup-form__input:focus {
    border-color: #FF6B00;
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1);
}

.popup-form__input::placeholder {
    color: #aaa;
}

.popup-form__field--nomail {
    display: none;
}

/* Кастомный чекбокс */
.popup-form__field--checkbox {
    margin: 24px 0;
}

.popup-form__checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.popup-form__checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.popup-form__checkbox-custom {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: white;
    transition: all 0.2s ease;
    position: relative;
    margin-top: 2px;
}

.popup-form__checkbox:checked + .popup-form__checkbox-custom {
    background: #FF6B00;
    border-color: #FF6B00;
}

.popup-form__checkbox:checked + .popup-form__checkbox-custom::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 0;
    width: 6px;
    height: 11px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.popup-form__checkbox:focus + .popup-form__checkbox-custom {
    border-color: #FF6B00;
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.2);
}

.popup-form__checkbox-text {
    font-size: 13px;
    line-height: 1.4;
    color: #555;
}

.popup-form__checkbox-text a {
    color: #FF6B00;
    text-decoration: none;
}

.popup-form__checkbox-text a:hover {
    text-decoration: underline;
}

/* Кнопка отправки */
.popup-form__button {
    width: 100%;
    padding: 14px 24px;
    background: #FF6B00;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.popup-form__button:hover {
    background: #e55f00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.3);
}

.popup-form__button:active {
    transform: translateY(0);
}

/* Результат отправки */
.popup-form__result {
    margin-top: 16px;
    padding: 12px;
    border-radius: 10px;
    text-align: center;
    font-size: 14px;
    display: none;
}

.popup-form__result--success {
    display: block;
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.popup-form__result--error {
    display: block;
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

/* Адаптивность */
@media (max-width: 600px) {
    .modal__container {
        padding: 16px;
        width: 95%;
    }
    
    .popup-form__title {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .popup-form__input {
        font-size: 14px;
        padding: 10px 14px;
    }
    
    .popup-form__button {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .popup-form__checkbox-text {
        font-size: 12px;
    }
}