/* Основные стили формы */
.custom-cf7-form {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    padding: 40px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(151, 72, 255, 0.2);
    font-family: 'Arial', sans-serif;
    border: 1px solid #f3e8ff;
}

/* Заголовки */
.custom-cf7-form .form-title {
    color: #6b21a8;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.4;
    text-shadow: 0 2px 4px rgba(107, 33, 168, 0.1);
}

.custom-cf7-form .form-subtitle {
    color: #6b7280;
    text-align: center;
    font-size: 17px;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Поля формы */
.custom-cf7-form .modern-form label {
    display: block;
    margin-bottom: 25px;
}

.custom-cf7-form .modern-form span:first-child {
    display: block;
    color: #6b21a8;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 16px;
    padding-left: 5px;
}

.custom-cf7-form .modern-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e9d5ff;
    border-radius: 12px;
    font-size: 16px;
    background: #faf5ff;
    transition: all 0.3s ease;
    box-sizing: border-box;
    box-shadow: 0 2px 5px rgba(151, 72, 255, 0.05) inset;
}

.custom-cf7-form .modern-input:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.2);
    outline: none;
    background: #ffffff;
}

/* Кнопка */
.custom-cf7-form .modern-submit {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 12px !important;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 0 5px 20px rgba(139, 92, 246, 0.4);
    position: relative;
    overflow: hidden;
}

.custom-cf7-form .modern-submit:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.5);
}

.custom-cf7-form .modern-submit:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(139, 92, 246, 0.5);
}

.wpcf7 form .wpcf7-response-output {
    display: none;
    margin: 16px 0 0 !important;
    padding: 12px 16px !important;
    border-radius: 8px;
    color: #30303a !important;
    line-height: 1.5;
}

.wpcf7 form .wpcf7-response-output:not(:empty) {
    display: block !important;
}

.wpcf7 form.sent .wpcf7-response-output {
    background: #f0fbf2;
    border-color: #36a853 !important;
}

.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output {
    background: #fff4f4;
    border-color: #d93025 !important;
}

.wpcf7 form.failed .wpcf7-response-output,
.wpcf7 form.spam .wpcf7-response-output {
    background: #fff8ed;
    border-color: #d97706 !important;
}

/* Модальное окно */
.cf7-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.cf7-modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 30px;
    border-radius: 15px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(107, 33, 168, 0.3);
    border: 1px solid #e9d5ff;
    text-align: center;
    position: relative;
    animation: modalFadeIn 0.4s;
}

@keyframes modalFadeIn {
    from {opacity: 0; transform: translateY(-50px);}
    to {opacity: 1; transform: translateY(0);}
}

.cf7-close-btn {
    position: absolute;
    right: 20px;
    top: 15px;
    color: #6b21a8;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.cf7-close-btn:hover {
    color: #4c1d95;
}

#cf7-modal-message {
    font-size: 18px;
    color: #6b21a8;
    line-height: 1.6;
    padding: 20px 0;
}

/* Адаптивность */
@media (max-width: 768px) {
    .custom-cf7-form {
        padding: 30px 25px;
        border-radius: 18px;
    }

    .custom-cf7-form .form-title {
        font-size: 22px;
    }

    .custom-cf7-form .modern-input {
        padding: 14px 18px;
    }

    .custom-cf7-form .modern-submit {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .custom-cf7-form {
        padding: 25px 20px;
        border-radius: 16px;
    }

    .custom-cf7-form .form-title {
        font-size: 20px;
    }

    .cf7-modal-content {
        padding: 25px 20px;
    }
}