/* ===========================
   CONTACT FORM 7 — Profinz
   Loaded only while Contact Form 7 is active.
   Pairs with js/cf7-form.js (validation + AJAX submit).
   =========================== */

/* ---------- Enquiry popup (Elementor popup #462) ---------- */

#elementor-popup-modal-462 .wpcf7-not-valid {
    border-color: #c0392b !important;
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.12) !important;
}

#elementor-popup-modal-462 .wpcf7-not-valid-tip {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    color: #c0392b;
}

#elementor-popup-modal-462 .wpcf7-response-output {
    margin-top: 16px;
    padding: 10px 16px;
    font-size: 14px;
    color: #0f6e56;
    border: 1px solid #0f6e56;
    border-radius: 8px;
}

/* ---------- Form wrapper — wrap the form markup in <div class="cf7-form-wrap"> ---------- */

.cf7-form-wrap {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Remove CF7 <br> tags */
.cf7-form-wrap br {
    display: none !important;
}

/* Field wrap */
.cf7-form-wrap .field-wrap {
    display: block !important;
    width: 100% !important;
    margin: 0 0 12px 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
}

/* Override Elementor <p> margin */
.cf7-form-wrap p,
.cf7-form-wrap .field-wrap p {
    margin: 0 !important;
    margin-block-start: 0 !important;
    margin-block-end: 0 !important;
    padding: 0 !important;
}

/* Labels */
.cf7-form-wrap label {
    display: block !important;
    margin: 0 0 5px 0 !important;
    padding: 0 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
    color: #222222 !important;
}

/* Inputs and selects */
.cf7-form-wrap .wpcf7-text,
.cf7-form-wrap .wpcf7-email,
.cf7-form-wrap .wpcf7-tel,
.cf7-form-wrap .wpcf7-select {
    display: block !important;
    box-sizing: border-box !important;
    width: 100% !important;
    height: 42px !important;
    margin: 0 !important;
    padding: 0 12px !important;
    font-size: 14px !important;
    line-height: 42px !important;
    color: #333333 !important;
    background: #ffffff !important;
    border: 1px solid #d0d5dd !important;
    border-radius: 8px !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

/* Focus */
.cf7-form-wrap .wpcf7-text:focus,
.cf7-form-wrap .wpcf7-email:focus,
.cf7-form-wrap .wpcf7-tel:focus,
.cf7-form-wrap .wpcf7-select:focus {
    border-color: #1a5fa8 !important;
    box-shadow: 0 0 0 3px rgba(26, 95, 168, 0.12) !important;
}

/* Select dropdown arrow */
.cf7-form-wrap .wpcf7-select {
    padding-right: 36px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    cursor: pointer !important;
}

/* Control wrap */
.cf7-form-wrap .wpcf7-form-control-wrap {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ---------- Phone row: country code + number ---------- */

.cf7-form-wrap .phone-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
    gap: 8px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.cf7-form-wrap .phone-row .wpcf7-form-control-wrap[data-name="country-code"] {
    flex: 0 0 105px !important;
    width: 105px !important;
    min-width: 105px !important;
    max-width: 105px !important;
}

.cf7-form-wrap .phone-row .wpcf7-form-control-wrap[data-name="country-code"] .wpcf7-select {
    width: 105px !important;
}

.cf7-form-wrap .phone-row .wpcf7-form-control-wrap[data-name="your-phone"] {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
}

.cf7-form-wrap .phone-row .wpcf7-form-control-wrap[data-name="your-phone"] .wpcf7-tel {
    width: 100% !important;
}

/* ---------- Errors ---------- */

.cf7-form-wrap .wpcf7-not-valid {
    border-color: #c0392b !important;
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.12) !important;
}

.cf7-form-wrap .wpcf7-not-valid-tip {
    display: block !important;
    margin-top: 4px !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
    color: #c0392b !important;
}

/* ---------- Submit button ---------- */

.cf7-form-wrap .wpcf7-submit {
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 11px 36px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    color: #ffffff !important;
    background: #1a4f7a !important;
    border: none !important;
    border-radius: 50px !important;
    cursor: pointer !important;
}

.cf7-form-wrap .wpcf7-submit:hover {
    background: #15406a !important;
}

/* While the form is sending (double-submit guard) */
.cf7-form-wrap .wpcf7-submit:disabled {
    opacity: 0.6 !important;
    cursor: wait !important;
}

/* ---------- Response messages ---------- */

.cf7-success-message {
    width: 100% !important;
    box-sizing: border-box !important;
}

.cf7-form-wrap .wpcf7-response-output {
    box-sizing: border-box !important;
    margin-top: 12px !important;
    padding: 10px 16px !important;
    font-size: 13px !important;
    border: 1px solid !important;
    border-radius: 8px !important;
}

/* Success */
.wpcf7 form.sent .wpcf7-response-output {
    padding: 10px 20px !important;
    font-size: 14px !important;
    text-align: center !important;
    color: #0f6e56 !important;
    background: #e1f5ee !important;
    border: 1px solid #0f6e56 !important;
    border-radius: 100px !important;
}

/* Error */
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.payment-required .wpcf7-response-output {
    padding: 10px 20px !important;
    font-size: 14px !important;
    text-align: center !important;
    color: #c0392b !important;
    background: #fdf0ee !important;
    border: 1px solid #c0392b !important;
    border-radius: 100px !important;
}
