.whatsapp-lead {
    position: fixed;
    inset-inline-end: 20px;
    bottom: 20px;
    z-index: 80;
    padding: 0;
    border: 0;
}

.whatsapp-lead > summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: auto;
    min-width: 132px;
    height: 56px;
    padding: 0 18px;
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 999px;
    background: #168c50;
    color: #fff;
    box-shadow: 0 14px 34px rgba(7, 63, 36, .3);
    font-size: 14px;
    font-weight: 850;
    line-height: 1;
    text-align: center;
    cursor: pointer;
    list-style: none;
    transition: background .2s, transform .2s, box-shadow .2s;
}

.whatsapp-lead > summary::-webkit-details-marker {
    display: none;
}

.whatsapp-lead > summary::after {
    content: none;
    display: none;
}

.whatsapp-lead[open] > summary::after {
    content: none;
    display: none;
}

.whatsapp-lead > summary:hover {
    background: #107442;
    box-shadow: 0 16px 40px rgba(7, 63, 36, .36);
    transform: translateY(-2px);
}

.whatsapp-lead > summary svg {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    fill: currentColor;
}

.whatsapp-lead[open] > summary {
    background: #0c6337;
}

.whatsapp-lead > form {
    position: absolute;
    inset-inline-end: 0;
    bottom: 70px;
    width: min(390px, calc(100vw - 32px));
    max-height: calc(100vh - 112px);
    max-height: calc(100dvh - 112px);
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid #d8e3e8;
    border-radius: 22px;
    background: #fff;
    color: #0b1728;
    box-shadow: 0 26px 70px rgba(7, 25, 43, .28);
    text-align: start;
    overscroll-behavior: contain;
}

.whatsapp-panel-header {
    position: relative;
    display: grid;
    grid-template-columns: 44px 1fr 40px;
    gap: 12px;
    align-items: start;
    padding: 22px 20px 18px;
    background: linear-gradient(145deg, #0d7040, #169455);
    color: #fff;
}

.whatsapp-panel-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: rgba(255, 255, 255, .16);
}

.whatsapp-panel-icon svg {
    width: 24px;
    height: 24px;
    fill: #fff;
}

.whatsapp-panel-header strong {
    display: block;
    margin: 1px 0 5px;
    color: #fff;
    font-size: 20px;
    line-height: 1.2;
}

.whatsapp-lead .whatsapp-panel-header p {
    margin: 0;
    color: rgba(255, 255, 255, .9);
    font-size: 13px;
    line-height: 1.55;
}

.whatsapp-panel-close {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 9px;
    background: rgba(0, 0, 0, .12);
    color: #fff;
    font-size: 23px;
    line-height: 1;
    cursor: pointer;
}

.whatsapp-lead form .whatsapp-service-field {
    display: block;
    margin: 0;
    padding: 20px 20px 0;
    color: #26394a;
    font-size: 12px;
    font-weight: 800;
}

.whatsapp-contact-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 20px 20px 0;
}

.whatsapp-form-errors {
    margin: 16px 20px 0;
    padding: 10px 12px;
    border: 1px solid #f1b3ad;
    border-radius: 9px;
    background: #fff1ef;
    color: #9c241b;
    font-size: 13px;
    line-height: 1.45;
}

.whatsapp-lead form .whatsapp-contact-fields label {
    display: block;
    margin: 0;
    color: #26394a;
    font-size: 12px;
    font-weight: 800;
}

.whatsapp-contact-fields span {
    display: block;
    margin-bottom: 8px;
}

.whatsapp-contact-fields input {
    display: block;
    width: 100%;
    min-height: 48px;
    margin: 0;
    padding: 11px 13px;
    border: 1px solid #b8c9d2;
    border-radius: 11px;
    background: #fff;
    color: #0b1728;
    font-size: 15px;
}

.whatsapp-contact-fields input:focus,
.whatsapp-service-field select:focus {
    border-color: #168c50;
    outline: 3px solid rgba(22, 140, 80, .14);
}

.whatsapp-service-field > span {
    display: block;
    margin-bottom: 8px;
}

.whatsapp-service-field select {
    display: block;
    width: 100%;
    min-height: 50px;
    margin: 0;
    padding: 11px 42px 11px 13px;
    border: 1px solid #b8c9d2;
    border-radius: 11px;
    background: #fff;
    color: #0b1728;
    font-size: 15px;
}

[dir="rtl"] .whatsapp-service-field select {
    padding-right: 13px;
    padding-left: 42px;
}

.whatsapp-lead .whatsapp-consent {
    display: grid !important;
    grid-template-columns: 20px 1fr;
    gap: 10px;
    align-items: start;
    margin: 0;
    padding: 17px 20px 15px;
    color: #435666;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.55;
}

.whatsapp-consent input {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    accent-color: #168c50;
}

.whatsapp-continue {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: calc(100% - 40px);
    min-height: 50px;
    margin: 0 20px 20px;
    padding: 12px 16px;
    border: 0;
    border-radius: 11px;
    background: #168c50;
    color: #fff;
    font-size: 14px;
    font-weight: 850;
    cursor: pointer;
}

.whatsapp-continue:hover {
    background: #107442;
}

@media (max-width: 600px) {
    .whatsapp-lead {
        inset-inline-end: 14px;
        bottom: 14px;
    }

    .whatsapp-lead > summary {
        min-width: 128px;
        width: auto;
        height: 58px;
        padding: 0 17px;
    }

    .whatsapp-lead > form {
        position: fixed;
        inset-inline: 12px;
        bottom: 84px;
        width: auto;
        max-height: calc(100vh - 104px);
        max-height: calc(100dvh - 104px);
        overflow-y: auto;
        border-radius: 18px;
    }

    .whatsapp-panel-header {
        grid-template-columns: 40px 1fr 40px;
        padding: 18px 16px 15px;
    }

    .whatsapp-panel-icon {
        width: 40px;
        height: 40px;
    }

    .whatsapp-panel-header strong {
        font-size: 18px;
    }

    .whatsapp-contact-fields {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 17px 16px 0;
    }

    .whatsapp-form-errors {
        margin-inline: 16px;
    }

    .whatsapp-service-field {
        padding: 17px 16px 0;
    }

    .whatsapp-lead .whatsapp-consent {
        padding: 15px 16px 13px;
    }

    .whatsapp-continue {
        width: calc(100% - 32px);
        margin: 0 16px 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .whatsapp-lead > summary {
        transition: none;
    }
}
