/**
 * CSS minimale per il popup off-canvas del funnel.
 * Caricato sulle pagine NON-funnel (homepage, pagine Elementor)
 * dove vengono usati gli shortcode [unidata_funnel_test] + [unidata_funnel_form].
 * NON contiene reset globali, stili body, header, footer, etc.
 */

:root {
    --unidata--primary--color--light: #de209a;
    --unidata--primary--color--dark: #ac19c2;
    --unidata--primary--font--dark: #1e272f;
    --unidata--primary--font--color: #687c8e;
    --unidata--primary--font--light: #c2c4c6;
    --unidata--border--light: #e8e8e8;
    --unidata--primary--shadow: #ecf7f9;
    --unidata--primary--background: #fbfbfb;
    --unidata--color--green: #00a24a;
    --unidata--color--violet: #47269c;
    --unidata--color--blue: #2b42a2;
    --unidata--color--azure: #2b6bb3;
    --unidata--secondary--color--light: #32bcda;
    --unidata--secondary--color--shadow: #7bc7d7;
}

/* =============================================
   OFF-CANVAS PANEL
   ============================================= */

#verifica-copertura {
    position: relative;
    z-index: 999999;
}

#verifica-copertura .box-off {
    width: 400px;
    position: fixed;
    top: 0;
    background-color: white;
    right: -100%;
    transition: right 0.5s;
    height: 100%;
    z-index: 999999;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
}

#verifica-copertura .box-off.open {
    right: 0;
}

#verifica-copertura .box-off-screen {
    background-color: rgba(0,0,0,0.5);
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
}

#verifica-copertura .box-off-close {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: white;
    top: 10px;
    left: -50px;
    cursor: pointer;
    transition: opacity 0.5s;
    z-index: 1;
}

#verifica-copertura .box-off-close:hover {
    opacity: 0.8;
}

#verifica-copertura .box-off-close::after,
#verifica-copertura .box-off-close::before {
    content: "";
    width: 13px;
    height: 2px;
    display: block;
    background-color: #000;
    position: absolute;
    top: 20px;
    left: 13px;
}

#verifica-copertura .box-off-close::before {
    transform: rotate(-45deg);
}

#verifica-copertura .box-off-close::after {
    transform: rotate(45deg);
}

/* =============================================
   OFF-CANVAS CONTENT
   ============================================= */

.box-off-content {
    overflow-y: auto;
    padding: 30px;
    height: 100%;
    box-sizing: border-box;
    font-family: 'Rubik', sans-serif;
}

.box-off-content * {
    box-sizing: border-box;
}

.box-off-content .form-container .form_head .head-content:not(.nocode) h2 {
    color: var(--unidata--primary--font--dark);
    margin-bottom: 0;
}

.box-off-content .form-container h2 {
    text-align: center;
    color: var(--unidata--primary--font--color);
    font-size: 26px;
    margin: 0 0 20px;
    font-weight: 500;
}

.box-off-content .form-container h3,
.box-off-content .form-container h4 {
    font-size: 18px;
    font-weight: 300;
    margin: 15px 0;
}

.box-off-content .form-container h4 {
    text-align: center;
}

.box-off-content .form-container .head-content {
    margin-bottom: 20px;
}

.box-off-content .form-container .head-content:not(.nocode),
.box-off-content .form-container .head-content {
    display: none;
}

.box-off-content .form-container .head-content h3 {
    font-size: 14px;
    font-weight: 500;
    color: var(--unidata--primary--color--light);
    text-align: center;
    margin: 0 0 10px;
}

.box-off-content .form-container .form_head .head-content:not(.nocode) h2 {
    color: var(--unidata--primary--font--dark);
    margin-bottom: 0;
}

.box-off-content .form-container .form_head h5 {
    margin: 0;
    text-align: center;
}

.prezzo-prodotto h5 {
    font-size: 18px;
    text-align: center;
}

.prezzo-prodotto em {
    color: var(--unidata--primary--color--light);
    font-weight: 500;
    font-style: normal;
}

/* =============================================
   FORM FIELDS
   ============================================= */

.box-off-content p,
.box-off-content .lp-form-field,
.box-off-content .ui-widget {
    margin: 15px 0;
    position: relative;
}

.box-off-content input[type="text"],
.box-off-content input[type="email"],
.box-off-content input[type="number"],
.box-off-content input[type="tel"],
.box-off-content textarea,
.box-off-content select {
    border: 1px solid var(--unidata--border--light);
    border-radius: 5px;
    padding: 14px 20px;
    width: 100%;
    font-weight: 300;
    font-size: 16px;
    color: var(--unidata--primary--font--dark);
    font-family: 'Rubik', sans-serif;
    outline: none;
    transition: border 0.2s;
}

.box-off-content input[type="text"]:focus,
.box-off-content input[type="email"]:focus,
.box-off-content input[type="number"]:focus,
.box-off-content input[type="tel"]:focus,
.box-off-content textarea:focus,
.box-off-content select:focus {
    border-color: var(--unidata--secondary--color--light);
}

.box-off-content textarea {
    resize: none;
    height: 220px;
}

.box-off-content .ui-widget span {
    display: none;
}

.box-off-content .ui-widget input:focus + span,
.box-off-content .ui-widget textarea:focus + span {
    display: block !important;
    font-weight: 300;
    color: var(--unidata--secondary--color--light);
    font-size: 12px;
    position: absolute;
    top: -8px;
    background-color: white;
    left: 10px;
    padding: 0 5px;
}

.box-off-content .ui-widget.load::after {
    content: "\f2f1";
    font-family: "Font Awesome 5 Free";
    font-weight: 600;
    color: #667b8f;
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 18px;
    animation-name: spin;
    animation-duration: 1s;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
    display: none;
}

.box-off-content .ui-widget.load.active::after {
    display: block;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* =============================================
   AUTOCOMPLETE RESULTS
   ============================================= */

.box-off-content #risultatiCittaComune,
.box-off-content #risultatiIndirizzo,
.box-off-content #risultatiCivico {
    position: absolute;
    z-index: 999;
    background-color: white;
}

.box-off-content #risultatiCittaComune ul,
.box-off-content #risultatiIndirizzo ul,
.box-off-content #risultatiCivico ul {
    border: 1px solid var(--unidata--border--light);
    box-shadow: 0px 10px 10px 5px var(--unidata--primary--shadow);
    padding: 5px 0;
    list-style: none;
    margin: 0;
}

.box-off-content #risultatiCittaComune li,
.box-off-content #risultatiIndirizzo li,
.box-off-content #risultatiCivico li {
    font-weight: 300;
    padding: 5px 20px;
    color: var(--unidata--primary--font--color);
    cursor: pointer;
}

.box-off-content #risultatiCittaComune li:hover,
.box-off-content #risultatiIndirizzo li:hover,
.box-off-content #risultatiCivico li:hover {
    color: var(--unidata--secondary--color--light);
}

/* =============================================
   PRIVACY & SUBMIT
   ============================================= */

.box-off-content .privacy-policy-text {
    color: var(--unidata--primary--font--color);
    padding-left: 20px;
    position: relative;
    font-size: 13px;
    margin: 10px 0;
}

.box-off-content .privacy-policy-text p {
    font-size: 13px;
}

.box-off-content .lp-form-row-3 .privacy-policy-text {
    margin: 15px 0;
}

.box-off-content .privacy-policy-text a {
    color: var(--unidata--primary--font--color);
    font-weight: 500;
    transition: color 0.2s;
}

.box-off-content .privacy-policy-text a:hover {
    color: var(--unidata--secondary--color--light);
}

.box-off-content .privacy-policy-text .policy-copyright {
    position: absolute;
    left: 0;
    top: 2px;
    cursor: pointer;
}

.box-off-content input[type=submit],
#verifica-copertura input[type="button"]#checkcopertura {
    width: 100%;
    background-color: var(--unidata--secondary--color--light);
    background: var(--unidata--primary--color--light);
    background: -webkit-linear-gradient(left, var(--unidata--primary--color--light) 0%, var(--unidata--primary--color--dark) 100%);
    background: linear-gradient(to right, var(--unidata--primary--color--light) 0%, var(--unidata--primary--color--dark) 100%);
    color: white;
    border-radius: 5px;
    padding: 18px 20px;
    font-weight: 600;
    font-size: 16px;
    border: 0;
    outline: none;
    cursor: pointer;
    transition: background-color 0.5s;
    font-family: 'Rubik', sans-serif;
}

.box-off-content input[type="submit"]:not(:disabled):hover,
#verifica-copertura input[type="button"]#checkcopertura:not(:disabled):hover {
    background: #2b43a2;
}

.form-container.go input:invalid {
    border-color: var(--unidata--primary--color--light) !important;
}

/* =============================================
   FORM TITLE
   ============================================= */

.box-off-content .lp-form-title {
    text-align: center;
    margin-bottom: 20px;
}

.box-off-content .lp-form-title .promo {
    font-size: 14px;
    color: var(--unidata--primary--color--light);
    font-weight: 500;
}

/* =============================================
   CODICE PRODOTTO (span nascosto nel bottone legacy)
   ============================================= */

.codice-prodotto span {
    display: none;
}

/* =============================================
   CTA "VERIFICA COPERTURA" (pagina Privati / pagine Elementor)
   ============================================= */

.codice-prodotto > a.open-off-canvas.elementor-button {
    background-color: #ff00a5 !important;
    width: 100% !important;
    display: inline-block;
    border-radius: 20px !important;
    font-size: 14px !important;
}

.codice-prodotto > a.open-off-canvas.elementor-button:hover,
.codice-prodotto > a.open-off-canvas.elementor-button:focus {
    background-color: #ff4bbf !important;
}

/* CTA pagina P.IVA — stesso stile, colore blu */
.codice-prodotto-piva > a.open-off-canvas.elementor-button {
    background-color: #3d40d0 !important;
}
.codice-prodotto-piva > a.open-off-canvas.elementor-button:hover,
.codice-prodotto-piva > a.open-off-canvas.elementor-button:focus {
    background-color: #3d4ddd9e !important;
}

/* =============================================
   RESPONSIVE - MOBILE
   ============================================= */

@media screen and (max-width: 768px) {
    #verifica-copertura .box-off-close::before,
    #verifica-copertura .box-off-close::after {
        background-color: white;
    }

    #verifica-copertura .box-off {
        width: 100%;
        right: calc(-100% - 20px);
        height: 100%;
        z-index: 9999999999;
    }

    #verifica-copertura .box-off-close {
        left: 20px;
        background-color: var(--unidata--primary--color--light);
    }
}
