/*
 * Usklađeno sa Woodmart temom na musashi.rs:
 * - font se nasleđuje (DM Sans), tekst u boji naslova teme (#242424)
 * - oštre ivice kao kartice i polja teme (radius 0)
 * - widget stoji iznad teminog "scroll to top" dugmeta (#customScrollTop),
 *   centriran po istoj vertikalnoj osi
 * - z-index ispod Woodmart bočnih panela (korpa, mobilni meni: 400/500),
 *   da se ne prikazuje preko otvorene korpe
 */
.mwa-widget {
    --mwa-size: 56px;
    --mwa-brand: #c35a1c;
    --mwa-text: #242424;

    position: fixed;
    right: 14px;
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    z-index: 390;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: inherit;
}

.mwa-bubble {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    color: var(--mwa-text);
    padding: 10px 12px 10px 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
}

.mwa-bubble[hidden] {
    display: none;
}

/*
 * Woodmart stilizuje sva <button> dugmad pravilom :is(.btn, .button, button, ...)
 * iste specifičnosti kao .mwa-close, a učitava se posle nas. Zato ovde dižemo
 * specifičnost (.mwa-widget .mwa-close) umesto da koristimo !important.
 */
.mwa-widget .mwa-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0 2px;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    font-size: 18px;
    line-height: 1;
    color: #777;
    cursor: pointer;
}

.mwa-widget .mwa-close:hover {
    color: var(--mwa-text);
    background: transparent;
}

.mwa-button {
    width: var(--mwa-size);
    height: var(--mwa-size);
    flex-shrink: 0;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease;
}

.mwa-button:hover,
.mwa-button:focus-visible {
    color: #fff;
    transform: scale(1.06);
}

.mwa-button:focus-visible,
.mwa-widget .mwa-close:focus-visible {
    outline: 2px solid var(--mwa-brand);
    outline-offset: 3px;
}

/* Tema sakriva plutajuće elemente dok je pretraga otvorena */
.wd-search-opened .mwa-widget {
    display: none;
}

/* Tablet i mobilni: tema pomera #customScrollTop na right 8px / bottom 64px */
@media (max-width: 1024px) {
    .mwa-widget {
        --mwa-size: 48px;
        right: 6px;
        bottom: calc(120px + env(safe-area-inset-bottom, 0px));
    }
    .mwa-bubble {
        font-size: 13px;
        padding: 8px 10px 8px 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mwa-button {
        transition: none;
    }
}
