.hm-wa-sticky,
.hm-wa-sticky * {
    box-sizing: border-box;
}

.hm-wa-sticky {
    --hm-wa-brand: #284430;
    --hm-wa-brand-dark: #1d3324;
    --hm-wa-green: #1fa855;
    --hm-wa-yellow: #f6bd22;
    --hm-wa-ink: #1f2a24;
    position: fixed;
    right: 24px;
    bottom: calc(28px + env(safe-area-inset-bottom, 0px));
    z-index: 100000;
    font-family: Arial, Helvetica, sans-serif;
    transition: transform .28s cubic-bezier(.2, .75, .3, 1), opacity .2s ease;
}

.hm-wa-sticky.is-docked:not(.is-open) {
    opacity: .54;
    transform: translateX(47px) scale(.94);
}

.hm-wa-sticky.is-docked:not(.is-open) .hm-wa-sticky__tooltip {
    display: none;
}

.hm-wa-sticky__trigger {
    position: relative;
    display: grid;
    align-items: center;
    justify-content: flex-start;
    width: 124px;
    height: 68px;
    margin: 0;
    padding: 0 0 0 7px;
    border: 2px solid var(--hm-wa-brand);
    border-radius: 36px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 8px 24px rgba(20, 59, 34, .3);
    cursor: pointer;
    transform: translateX(55px);
    transition: transform .18s ease, box-shadow .18s ease;
}

.hm-wa-sticky__trigger:hover {
    transform: translateX(55px) translateY(-3px) scale(1.03);
    box-shadow: 0 12px 29px rgba(20, 59, 34, .38);
}

.hm-wa-sticky__trigger:focus-visible,
.hm-wa-sticky__close:focus-visible,
.hm-wa-sticky__whatsapp:focus-visible {
    outline: 3px solid var(--hm-wa-yellow);
    outline-offset: 3px;
}

.hm-wa-sticky__trigger-icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    color: #fff;
    background: var(--hm-wa-green);
    border-radius: 50%;
}

.hm-wa-sticky__trigger-icon svg {
    width: 34px;
    height: 34px;
    fill: currentColor;
}

.hm-wa-sticky__tooltip {
    position: absolute;
    top: 50%;
    right: 130px;
    width: max-content;
    padding: 9px 12px;
    color: #fff;
    background: var(--hm-wa-brand);
    border-radius: 8px;
    box-shadow: 0 5px 16px rgba(20, 59, 34, .24);
    font-size: 13px;
    font-weight: 700;
    opacity: 0;
    pointer-events: none;
    transform: translate(8px, -50%);
    transition: opacity .16s ease, transform .16s ease;
}

.hm-wa-sticky__tooltip::after {
    position: absolute;
    top: 50%;
    right: -6px;
    width: 12px;
    height: 12px;
    background: var(--hm-wa-brand);
    content: "";
    transform: translateY(-50%) rotate(45deg);
}

.hm-wa-sticky__trigger:hover .hm-wa-sticky__tooltip,
.hm-wa-sticky__trigger:focus-visible .hm-wa-sticky__tooltip {
    opacity: 1;
    transform: translate(0, -50%);
}

.hm-wa-sticky__panel {
    position: absolute;
    right: 0;
    bottom: 76px;
    width: min(430px, calc(100vw - 32px));
    max-height: calc(100vh - 118px);
    max-height: calc(100dvh - 118px);
    padding: 24px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    color: var(--hm-wa-ink);
    background: #fff;
    border: 1px solid #dfe7e0;
    border-radius: 18px;
    box-shadow: 0 18px 52px rgba(20, 42, 27, .25);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(.98);
    transform-origin: bottom right;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
    -webkit-overflow-scrolling: touch;
}

.hm-wa-sticky.is-open .hm-wa-sticky__panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.hm-wa-sticky__close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    color: #526057;
    background: transparent;
    border: 0;
    border-radius: 50%;
    font: 30px/34px Arial, sans-serif;
    cursor: pointer;
    z-index: 5;
    pointer-events: auto;
}

.hm-wa-sticky__close:hover {
    background: #f1f5f1;
}

.hm-wa-sticky__close:active {
    background: #e5ece6;
    transform: scale(.96);
}

.hm-wa-sticky__avatar {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin-bottom: 14px;
    color: #fff;
    background: var(--hm-wa-green);
    border-radius: 16px;
}

.hm-wa-sticky__avatar svg {
    width: 31px;
    height: 31px;
    fill: currentColor;
}

.hm-wa-sticky__eyebrow {
    margin: 0 0 5px !important;
    color: var(--hm-wa-brand) !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.hm-wa-sticky__panel h2 {
    margin: 0 38px 10px 0 !important;
    color: var(--hm-wa-brand) !important;
    font-size: 22px !important;
    line-height: 1.2 !important;
}

.hm-wa-sticky__panel p:not(.hm-wa-sticky__eyebrow) {
    margin: 0 0 18px !important;
    color: #4f5c53 !important;
    font-size: 15px !important;
    line-height: 1.5 !important;
}

.hm-wa-sticky__panel p.hm-wa-sticky__notice {
    margin: -4px 0 18px !important;
    padding: 10px 12px;
    color: #4d3a0b !important;
    background: #fff8dc;
    border-left: 4px solid var(--hm-wa-yellow);
    border-radius: 7px;
    font-size: 13px !important;
    line-height: 1.4 !important;
}

.hm-wa-sticky__form {
    display: grid;
    grid-template-columns: minmax(90px, .55fr) minmax(0, 1.45fr);
    gap: 12px;
}

.hm-wa-sticky__field {
    display: grid;
    gap: 5px;
    margin: 0;
}

.hm-wa-sticky__field--wide,
.hm-wa-sticky__error,
.hm-wa-sticky__whatsapp,
.hm-wa-sticky__qr {
    grid-column: 1 / -1;
}

.hm-wa-sticky__field > span {
    color: var(--hm-wa-brand);
    font-size: 12px;
    font-weight: 800;
}

.hm-wa-sticky__field > span small {
    color: #737d76;
    font-size: 10px;
    font-weight: 500;
}

.hm-wa-sticky__field input,
.hm-wa-sticky__field textarea {
    width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 9px 11px;
    color: var(--hm-wa-ink);
    background: #fff;
    border: 1px solid #b9c7bc;
    border-radius: 8px;
    font: 16px/1.35 Arial, Helvetica, sans-serif;
}

.hm-wa-sticky__field textarea {
    min-height: 72px;
    resize: vertical;
}

.hm-wa-sticky__field input:focus,
.hm-wa-sticky__field textarea:focus {
    border-color: var(--hm-wa-brand);
    outline: 3px solid rgba(40, 68, 48, .15);
}

.hm-wa-sticky__field input::placeholder,
.hm-wa-sticky__field textarea::placeholder {
    color: #9aa39c;
    opacity: 1;
}

.hm-wa-sticky__error {
    margin: 0 !important;
    padding: 9px 11px;
    color: #8b1a1a !important;
    background: #fff0f0;
    border-left: 4px solid #c92828;
    border-radius: 7px;
    font-size: 12px !important;
}

.hm-wa-sticky__product {
    margin: -4px 0 16px;
    padding: 10px 12px;
    color: #3f361e;
    background: #fff8dc;
    border-left: 4px solid var(--hm-wa-yellow);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.4;
}

.hm-wa-sticky__product[hidden] {
    display: none;
}

.hm-wa-sticky__qr {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 2px;
    padding: 12px;
    background: #f5f8f4;
    border: 1px solid #dfe7e0;
    border-radius: 12px;
}

.hm-wa-sticky__qr[hidden] {
    display: none;
}

.hm-wa-sticky__qr-code {
    display: grid;
    place-items: center;
    width: 132px;
    height: 132px;
    flex: 0 0 132px;
    padding: 5px;
    overflow: hidden;
    background: #fff;
    border-radius: 8px;
}

.hm-wa-sticky__qr-code svg {
    display: block;
    width: 100%;
    height: 100%;
}

.hm-wa-sticky__qr > div:last-child {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.hm-wa-sticky__qr strong {
    color: var(--hm-wa-brand);
    font-size: 13px;
}

.hm-wa-sticky__qr span,
.hm-wa-sticky__qr small {
    color: #68736b;
    font-size: 11px;
    line-height: 1.4;
}

.hm-wa-sticky__qr small {
    color: #357348;
    font-weight: 800;
}

.hm-wa-sticky__whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 48px;
    padding: 11px 16px;
    color: #fff !important;
    background: var(--hm-wa-green);
    border-radius: 10px;
    font-size: 15px;
    font-weight: 800;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none !important;
}

.hm-wa-sticky__whatsapp:hover {
    color: #fff !important;
    background: #147f3e;
}

.hm-wa-sticky__whatsapp svg {
    width: 23px;
    height: 23px;
    fill: currentColor;
}

.hm-wa-sticky__panel > small {
    display: block;
    margin-top: 9px;
    color: #737d76;
    font-size: 11px;
    text-align: center;
}

.hm-wa-sticky__panel > small a {
    color: var(--hm-wa-brand) !important;
    font-weight: 700;
}

.hm-wa-sticky__backdrop {
    display: none;
}

@media (max-width: 767px) {
    .sticky-icons-wrapper.mobile {
        display: none !important;
    }

    .hm-wa-sticky {
        right: 16px;
        bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    }

    .hm-wa-sticky.is-docked:not(.is-open) {
        opacity: .58;
        transform: translateX(44px) scale(.92);
    }

    .hm-wa-sticky__trigger {
        width: 110px;
        height: 62px;
        padding-left: 5px;
        transform: translateX(50px);
    }

    .hm-wa-sticky__trigger-icon {
        width: 52px;
        height: 52px;
    }

    .hm-wa-sticky__trigger-icon svg {
        width: 31px;
        height: 31px;
    }

    .hm-wa-sticky__tooltip {
        display: none;
    }

    .hm-wa-sticky__panel {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        max-height: calc(100vh - 28px);
        max-height: calc(100dvh - 12px - env(safe-area-inset-top, 0px));
        max-height: calc(var(--hm-wa-visible-height, 100dvh) - 12px - env(safe-area-inset-top, 0px));
        padding: 26px 20px calc(22px + env(safe-area-inset-bottom, 0px));
        overflow-y: auto;
        border: 0;
        border-radius: 22px 22px 0 0;
        transform: translateY(105%);
        transform-origin: bottom center;
    }

    .hm-wa-sticky__form {
        grid-template-columns: 1fr;
    }

    .hm-wa-sticky__qr {
        display: none !important;
    }

    .hm-wa-sticky.is-open .hm-wa-sticky__panel {
        transform: translateY(0);
    }

    .hm-wa-sticky__backdrop {
        position: fixed;
        inset: 0;
        display: block;
        background: rgba(20, 31, 23, .48);
        opacity: 0;
        visibility: hidden;
        transition: opacity .2s ease, visibility .2s;
    }

    .hm-wa-sticky.is-open .hm-wa-sticky__backdrop {
        opacity: 1;
        visibility: visible;
    }

    .hm-wa-sticky.is-open .hm-wa-sticky__trigger {
        visibility: hidden;
    }

    body.hm-wa-sticky-open {
        overflow: hidden;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hm-wa-sticky,
    .hm-wa-sticky__trigger,
    .hm-wa-sticky__panel,
    .hm-wa-sticky__backdrop {
        transition: none;
    }
}
