/* ============================================================
   GP — ADD-ONS condivisi (giovannapileggi.it + gportho.it)
   1. Footer: blocco dati legali + disclaimer sanitario
   2. Modale WhatsApp con messaggio predisposto (apertura su scroll)
   ============================================================ */

/* ---------- 1. FOOTER LEGALE ---------- */

.footer-legal {

    margin-top: 40px;
    padding: 22px 26px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(152, 81, 153, .06), rgba(57, 181, 223, .06));
    border: 1px solid rgba(152, 81, 153, .12);

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px 30px;
    flex-wrap: wrap;

}

.footer-legal-id strong {

    display: block;
    font-family: 'Cormorant Garamond', serif;
    font-size: 21px;
    letter-spacing: .08em;
    color: var(--gp-violet);
    line-height: 1.2;

}

.footer-legal-id span {

    font-size: 12.5px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #6b747c;
    font-weight: 500;

}

.footer-legal-data {

    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    font-size: 13.5px;
    color: #55606b;

}

.footer-legal-data span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.footer-legal-data i {
    color: var(--gp-lilac);
    font-size: 12px;
}

.footer-disclaimer {

    margin-top: 16px;
    font-size: 12px;
    line-height: 1.6;
    color: #8a9298;

}

@media (max-width: 767px) {

    .footer-legal {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
    }

    .footer-legal-data {
        flex-direction: column;
        gap: 6px;
    }

}

/* ---------- 2. MODALE WHATSAPP ---------- */

.gp-wa-modal {

    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;

    visibility: hidden;
    pointer-events: none;

}

.gp-wa-modal.is-open {
    visibility: visible;
    pointer-events: auto;
}

.gp-wa-backdrop {

    position: absolute;
    inset: 0;
    background: rgba(38, 34, 60, .45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity .35s ease;

}

.gp-wa-modal.is-open .gp-wa-backdrop {
    opacity: 1;
}

.gp-wa-dialog {

    position: relative;
    width: 100%;
    max-width: 410px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;

    background: #fff;
    border-radius: 26px;
    box-shadow: 0 30px 80px rgba(38, 34, 60, .3);

    opacity: 0;
    transform: translateY(24px) scale(.96);
    transition: opacity .35s ease, transform .45s cubic-bezier(.2, .9, .3, 1.15);

}

.gp-wa-modal.is-open .gp-wa-dialog {
    opacity: 1;
    transform: none;
}

.gp-wa-close {

    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;

    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .22);
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;

}

.gp-wa-close:hover {
    background: rgba(255, 255, 255, .38);
    transform: rotate(90deg);
}

/* testata */

.gp-wa-head {

    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 24px 56px 22px 24px;
    background: linear-gradient(135deg, var(--gp-violet) 0%, var(--gp-lilac) 100%);
    color: #fff;
    overflow: hidden;

}

.gp-wa-head::after {

    content: '';
    position: absolute;
    right: -40px;
    top: -60px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);

}

.gp-wa-avatar {

    position: relative;
    flex: 0 0 58px;
    width: 58px;
    height: 58px;

}

.gp-wa-avatar img {

    width: 58px;
    height: 58px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top;
    border: 3px solid rgba(255, 255, 255, .85);
    background: #f3e9f3;

}

.gp-wa-online {

    position: absolute;
    right: 1px;
    bottom: 2px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #25D366;
    border: 2px solid #fff;

}

.gp-wa-online::after {

    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 2px solid #25D366;
    animation: gpWaPulse 2s ease-out infinite;

}

@keyframes gpWaPulse {
    0% {
        transform: scale(1);
        opacity: .8;
    }

    100% {
        transform: scale(2.2);
        opacity: 0;
    }
}

.gp-wa-eyebrow {

    display: block;
    font-size: 11.5px;
    letter-spacing: .1em;
    text-transform: uppercase;
    opacity: .85;
    font-weight: 500;

}

.gp-wa-head h3 {

    font-size: 25px;
    line-height: 1.15;
    color: #fff;
    margin-top: 2px;

}

/* corpo */

.gp-wa-body {
    padding: 20px 24px 24px;
}

.gp-wa-intro {

    font-size: 14.5px;
    color: #55606b;
    margin-bottom: 14px;

}

.gp-wa-chat {

    padding: 16px;
    border-radius: 18px;
    background-color: #EFE9E1;
    background-image: radial-gradient(rgba(152, 81, 153, .07) 1px, transparent 1px);
    background-size: 14px 14px;

}

.gp-wa-bubble {

    position: relative;
    margin-left: auto;
    max-width: 94%;
    padding: 10px 12px 22px;
    border-radius: 14px 4px 14px 14px;
    background: #DCF8C6;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .08);

}

.gp-wa-bubble textarea {

    display: block;
    width: 100%;
    min-height: 92px;
    border: 0;
    resize: vertical;
    background: transparent;
    font-family: 'Jost', sans-serif;
    font-size: 14.5px;
    line-height: 1.5;
    color: #1f2a30;
    outline: none;

}

.gp-wa-meta {

    position: absolute;
    right: 10px;
    bottom: 5px;
    font-size: 11px;
    color: #6a8a6a;

}

.gp-wa-meta i {
    color: #34B7F1;
    margin-left: 3px;
}

.gp-wa-edit-hint {

    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 12px;
    color: #7a6f66;

}

.gp-wa-disclaimer {

    display: flex;
    gap: 10px;
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--gp-bg);
    border: 1px solid rgba(152, 81, 153, .12);
    font-size: 12.5px;
    line-height: 1.55;
    color: #55606b;

}

.gp-wa-disclaimer i {
    color: var(--gp-violet);
    margin-top: 3px;
}

.gp-wa-disclaimer a {
    color: var(--gp-violet);
    text-decoration: underline;
}

.gp-wa-actions {

    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 18px;

}

.gp-wa-send {

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    border-radius: 999px;
    background: #25D366;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .04em;
    text-transform: uppercase;
    box-shadow: 0 10px 24px rgba(37, 211, 102, .35);
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;

}

.gp-wa-send i {
    font-size: 20px;
}

.gp-wa-send:hover {
    background: #1ebe5b;
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(37, 211, 102, .42);
}

.gp-wa-later {

    border: 0;
    background: none;
    padding: 8px;
    font-family: 'Jost', sans-serif;
    font-size: 13.5px;
    color: #8a9298;
    cursor: pointer;

}

.gp-wa-later:hover {
    color: var(--gp-violet);
}

/* mobile: bottom sheet */

@media (max-width: 575px) {

    .gp-wa-modal {
        align-items: flex-end;
        padding: 0;
    }

    .gp-wa-dialog {
        max-width: none;
        border-radius: 26px 26px 0 0;
        max-height: 92vh;
        transform: translateY(100%);
    }

    .gp-wa-dialog::before {

        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        z-index: 3;
        width: 42px;
        height: 4px;
        margin-left: -21px;
        border-radius: 4px;
        background: rgba(255, 255, 255, .6);

    }

    .gp-wa-head h3 {
        font-size: 22px;
    }

}

@media (prefers-reduced-motion: reduce) {

    .gp-wa-dialog,
    .gp-wa-backdrop {
        transition: none;
    }

    .gp-wa-online::after {
        animation: none;
    }

}

body.gp-wa-lock {
    overflow: hidden;
}

.gp-wa-send:focus {
    outline: none;
}

.gp-wa-send:focus-visible {
    outline: 3px solid rgba(37, 211, 102, .45);
    outline-offset: 3px;
}
