.ecl-wa-widget,
.ecl-wa-checkout,
.ecl-wa-handoff {
    font-family: "ECL Outfit", Outfit, system-ui, sans-serif;
}

.ecl-wa-widget {
    --ecl-wa-launcher-size: 48px;
    --ecl-wa-icon-size: 25px;
    position: fixed;
    z-index: 60;
    inset-inline-end: max(16px, env(safe-area-inset-right, 0px));
    bottom: calc(14px + max(var(--ecl-wa-dock, 0px), env(safe-area-inset-bottom, 0px)));
    color: #142a23;
}

.ecl-wa-launcher {
    display: grid;
    width: var(--ecl-wa-launcher-size);
    height: var(--ecl-wa-launcher-size);
    place-items: center;
    padding: 0;
    border-radius: 50%;
    background: #116749;
    box-shadow: 0 3px 14px #142a232e;
    color: #fff;
    cursor: pointer;
    list-style: none;
}

.ecl-wa-launcher::-webkit-details-marker { display: none; }
.ecl-wa-launcher svg {
    width: var(--ecl-wa-icon-size);
    height: var(--ecl-wa-icon-size);
}

@media (min-width: 992px) {
    .ecl-wa-widget {
        --ecl-wa-launcher-size: 64px;
        --ecl-wa-icon-size: 32px;
    }
}

.ecl-wa-widget :focus-visible,
.ecl-wa-checkout-action:focus-visible,
.ecl-wa-handoff a:focus-visible {
    outline: 2px solid #116749;
    outline-offset: 3px;
}

.ecl-wa-hint,
.ecl-wa-panel {
    border: 1px solid #dce8e1;
    background: #fff;
    box-shadow: 0 5px 22px #142a231a;
}

.ecl-wa-hint {
    position: absolute;
    inset-inline-end: calc(var(--ecl-wa-launcher-size) + 10px);
    top: 50%;
    transform: translateY(-50%);
    width: max-content;
    max-width: calc(100vw - 90px);
    padding: 9px 12px;
    border-radius: 11px;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 550;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .15s ease, visibility .15s;
}

.ecl-wa-widget[data-idle-hint] .ecl-wa-hint,
.ecl-wa-widget:has(.ecl-wa-launcher:focus-visible) .ecl-wa-hint {
    opacity: 1;
    visibility: visible;
}

@media (hover: hover) and (pointer: fine) {
    .ecl-wa-widget:has(.ecl-wa-launcher:hover) .ecl-wa-hint {
        opacity: 1;
        visibility: visible;
    }
}

.ecl-wa-widget:has(details[open]) .ecl-wa-hint { display: none; }

.ecl-wa-panel {
    position: absolute;
    inset-inline-end: 0;
    bottom: calc(var(--ecl-wa-launcher-size) + 10px);
    width: min(284px, calc(100vw - 32px));
    padding: 16px;
    border-radius: 16px;
}

.ecl-wa-question {
    display: block;
    padding-inline-end: 32px;
    font-size: 16px;
    line-height: 1.3;
    font-weight: 650;
}

.ecl-wa-panel p { margin: 6px 0 13px; color: #52665c; font-size: 13px; }

.ecl-wa-close {
    position: absolute;
    inset-inline-end: 4px;
    top: 4px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #53675e;
    font-size: 24px;
    line-height: 1;
}

.ecl-wa-close:hover { background: #f1f6f3; }

.ecl-wa-chat,
.ecl-wa-checkout-action {
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #c6dbcf;
    border-radius: 9px;
    background: #eff6f1;
    color: #14543d;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.ecl-wa-chat:hover,
.ecl-wa-checkout-action:hover { background: #e0efe5; color: #123f30; }
.ecl-wa-chat svg,
.ecl-wa-checkout-action svg { width: 18px; height: 18px; flex: none; }
.ecl-wa-checkout { margin-top: 4px; }
.ecl-wa-checkout-note {
    display: block;
    margin-top: 4px;
    color: #54685e;
    font-size: 12px;
    text-align: center;
}

.o_mobile_summary .ecl-wa-checkout-note { display: none; }
.ecl-wa-handoff { width: min(680px, calc(100% - 32px)); margin: 48px auto; }
.ecl-wa-handoff .ecl-wa-chat { width: fit-content; margin-bottom: 24px; }
.ecl-wa-handoff label { display: block; margin-bottom: 6px; font-weight: 600; }
.ecl-wa-handoff textarea { width: 100%; padding: 12px; border: 1px solid #c6dbcf; border-radius: 9px; }

body.editor_enable .ecl-wa-widget,
body.ecl-categories-open .ecl-wa-widget,
body.o_website_sale_checkout .ecl-wa-widget,
body:has(.ecl-shop-portal, .ecl-nav-open, .modal.show, .offcanvas.show, .offcanvas.showing) .ecl-wa-widget {
    display: none;
}

@media (max-width: 767px) {
    .ecl-wa-widget[data-whatsapp-context="product"] {
        --ecl-wa-dock: calc(72px + env(safe-area-inset-bottom, 0px));
    }
    body:has(#wrapwrap :is(input, textarea, select, [contenteditable="true"]):focus) .ecl-wa-widget {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ecl-wa-hint { transition: none; }
}
