/*
 * ABPosh Smart FOMO Notifications
 * Mobile-first frontend styles. Scoped to avoid Elementor/WordPress theme conflicts.
 */
#abpsf-notification-root.abpsf-root {
    --abpsf-bg: #ffffff;
    --abpsf-text: #111827;
    --abpsf-accent: #0f766e;
    --abpsf-border: #e5e7eb;
    --abpsf-z: 999999;

    position: fixed;
    z-index: var(--abpsf-z);
    width: min(calc(100vw - 24px), 382px);
    pointer-events: none;
    font-family: Poppins, Montserrat, Arial, sans-serif;
}

#abpsf-notification-root.abpsf-position-bottom-left {
    left: 12px;
    bottom: 16px;
}

#abpsf-notification-root.abpsf-position-bottom-right {
    right: 12px;
    bottom: 16px;
}

#abpsf-notification-root.abpsf-position-top-left {
    left: 12px;
    top: 16px;
}

#abpsf-notification-root.abpsf-position-top-right {
    right: 12px;
    top: 16px;
}

#abpsf-notification-root .abpsf-card {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr) 22px;
    gap: 12px;
    align-items: center;
    min-height: 92px;
    padding: 12px 12px 12px 10px;
    border: 1px solid var(--abpsf-border);
    border-radius: 18px;
    background: var(--abpsf-bg);
    color: var(--abpsf-text);
    box-shadow: none;
    pointer-events: auto;
    opacity: 0;
    transform: translate3d(0, 18px, 0) scale(0.98);
    transition: opacity 380ms ease, transform 380ms ease;
    overflow: hidden;
    position: relative;
    isolation: isolate;
}

#abpsf-notification-root.abpsf-position-top-left .abpsf-card,
#abpsf-notification-root.abpsf-position-top-right .abpsf-card {
    transform: translate3d(0, -18px, 0) scale(0.98);
}

#abpsf-notification-root .abpsf-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--abpsf-accent);
    z-index: -1;
}

#abpsf-notification-root .abpsf-card.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}

#abpsf-notification-root .abpsf-card.is-hiding {
    opacity: 0;
    transform: translate3d(0, 16px, 0) scale(0.98);
}

#abpsf-notification-root.abpsf-position-top-left .abpsf-card.is-hiding,
#abpsf-notification-root.abpsf-position-top-right .abpsf-card.is-hiding {
    transform: translate3d(0, -16px, 0) scale(0.98);
}

#abpsf-notification-root .abpsf-card-media {
    width: 68px;
    height: 68px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--abpsf-accent) 9%, #ffffff);
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--abpsf-accent) 18%, transparent);
}

#abpsf-notification-root .abpsf-card-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

#abpsf-notification-root .abpsf-cart-badge {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: var(--abpsf-accent);
}

#abpsf-notification-root .abpsf-cart-badge svg {
    width: 42px;
    height: 42px;
    fill: currentColor;
}

#abpsf-notification-root .abpsf-card-copy {
    min-width: 0;
}

#abpsf-notification-root .abpsf-card-headline,
#abpsf-notification-root .abpsf-card-action,
#abpsf-notification-root .abpsf-card-time {
    margin: 0;
    padding: 0;
    line-height: 1.35;
    letter-spacing: normal;
}

#abpsf-notification-root .abpsf-card-headline {
    font-size: 12px;
    font-weight: 700;
    opacity: 0.78;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#abpsf-notification-root .abpsf-card-action {
    margin-top: 5px;
    font-family: Montserrat, Poppins, Arial, sans-serif;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

#abpsf-notification-root .abpsf-card-time {
    margin-top: 5px;
    font-size: 11px;
    font-weight: 500;
    opacity: 0.62;
}

#abpsf-notification-root .abpsf-close {
    align-self: start;
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--abpsf-text);
    font-size: 18px;
    line-height: 20px;
    cursor: pointer;
    opacity: 0.42;
    padding: 0;
    box-shadow: none;
}

#abpsf-notification-root .abpsf-close:hover,
#abpsf-notification-root .abpsf-close:focus {
    opacity: 0.82;
    outline: none;
}

@media (min-width: 768px) {
    #abpsf-notification-root.abpsf-root {
        width: min(392px, calc(100vw - 48px));
    }

    #abpsf-notification-root.abpsf-position-bottom-left {
        left: 24px;
        bottom: 24px;
    }

    #abpsf-notification-root.abpsf-position-bottom-right {
        right: 24px;
        bottom: 24px;
    }

    #abpsf-notification-root.abpsf-position-top-left {
        left: 24px;
        top: 24px;
    }

    #abpsf-notification-root.abpsf-position-top-right {
        right: 24px;
        top: 24px;
    }

    #abpsf-notification-root .abpsf-card {
        grid-template-columns: 76px minmax(0, 1fr) 24px;
        gap: 14px;
        min-height: 104px;
        padding: 14px 14px 14px 12px;
        border-radius: 20px;
    }

    #abpsf-notification-root .abpsf-card-media {
        width: 76px;
        height: 76px;
        border-radius: 16px;
    }

    #abpsf-notification-root .abpsf-card-headline {
        font-size: 13px;
    }

    #abpsf-notification-root .abpsf-card-action {
        font-size: 14px;
    }

    #abpsf-notification-root .abpsf-card-time {
        font-size: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #abpsf-notification-root .abpsf-card {
        transition: none;
    }
}
