/* ===== MODAL WINDOW ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: block;
    opacity: 1;
}

.modal {
    position: fixed;
    bottom: -100%;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 500px;
    background: linear-gradient(145deg, var(--bg-gray) 0%, #252525 100%);
    border-radius: 20px 20px 0 0;
    padding: 30px;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-bottom: none;
    z-index: 2001;
    transition: bottom 0.4s ease;
}

.modal.active {
    bottom: 0;
}

.modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(76, 175, 80, 0.3);
}

.modal__title {
    font-size: 1.5rem;
    color: white;
    margin: 0;
}

.modal__close {
    background: none;
    border: none;
    color: var(--text-gray);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal__close:hover {
    color: var(--primary-green);
    background: rgba(76, 175, 80, 0.1);
}

.modal__form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form__group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form__label {
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
}

.form__input,
.form__select {
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(30, 30, 30, 0.7);
    color: var(--text-light);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form__input:focus,
.form__select:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.form__input::placeholder {
    color: var(--text-gray);
}

.form__checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 10px 0;
}

.form__checkbox {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--primary-green);
}

.form__checkbox-label {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.4;
}

.form__checkbox-label a {
    color: var(--primary-green);
    text-decoration: none;
}

.form__checkbox-label a:hover {
    text-decoration: underline;
}

.required .form__label::after {
    content: '*';
    color: var(--primary-green);
    margin-left: 4px;
}

.form__submit {
    background: var(--primary-green);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.form__submit:hover {
    background: var(--secondary-green);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

.form__submit:disabled {
    background: var(--text-gray);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Скрываем поле email по умолчанию */
#email-field {
    display: none;
}

#email-field.active {
    display: flex;
}

/* ===== АДАПТИВНОСТЬ MODAL ===== */
@media (max-width: 768px) {
    .modal {
        width: 95%;
        padding: 20px;
    }
    
    .modal__title {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .modal {
        padding: 15px;
    }
    
    .form__input,
    .form__select {
        padding: 10px 12px;
    }
}