.modal-form {
    border: none;
    border-radius: 16px;
    padding: 40px;
    width: min(520px, 94vw);
    box-shadow: 0 12px 48px rgba(0, 0, 0, .22);
    position: relative;
}

.modal-form::backdrop {
    background: rgba(0, 0, 0, .5);
}

.modal-form__close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: #9ca3af;
    line-height: 1;
    border-radius: 6px;
    transition: color .15s, background .15s;
}

.modal-form__close:hover {
    color: #072030;
    background: #f1f5f5;
}

.modal-form__title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 6px;
    color: #072030;
    padding-right: 32px;
}

.modal-form__subtitle {
    font-size: 0.8rem;
    color: #6b7280;
    margin: 0 0 28px;
}

/* CF7 form inside modal */
.modal-form .wpcf7 {
    margin: 0;
}

/* Labels */
.modal-form .wpcf7-form label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #072030;
    margin-bottom: 4px;
}

/* Inputs & textarea */
.modal-form .wpcf7-form input[type="text"],
.modal-form .wpcf7-form input[type="email"],
.modal-form .wpcf7-form input[type="tel"],
.modal-form .wpcf7-form textarea {
    display: block;
    width: 100%;
    padding: 10px 14px;
    font-size: 0.85rem;
    color: #072030;
    background: #f8fafa;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
    margin-bottom: 16px;
}

.modal-form .wpcf7-form input[type="text"]:focus,
.modal-form .wpcf7-form input[type="email"]:focus,
.modal-form .wpcf7-form input[type="tel"]:focus,
.modal-form .wpcf7-form textarea:focus {
    border-color: #57806a;
    box-shadow: 0 0 0 3px rgba(87, 128, 106, .15);
    background: #fff;
}

.modal-form .wpcf7-form textarea {
    resize: vertical;
    min-height: 96px;
}

/* Wrap — убираем дефолтные отступы CF7 */
.modal-form .wpcf7-form-control-wrap {
    display: block;
}

/* Acceptance (checkbox + consent) */
.modal-form .wpcf7-acceptance {
    margin-bottom: 20px;
}

.modal-form .wpcf7-acceptance .wpcf7-list-item {
    margin: 0;
}

.modal-form .wpcf7-acceptance .wpcf7-list-item label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.72rem;
    color: #6b7280;
    font-weight: 400;
    cursor: pointer;
    margin-bottom: 0;
}

.modal-form .wpcf7-acceptance .wpcf7-list-item label input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    accent-color: #57806a;
    cursor: pointer;
}

.modal-form .wpcf7-acceptance .wpcf7-list-item label a {
    color: #46766b;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Submit button */
.modal-form .wpcf7-submit {
    width: 100%;
    padding: 12px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    background: #57806a;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background .2s;
}

.modal-form .wpcf7-submit:hover:not(:disabled) {
    background: #3c6c61;
}

.modal-form .wpcf7-submit:disabled {
    background: #b5c9bf;
    cursor: not-allowed;
}

/* Response output */
.modal-form div.wpcf7-response-output {
    margin: 12px 0 0;
    padding: 10px 14px;
    font-size: 0.75rem;
    border-radius: 8px;
    border-width: 1px;
}

/* Spinner */
.modal-form span.wpcf7-spinner {
    display: none;
}

/* Validation errors */
.modal-form .wpcf7-not-valid-tip {
    font-size: 0.7rem;
    color: #dc2626;
    margin-top: -12px;
    margin-bottom: 12px;
    display: block;
}

.modal-form .wpcf7-not-valid {
    border-color: #dc2626 !important;
}
