.store-whatsapp-fab-wrap {
    position: fixed;
    right: max(16px, env(safe-area-inset-right, 0px));
    bottom: max(16px, env(safe-area-inset-bottom, 0px));
    z-index: 9990;
    pointer-events: none;
}

.store-whatsapp-fab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    min-width: 52px;
    padding: 0 !important;
    margin: 0;
    border: 0 !important;
    border-radius: 999px !important;
    background: #25d366 !important;
    color: #ffffff;
    box-shadow: var(--store-role-panel-shadow, 0 10px 28px rgba(15, 23, 42, 0.18));
    text-decoration: none;
    pointer-events: auto;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    appearance: none;
    -webkit-appearance: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.store-whatsapp-fab:hover,
.store-whatsapp-fab:focus,
.store-whatsapp-fab:focus-visible {
    color: #ffffff;
    background: #1ebe57 !important;
    border: 0 !important;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.22);
    transform: translateY(-1px);
    outline: none;
}

.store-whatsapp-fab svg {
    width: 26px;
    height: 26px;
}

.store-whatsapp-inline-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    color: var(--store-color-text, #334155);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: 100%;
}

.store-whatsapp-inline-link svg {
    width: 18px;
    height: 18px;
    color: #25d366;
    flex: 0 0 auto;
}

.store-whatsapp-inline-link:hover,
.store-whatsapp-inline-link:focus,
.store-whatsapp-inline-link:focus-visible {
    color: var(--store-color-title, #1d4ed8);
    text-decoration: underline;
}

.store-product-detail__whatsapp {
    margin-top: 12px;
}

.store-cart-page-social-link.is-whatsapp svg {
    color: #25d366;
}

.store-whatsapp-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.44);
    backdrop-filter: blur(6px);
}

.store-whatsapp-modal[hidden] {
    display: none !important;
}

.store-whatsapp-modal__dialog {
    position: relative;
    width: min(460px, calc(100vw - 32px));
    padding: 28px;
    border-radius: var(--store-radius-card, 28px);
    background: var(--store-role-elevated-bg, #ffffff);
    border: 1px solid var(--store-role-panel-border, #e2e8f0);
    box-shadow: var(--store-role-panel-shadow, 0 24px 60px rgba(15, 23, 42, 0.24));
}

.store-whatsapp-modal__title {
    margin: 0 0 10px;
    color: var(--store-color-title, #1d4ed8);
    font-size: 1.34rem;
    line-height: 1.2;
}

.store-whatsapp-modal__message {
    margin: 0;
    color: var(--store-color-text-muted, #64748b);
    line-height: 1.55;
}

.store-whatsapp-modal__actions {
    display: grid;
    gap: 12px;
    margin-top: 24px;
}

.store-whatsapp-modal__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    background: #25d366;
    color: #ffffff !important;
    font-weight: 700;
    text-decoration: none;
}

.store-whatsapp-modal__cta:hover,
.store-whatsapp-modal__cta:focus,
.store-whatsapp-modal__cta:focus-visible {
    background: #1ebe57;
    color: #ffffff !important;
}

.store-whatsapp-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    padding: 0 !important;
    margin: 0;
    border: 0 !important;
    border-radius: 999px !important;
    background: var(--store-color-surface-muted, #eff6ff) !important;
    color: var(--store-color-title, #1d4ed8);
    font-size: 0;
    line-height: 0;
    cursor: pointer;
    box-shadow: none !important;
    appearance: none;
    -webkit-appearance: none;
    -webkit-tap-highlight-color: transparent;
}

.store-whatsapp-modal__close span {
    font-size: 1.5rem;
    line-height: 1;
}

.store-whatsapp-modal__close:hover,
.store-whatsapp-modal__close:focus,
.store-whatsapp-modal__close:focus-visible {
    border: 0 !important;
    background: var(--store-color-surface-muted, #eff6ff) !important;
    box-shadow: none !important;
}

body.store-whatsapp-modal-open {
    overflow: hidden;
}

@media (max-width: 640px) {
    .store-whatsapp-fab-wrap {
        right: max(12px, env(safe-area-inset-right, 0px));
        bottom: max(72px, calc(12px + env(safe-area-inset-bottom, 0px)));
    }

    .store-whatsapp-modal {
        padding: 12px;
    }

    .store-whatsapp-modal__dialog {
        width: min(100%, calc(100vw - 16px));
        padding: 22px 18px;
        border-radius: 24px;
    }
}
