:root {
    --sp-bg: rgba(11, 99, 246, 0.08);
    --sp-bg-solid: #eef4ff;
    --sp-text: #0b1f44;
    --sp-muted: #4b6cb7;
    --sp-border: rgba(11, 99, 246, 0.18);
    --sp-shadow: 0 16px 40px rgba(11, 99, 246, 0.25);
    --sp-accent: #0b63f6;
    --sp-accent-strong: #084ed1;
    --sp-radius: 14px;
}

.sp-notify {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 9999;
    width: min(360px, calc(100vw - 24px));
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, var(--sp-bg-solid), var(--sp-bg));
    color: var(--sp-text);
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius);
    box-shadow: var(--sp-shadow);
    backdrop-filter: blur(6px);
    transform: translateY(30px) scale(0.96);
    opacity: 0;
    pointer-events: none;
    transition: all 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    font-family: inherit;
}

.sp-notify.survival {
    background: linear-gradient(135deg, #eef6ef, rgba(146, 210, 83, 0.08));
    color: #1d570e;
    border: 1px solid rgba(146, 210, 83, 0.08);
    box-shadow: 0 16px 40px rgba(117, 246, 11, 0.25);
}

.sp-notify.is-visible {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

/* subtle pulse glow to draw attention */
.sp-notify.is-visible::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: 0 0 0 0 rgba(11, 99, 246, 0.25);
    animation: spPulse 2.5s ease-out infinite;
    pointer-events: none;
}

@keyframes spPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(11, 99, 246, 0.25);
    }

    70% {
        box-shadow: 0 0 0 12px rgba(11, 99, 246, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(11, 99, 246, 0);
    }
}

.sp-avatar {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: linear-gradient(135deg, #0b63f6, #3b82f6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    box-shadow: 0 6px 14px rgba(11, 99, 246, 0.4);
}

.sp-notify.survival .sp-avatar {
    background: linear-gradient(135deg, #2b5621, #1d570e);
    box-shadow: 0 6px 14px rgba(117, 246, 11, 0.25);
}

.sp-notify.survival .sp-avatar span {
    color: #ffffff;
}

.sp-content {
    min-width: 0;
    flex: 1 1 auto;
}

.sp-title {
    font-size: 11px;
    line-height: 1.2;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--sp-accent-strong);
    margin-bottom: 4px;
    font-weight: 700;
}

.sp-notify.survival .sp-title {
    color: #1d570e;
}

.sp-text {
    font-size: 14px;
    line-height: 1.45;
    color: var(--sp-text);
    word-wrap: break-word;
}

.sp-notify.survival .sp-text {
    color: #1d570e;
}

.sp-name {
    font-weight: 700;
    color: var(--sp-accent-strong);
}

.sp-notify.survival .sp-name {
    color: #1d570e;
}

.sp-location {
    color: var(--sp-text);
}

.sp-notify.survival .sp-location {
    color: #1d570e;
}

.sp-sep {
    color: var(--sp-muted);
    margin: 0 2px;
}

.sp-notify.survival .sp-sep {
    color: #527d47;
}

.sp-product {
    font-weight: 700;
    color: var(--sp-accent);
}

.sp-notify.survival .sp-product {
    color: #1d570e;
}

.sp-time {
    margin-top: 4px;
    font-size: 12px;
    color: var(--sp-muted);
}

.sp-notify.survival .sp-time {
    color: #527d47;
}

.sp-close {
    position: absolute;
    top: 8px;
    right: 10px;
    border: 0;
    background: transparent;
    color: #6b8cff;
    font-size: 18px;
    cursor: pointer;
}

.sp-notify.survival .sp-close {
    color: #1d570e;
}

.sp-close:hover {
    color: var(--sp-accent-strong);
}

.sp-notify.survival .sp-close:hover {
    color: #527d47;
}

/* Mobile optimization */
@media (max-width: 767px) {
    .sp-notify {
        left: 12px;
        right: 12px;
        bottom: max(20px, env(safe-area-inset-bottom) + 12px);
        width: auto;
        padding: 12px 14px;
        gap: 10px;
        border-radius: 12px;
    }

    .sp-avatar {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
        font-size: 16px;
    }

    .sp-text {
        font-size: 13px;
        padding-right: 18px;
    }

    .sp-time {
        font-size: 11px;
    }
}