/* Модальное окно для налогового вычета */
.tax-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    overflow-y: auto;
}

.tax-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.tax-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

.tax-modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 2;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: taxModalSlideIn 0.3s ease;
}

@keyframes taxModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tax-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    font-size: 32px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.tax-modal-close:hover {
    background: #f5f5f5;
    color: #5E96CF;
    transform: rotate(90deg);
}

/* Заголовок */
.tax-modal-header {
    margin-bottom: 30px;
}

.tax-modal-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #5E96CF;
    margin-bottom: 12px;
}

.tax-modal-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #666;
    line-height: 1.6;
}

/* Форма */
.tax-form {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.tax-form-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tax-form-group-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #666;
    margin-bottom: 8px;
}

.tax-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.tax-form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tax-form-field label {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #666;
}

.required {
    color: #e74c3c;
}

.tax-form-field input {
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    color: #333;
    transition: all 0.3s ease;
}

.tax-form-field input:focus {
    outline: none;
    border-color: #5E96CF;
    box-shadow: 0 0 0 3px rgba(94, 150, 207, 0.1);
}

.tax-form-field input:invalid:not(:placeholder-shown) {
    border-color: #e74c3c;
}

/* Чекбокс */
.tax-form-checkbox-group {
    padding: 16px 0;
}

.tax-checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #666;
}

.tax-checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #5E96CF;
}

.tax-checkbox-label:hover {
    color: #5E96CF;
}

/* Радиокнопки */
.tax-form-radio-group {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.tax-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #666;
}

.tax-radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #5E96CF;
}

.tax-radio-label:hover {
    color: #5E96CF;
}

/* Кнопка отправки */
.tax-form-submit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

.tax-submit-btn {
    width: 100%;
    max-width: 400px;
    padding: 16px 32px;
    background: #C1E36E;
    border: none;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tax-submit-btn:hover {
    background: #a8c95e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(193, 227, 110, 0.4);
}

.tax-submit-btn:active {
    transform: translateY(0);
}

.tax-privacy-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: #999;
    text-align: center;
    max-width: 400px;
}

/* Адаптив для мобильных */
@media (max-width: 768px) {
    .tax-modal-content {
        padding: 30px 20px;
    }
    
    .tax-modal-title {
        font-size: 24px;
    }
    
    .tax-form-row {
        grid-template-columns: 1fr;
    }
    
    /* Период в 2 колонки на мобильных */
    .tax-form-radio-group-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 12px !important;
    }
    
    .tax-form-radio-group {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .tax-modal-content {
        padding: 24px 16px;
    }
    
    .tax-modal-title {
        font-size: 20px;
    }
    
    .tax-modal-subtitle {
        font-size: 13px;
    }
}
