/* Убираем мусор CF7 */
.wpcf7 .hidden-fields-container, .wpcf7-response-output, .screen-reader-response,
.custom-cf7-wrapper p, .custom-cf7-wrapper br, .wpcf7-form-control-wrap {
    display: contents !important;
}

/* Общий контейнер */
.custom-cf7-wrapper {
    border: 1px solid #28a745;
    border-radius: 15px;
    padding: 30px;
    max-width: 1200px;
    margin: 20px auto;
    box-sizing: border-box;
    font-family: sans-serif;
}

.cf7-main-title {
    display: block !important;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 30px;
}

.cf7-columns {
    display: flex;
    gap: 20px;
}

.cf7-col { flex: 1; }

.cf7-col-title {
    display: block !important;
    text-align: center;
    font-weight: bold;
    margin-bottom: 15px;
}

/* Внутренние рамки */
.cf7-inner-box {
    border: 1px solid #28a745;
    border-radius: 12px;
    padding: 25px 20px;
    height: 150px; /* Фиксируем высоту для идеальной линии */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
}

/* Ряд 1: Поля и Телефоны */
.cf7-row-flex {
    display: flex;
    justify-content: center;
    gap: 15px;
    align-items: center;
}

/* Поля ввода */
.cf7-50 input, .cf7-50 textarea {
    width: 100%;
    height: 40px !important;
    padding: 5px 10px !important;
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    box-sizing: border-box;
    font-size: 14px;
}

.cf7-50 textarea { resize: none; overflow: hidden; }

/* Телефоны */
.cf7-phone-link {
    color: #28a745;
    font-size: 20px;
    font-weight: bold;
    text-decoration: none;
    white-space: nowrap;
}

/* Ряд 2: Кнопки */
.cf7-submit-row, .cf7-inner-box > .cf7-row-flex:last-child {
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* Кнопка ОТПРАВИТИ */
.cf7-btn-submit {
    background: #008800 !important;
    color: #fff !important;
    border: none !important;
    height: 38px;
    padding: 0 35px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
}

/* Кнопки мессенджеров */
.cf7-messenger-btn {
    flex: 1;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    font-size: 13px;
    background: #008000; /* Зеленый как на скрине */
}

.cf7-messenger-btn i { margin-right: 8px; }

@media (max-width: 900px) {
    .cf7-columns { flex-direction: column !important; }
    .cf7-inner-box { height: auto !important; gap: 20px !important; }
    
    .cf7-row-flex, 
    .cf7-submit-row { 
        flex-direction: column !important; 
        align-items: stretch !important; 
        width: 100% !important;
        gap: 10px !important;
    }
    
    .cf7-btn-submit,
    a.cf7-messenger-btn { 
        display: flex !important;
        width: 100% !important; 
        text-align: center !important; 
        justify-content: center !important;
        align-items: center !important;
        height: 50px !important;
        min-height: 50px !important;
        font-size: 16px !important;
        box-sizing: border-box !important;
        padding: 10px !important;
    }
    
    .cf7-phone-link {
        width: 100% !important; 
        text-align: center !important;
    }
}
.cf7-btn-submit:hover,
a.cf7-messenger-btn:hover {
    background: #00b300 !important; 
    color: #000 !important; 
}