/* =========================================================
   TELEMAT LEAD MODAL
   Stili isolati dal tema Crafto / Elementor
   ========================================================= */


/* =========================================================
   BOTTONE SHORTCODE / CTA MANUALE
   Nota: resta fuori dal modal perché può essere usato nelle pagine
   ========================================================= */

.tlm-lead-button {
    display: inline-block;
    border: 0;
    border-radius: 999px;
    padding: 14px 28px;
    background: #c4161c;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
}

.tlm-lead-button:hover,
.tlm-lead-button:focus {
    background: #a91217;
    color: #ffffff;
    text-decoration: none;
}


/* =========================================================
   STRUTTURA MODAL
   ========================================================= */

#tlm-lead-modal,
#tlm-lead-modal * {
    box-sizing: border-box;
}

#tlm-lead-modal.tlm-lead-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    overflow: hidden;
}

#tlm-lead-modal.tlm-lead-modal.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#tlm-lead-modal .tlm-lead-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.68);
}

#tlm-lead-modal .tlm-lead-modal-box {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 620px;
    max-height: calc(100vh - 40px);
    margin: 0;
    overflow-y: auto;
    background: #ffffff;
    border: 0;
    border-radius: 18px;
    padding: 36px;
    text-align: center;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.3);
    font-family: "Lato", Arial, sans-serif;
    color: #334155;

    scrollbar-width: thin;
    scrollbar-color: rgba(0, 59, 115, 0.35) transparent;
}

#tlm-lead-modal .tlm-lead-modal-box::-webkit-scrollbar {
    width: 7px;
}

#tlm-lead-modal .tlm-lead-modal-box::-webkit-scrollbar-track {
    background: transparent;
}

#tlm-lead-modal .tlm-lead-modal-box::-webkit-scrollbar-thumb {
    background: rgba(0, 59, 115, 0.28);
    border-radius: 999px;
}

#tlm-lead-modal .tlm-lead-modal-box::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 59, 115, 0.48);
}

#tlm-lead-modal .tlm-lead-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    width: auto;
    min-width: 0;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #64748b;
    font-family: Arial, sans-serif;
    font-size: 32px;
    font-weight: 400;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    box-shadow: none;
    appearance: none;
}

#tlm-lead-modal .tlm-lead-modal-close:hover,
#tlm-lead-modal .tlm-lead-modal-close:focus {
    background: transparent;
    color: #003b73;
    box-shadow: none;
}


/* =========================================================
   INTRO MODAL
   ========================================================= */

#tlm-lead-modal .tlm-lead-intro {
    margin: 0;
    padding: 0;
    text-align: center;
}

#tlm-lead-modal .tlm-lead-modal-box h3,
#tlm-lead-modal .tlm-lead-modal-box #tlm-lead-modal-title {
    display: block;
    margin: 0 0 14px;
    padding: 0;
    color: #003b73;
    font-family: "Urbanist", Arial, sans-serif;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    text-align: center;
    text-transform: none;
}

#tlm-lead-modal .tlm-lead-intro #tlm-lead-modal-description {
    display: block;
    max-width: 520px;
    margin: 0 auto 20px;
    padding: 0;
    color: #475569;
    font-family: "Lato", Arial, sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.55;
    text-align: center;
    text-transform: none;
}

#tlm-lead-modal .tlm-lead-modal-service {
    display: inline-block;
    margin: 0 0 20px;
    padding: 9px 16px;
    border: 0;
    border-radius: 999px;
    background: #eef5fb;
    color: #003b73;
    font-family: "Lato", Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}

#tlm-lead-modal .tlm-lead-modal-test {
    margin-bottom: 0;
}


/* =========================================================
   BLOCCO SCROLL PAGINA
   ========================================================= */

html.tlm-lead-modal-open,
body.tlm-lead-modal-open {
    overflow: hidden !important;
}


/* =========================================================
   FORM WRAPPER
   ========================================================= */

#tlm-lead-modal .tlm-lead-form-wrapper {
    margin-top: 18px;
    text-align: left;
}

#tlm-lead-modal .tlm-lead-form-wrapper .wpcf7,
#tlm-lead-modal .wpcf7,
#tlm-lead-modal .wpcf7-form {
    margin: 0;
    padding: 0;
    font-family: "Lato", Arial, sans-serif;
}


/* =========================================================
   RIFERIMENTO GARA
   ========================================================= */

#tlm-lead-modal .tlm-lead-gara-reference {
    display: inline-block;
    margin: 0 0 20px;
    padding: 8px 15px;
    border: 0;
    border-radius: 999px;
    background: #eef5fb;
    color: #003b73;
    font-family: "Lato", Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}

#tlm-lead-modal .tlm-lead-gara-reference span {
    font-weight: 800;
}


/* =========================================================
   SUCCESS MESSAGE
   ========================================================= */

#tlm-lead-modal .tlm-lead-success {
    padding: 20px 10px 10px;
    text-align: center;
}

#tlm-lead-modal .tlm-lead-success-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: #e8f7ef;
    color: #168451;
    font-family: Arial, sans-serif;
    font-size: 38px;
    font-weight: 700;
    line-height: 1;
}

#tlm-lead-modal .tlm-lead-success h3 {
    display: block;
    margin: 0 0 12px;
    padding: 0;
    color: #003b73;
    font-family: "Urbanist", Arial, sans-serif;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-transform: none;
}

#tlm-lead-modal .tlm-lead-success p {
    display: block;
    max-width: 460px;
    margin: 0 auto 24px;
    padding: 0;
    color: #475569;
    font-family: "Lato", Arial, sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.6;
    text-align: center;
}

#tlm-lead-modal .tlm-lead-success-close {
    display: inline-block;
    min-width: 150px;
    margin: 0;
    border: 0;
    border-radius: 999px;
    padding: 13px 25px;
    background: #003b73;
    color: #ffffff;
    font-family: "Lato", Arial, sans-serif;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    box-shadow: none;
    appearance: none;
}

#tlm-lead-modal .tlm-lead-success-close:hover,
#tlm-lead-modal .tlm-lead-success-close:focus {
    background: #002c57;
    color: #ffffff;
    text-decoration: none;
    box-shadow: none;
}


/* =========================================================
   CONTACT FORM 7
   ========================================================= */

#tlm-lead-modal .wpcf7-form p {
    margin: 0;
    padding: 0;
}

#tlm-lead-modal .wpcf7-form br {
    display: none;
}

#tlm-lead-modal .tlm-cf7-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 14px;
    row-gap: 12px;
}

#tlm-lead-modal .tlm-cf7-field {
    min-width: 0;
    margin: 0;
    padding: 0;
}

#tlm-lead-modal .tlm-cf7-field label {
    display: block;
    margin: 0 0 5px;
    padding: 0;
    color: #26384a;
    font-family: "Lato", Arial, sans-serif;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    text-align: left;
    text-transform: none;
}

#tlm-lead-modal .wpcf7-form-control-wrap {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
}


/* =========================================================
   INPUT / SELECT
   ========================================================= */

#tlm-lead-modal .tlm-cf7-field input[type="text"],
#tlm-lead-modal .tlm-cf7-field input[type="email"],
#tlm-lead-modal .tlm-cf7-field input[type="tel"],
#tlm-lead-modal .tlm-cf7-field select {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 0;
    margin: 0;
    padding: 12px 25px;
    border: 1px solid #d7e0e8;
    border-radius: 6px;
    outline: none;
    background-color: #ffffff;
    color: #1f2937;
    font-family: "Lato", Arial, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 30px;
    text-align: left;
    text-transform: none;
    box-shadow: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

#tlm-lead-modal .tlm-cf7-field select {
    padding-right: 42px;
    cursor: pointer;

    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;

    background-image:
        linear-gradient(45deg, transparent 50%, #50718c 50%),
        linear-gradient(135deg, #50718c 50%, transparent 50%);
    background-position:
        calc(100% - 18px) 23px,
        calc(100% - 13px) 23px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

#tlm-lead-modal .tlm-cf7-field input[type="text"]:focus,
#tlm-lead-modal .tlm-cf7-field input[type="email"]:focus,
#tlm-lead-modal .tlm-cf7-field input[type="tel"]:focus,
#tlm-lead-modal .tlm-cf7-field select:focus {
    border-color: #4b99ca;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(75, 153, 202, 0.13);
}

#tlm-lead-modal .tlm-cf7-field input::placeholder {
    color: #94a3b8;
    opacity: 1;
}


/* =========================================================
   ERRORI VALIDAZIONE CF7
   ========================================================= */

#tlm-lead-modal .wpcf7-not-valid {
    border-color: #d9485f !important;
    box-shadow: 0 0 0 3px rgba(217, 72, 95, 0.1) !important;
}

#tlm-lead-modal .wpcf7-not-valid-tip {
    display: block;
    margin: 4px 0 0;
    padding: 0;
    color: #c72f47;
    font-family: "Lato", Arial, sans-serif;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.3;
    text-align: left;
}


/* =========================================================
   CONSENSI
   ========================================================= */

#tlm-lead-modal .tlm-cf7-consents {
    margin-top: 15px;
    padding: 14px;
}

#tlm-lead-modal .tlm-cf7-consents .wpcf7-list-item {
    display: block;
    margin: 0;
    padding: 0;
}

#tlm-lead-modal .tlm-cf7-consents label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    padding: 0;
    color: #526273;
    font-family: "Lato", Arial, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.45;
    text-align: left;
    text-transform: none;
    cursor: pointer;
}

#tlm-lead-modal .tlm-cf7-consents input[type="checkbox"] {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    min-width: 16px;
    min-height: 16px;
    margin: 1px 0 0;
    padding: 0;
    border-radius: 3px;
    accent-color: #003b73;
}


/* =========================================================
   SUBMIT
   ========================================================= */

#tlm-lead-modal .tlm-cf7-submit {
    margin-top: 17px;
    text-align: center;
}

#tlm-lead-modal .tlm-cf7-submit input[type="submit"] {
    display: block;
    width: 100%;
    min-height: 48px;
    margin: 0;
    padding: 16px 24px;
    border: 0;
    border-radius: 8px;
    background-color: #c4161c;
    color: #ffffff;
    font-size: 16px;
    line-height: 1.2;
    text-align: center;
    letter-spacing: 0.3px;
    cursor: pointer;
    box-shadow: none;
    appearance: none;
    transition:
        background-color 0.2s ease,
        transform 0.2s ease;
}

#tlm-lead-modal .tlm-cf7-submit input[type="submit"]:hover,
#tlm-lead-modal .tlm-cf7-submit input[type="submit"]:focus {
    background-color: #a91217;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: none;
}

#tlm-lead-modal .tlm-cf7-submit input[type="submit"]:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}


/* =========================================================
   SPINNER / MESSAGGI CF7
   ========================================================= */

/* Spinner CF7 - non occupa spazio quando è nascosto */
#tlm-lead-modal .wpcf7-spinner,
.tlm-lead-inline-form .wpcf7-spinner {
    display: none !important;
    visibility: hidden !important;
    width: 0;
    height: 0;
    margin: 0;
}

/* Spinner visibile durante l'invio */
#tlm-lead-modal form.submitting .wpcf7-spinner,
.tlm-lead-inline-form form.submitting .wpcf7-spinner,
#tlm-lead-modal .wpcf7-form.submitting .wpcf7-spinner,
.tlm-lead-inline-form .wpcf7-form.submitting .wpcf7-spinner {
    display: block !important;
    visibility: visible !important;
    width: 24px;
    height: 24px;
    margin: 10px auto 0;
}

#tlm-lead-modal .wpcf7-response-output {
    margin: 14px 0 0 !important;
    padding: 10px 12px !important;
    border-width: 1px !important;
    border-radius: 8px;
    font-family: "Lato", Arial, sans-serif;
    font-size: 12px;
    line-height: 1.45;
    text-align: left;
}


/* =========================================================
   CAMPI HIDDEN CF7
   ========================================================= */

#tlm-lead-modal fieldset.hidden-fields-container,
#tlm-lead-modal .hidden-fields-container {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {
    #tlm-lead-modal.tlm-lead-modal.is-open {
        padding: 10px;
        align-items: start;
    }

    #tlm-lead-modal .tlm-lead-modal-box {
        max-height: calc(100vh - 20px);
        padding: 30px 20px;
        border-radius: 15px;
    }

    #tlm-lead-modal .tlm-lead-modal-box h3,
    #tlm-lead-modal .tlm-lead-modal-box #tlm-lead-modal-title {
        font-size: 23px;
        line-height: 1.15;
    }

    #tlm-lead-modal .tlm-lead-intro #tlm-lead-modal-description {
        font-size: 14px;
        line-height: 1.5;
    }

    #tlm-lead-modal .tlm-cf7-grid {
        grid-template-columns: 1fr;
        row-gap: 10px;
    }

    #tlm-lead-modal .tlm-cf7-consents {
        margin-top: 12px;
        padding: 12px;
    }

    #tlm-lead-modal .tlm-cf7-submit {
        margin-top: 14px;
    }
}

/* =========================================================
   FORM ESPLICITE TELEMAT - MESSAGGI CF7
   ========================================================= */

.tlm-lead-inline-form .wpcf7-response-output {
    display: none !important;
}

/* Errori campo - form esplicite */
.tlm-lead-inline-form .wpcf7-not-valid {
    border-color: #d9485f !important;
    box-shadow: 0 0 0 3px rgba(217, 72, 95, 0.1) !important;
}

.tlm-lead-inline-form .wpcf7-not-valid-tip {
    display: block;
    margin: 4px 0 0;
    padding: 0;
    color: #c72f47;
    font-family: "Lato", Arial, sans-serif;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.3;
    text-align: left;
}

/* Success message - form esplicite */
.tlm-lead-inline-success {
    padding: 34px 24px;
    border-radius: 16px;
    background: #ffffff;
    text-align: center;
}

.tlm-lead-inline-success-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: #e8f7ef;
    color: #168451;
    font-family: Arial, sans-serif;
    font-size: 38px;
    font-weight: 700;
    line-height: 1;
}

.tlm-lead-inline-success h3 {
    display: block;
    margin: 0 0 12px;
    padding: 0;
    color: #003b73;
    font-family: "Urbanist", Arial, sans-serif;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-transform: none;
}

.tlm-lead-inline-success p {
    display: block;
    margin: 0 auto;
    padding: 0;
    color: #475569;
    font-family: "Lato", Arial, sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.6;
    text-align: center;
}

.tlm-lead-inline-form .wpcf7-form br {
    display: none;
}

/* =========================================================
   FORM ESPLICITA IN SIDEBAR - LABEL COME PLACEHOLDER
   ========================================================= */

.tlm-lead-sidebar-form .tlm-lead-inline-form .tlm-cf7-field {
    position: relative;
}

/* Label interna al campo */
.tlm-lead-sidebar-form .tlm-lead-inline-form .tlm-cf7-field label {
    position: absolute;
    top: 21px;
    left: 16px;
    z-index: 2;
    margin: 0;
    padding: 0 5px;
    color: #64748b;
    font-size: 16px;
    line-height: 1;
    pointer-events: none;
    transition:
        top 0.18s ease,
        font-size 0.18s ease,
        color 0.18s ease;
}

/* Campi più compatti */
.tlm-lead-sidebar-form .tlm-lead-inline-form .tlm-cf7-field input[type="text"],
.tlm-lead-sidebar-form .tlm-lead-inline-form .tlm-cf7-field input[type="email"],
.tlm-lead-sidebar-form .tlm-lead-inline-form .tlm-cf7-field input[type="tel"],
.tlm-lead-sidebar-form .tlm-lead-inline-form .tlm-cf7-field select {
    min-height: 56px;
    padding: 23px 16px 13px;
    font-size: 16px;
    line-height: 1;
}

/* Quando il campo è attivo, la label sale sopra */
.tlm-lead-sidebar-form .tlm-lead-inline-form .tlm-cf7-field:focus-within label {
    top: 10px;
    color: #003b73;
    font-size: 11px;
}

/* Se il campo contiene qualcosa, la label resta sopra */
.tlm-lead-sidebar-form .tlm-lead-inline-form .tlm-cf7-field:has(input[type="text"]:not(:placeholder-shown)) label,
.tlm-lead-sidebar-form .tlm-lead-inline-form .tlm-cf7-field:has(input[type="email"]:not(:placeholder-shown)) label,
.tlm-lead-sidebar-form .tlm-lead-inline-form .tlm-cf7-field:has(input[type="tel"]:not(:placeholder-shown)) label {
    top: 10px;
    color: #003b73;
    font-size: 11px;
}

/* Select provincia nella sidebar: usa la prima opzione come placeholder */
.tlm-lead-sidebar-form .tlm-lead-inline-form .tlm-cf7-field:has(select) label {
    position: static;
    display: none;
}

.tlm-lead-sidebar-form .tlm-lead-inline-form .tlm-cf7-field:has(select) select {
    min-height: 56px;
    padding: 16px 38px 16px 16px;
    line-height: 1.2;
    background-position:
        calc(100% - 17px) 25px,
        calc(100% - 12px) 25px;
}

/* Select: allineamento freccia nella versione compatta */
.tlm-lead-sidebar-form .tlm-lead-inline-form .tlm-cf7-field select {
    padding-right: 38px;
    background-position:
        calc(100% - 17px) 26px,
        calc(100% - 12px) 26px;
}

/* Consenso più compatto */
.tlm-lead-sidebar-form .tlm-lead-inline-form .tlm-cf7-consents {
    margin-top: 10px;
    padding: 8px 0;
}

/* Consenso più compatto */
.tlm-lead-sidebar-form .tlm-lead-inline-form .tlm-cf7-consents > p {
    line-height: 1;
    margin-bottom: 16px;
}

.tlm-lead-sidebar-form .tlm-lead-inline-form .tlm-cf7-consents label {
    font-size: 14px;
    line-height: 1.35;
    
}

.section-dark.tlm-lead-sidebar-form .tlm-lead-inline-form .tlm-cf7-consents label {
    color: rgba(255,255,255,.8);
}

.tlm-lead-sidebar-form .tlm-lead-inline-form .tlm-cf7-field > p {
    margin-bottom: 15px;
}

.tlm-lead-sidebar-form .tlm-lead-inline-form input[type="checkbox"] {
    margin-top: 5px;
}

.tlm-lead-inline-form .tlm-cf7-field input[type="text"], .tlm-lead-inline-form .tlm-cf7-field input[type="email"], .tlm-lead-inline-form .tlm-cf7-field input[type="tel"], .tlm-lead-inline-form .tlm-cf7-field select {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 0;
    margin: 0;
    padding: 12px 25px;
    border: 1px solid #d7e0e8;
    border-radius: 6px;
    outline: none;
    background-color: #ffffff;
    color: #1f2937;
    font-family: "Lato", Arial, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 30px;
    text-align: left;
    text-transform: none;
    box-shadow: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.tlm-lead-inline-form .tlm-cf7-field select {
    padding-right: 42px;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #50718c 50%), linear-gradient(135deg, #50718c 50%, transparent 50%);
    background-position: calc(100% - 18px) 23px, calc(100% - 13px) 23px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

.tlm-lead-inline-form .tlm-cf7-field input[type="text"]:focus, .tlm-lead-inline-form .tlm-cf7-field input[type="email"]:focus, .tlm-lead-inline-form .tlm-cf7-field input[type="tel"]:focus, .tlm-lead-inline-form .tlm-cf7-field select:focus {
    border-color: #4b99ca;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(75, 153, 202, 0.13);
}

.tlm-lead-inline-form .wpcf7-acceptance .wpcf7-list-item {
    margin: 0 0 0 0;
}

.tlm-lead-inline-form .tlm-cf7-submit input[type="submit"] {
    background-color: #C4161C;
    color: #ffffff;
    width: 100%;
    font-size: 16px;
    border-style: none;
    border-radius: 6px 6px 6px 6px;
    padding: 16px 32px 16px 32px;
    margin-bottom: 0;
}

.tlm-lead-inline-form .tlm-cf7-submit > p {
    margin-bottom: 0;
}

/* =========================================================
   FORM CONTATTI ESPLICITA
   ========================================================= */

.tlm-contact-form {
    width: 100%;
}

.tlm-contact-form .wpcf7-form {
    margin: 0;
}

.tlm-contact-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.tlm-contact-field,
.tlm-contact-privacy,
.tlm-contact-submit {
    min-width: 0;
}

.tlm-contact-field-full {
    grid-column: 1 / -1;
}

.tlm-contact-field label {
    display: block;
    margin-bottom: 7px;
    color: #003b73;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
}

.tlm-contact-field > p {
    margin-bottom: 0;
}

.tlm-contact-field input,
.tlm-contact-field select,
.tlm-contact-field textarea {
    display: block;
    width: 100%;
    min-height: 50px;
    padding: 12px 25px;
    border: 1px solid #d7e0e8;
    background: #ffffff;
    color: #1f2937;
    font-size: 16px;
    outline: none;
    box-sizing: border-box;
    border-radius: 6px;
    line-height: 30px;
}

.tlm-contact-form .tlm-contact-field select {
    height: 56px;
    min-height: 56px;
}

.tlm-contact-field textarea {
    min-height: 150px;
    resize: vertical;
}

.tlm-contact-field input:focus,
.tlm-contact-field select:focus,
.tlm-contact-field textarea:focus {
    border-color: #003b73;
    box-shadow: 0 0 0 3px rgba(0, 59, 115, 0.10);
}

.tlm-contact-field input::placeholder,
.tlm-contact-field textarea::placeholder {
    color: #94a3b8;
}

.tlm-contact-privacy {
    padding: 13px 0;
    color: #475569;
    font-size: 15px;
    line-height: 1.45;
}

.tlm-contact-privacy .wpcf7-list-item {
    margin: 0;
}

.tlm-contact-privacy label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
}

.tlm-contact-privacy input[type="checkbox"] {
    margin-top: 3px;
}

.tlm-contact-submit {
    display: flex;
    align-items: stretch;
    justify-content: end;
}

.tlm-contact-submit .wpcf7-submit {
    width: 100%;
    min-height: 50px;
    padding: 16px 34px;
    border: 0;
    border-radius: 999px;
    background: #c4161c;
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    line-height: 1.2;
    cursor: pointer;
    box-shadow: 0px 8px 30px 0px rgba(0, 0, 0, 0.15);
}

.tlm-contact-submit .wpcf7-submit:hover, .tlm-contact-submit .wpcf7-submit:focus {
    background: #a91217;
    color: #ffffff !important;
}

.tlm-contact-form .wpcf7-response-output {
    display: none !important;
}

.tlm-contact-form fieldset.hidden-fields-container,
.tlm-contact-form .hidden-fields-container {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
}

.tlm-contact-form .wpcf7-not-valid-tip {
    margin-top: 5px;
    color: #c4161c;
    font-size: 12px;
    font-weight: 700;
}

.tlm-contact-form .wpcf7-spinner {
    display: none !important;
    visibility: hidden !important;
}

.tlm-contact-form form.submitting .wpcf7-spinner,
.tlm-contact-form .wpcf7-form.submitting .wpcf7-spinner {
    display: block !important;
    visibility: visible !important;
    margin: 10px auto 0;
}

@media (min-width: 768px) {
    .tlm-contact-privacy {
        grid-column: 1 / span 1;
    }

    .tlm-contact-submit {
        grid-column: 2 / span 1;
    }
}

@media (max-width: 767px) {
    .tlm-contact-form-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .tlm-contact-field-full,
    .tlm-contact-privacy,
    .tlm-contact-submit {
        grid-column: 1 / -1;
    }

    .tlm-contact-submit .wpcf7-submit {
        width: 100%;
    }

    .tlm-contact-submit {
        justify-content: center;
    }
}

/* Campo messaggio nel modal CF7 */
.tlm-cf7-grid .tlm-cf7-field-full {
    grid-column: 1 / -1;
}

.tlm-cf7-message-field textarea {
    display: block;
    width: 100%;
    min-height: 90px;
    max-height: 180px;
    padding: 13px 15px;
    border: 1px solid #d7e0e8;
    border-radius: 12px;
    background: #ffffff;
    color: #1f2937;
    font-size: 15px;
    line-height: 1.45;
    resize: vertical;
    box-sizing: border-box;
    margin: 0;
}

.tlm-cf7-message-field textarea:focus {
    border-color: #003b73;
    box-shadow: 0 0 0 3px rgba(0, 59, 115, 0.10);
    outline: none;
}

.tlm-cf7-message-field textarea::placeholder {
    color: #94a3b8;
}

.tlm-lead-sidebar-form .tlm-lead-inline-form .tlm-cf7-field textarea {
    padding-top: 28px;
}

.tlm-lead-sidebar-form .tlm-lead-inline-form .tlm-cf7-field:has(textarea:not(:placeholder-shown)) label {
    top: 10px;
    color: #003b73;
    font-size: 11px;
}