/* ═══════════════════════════════════════════
 * Nexbuy Social Proof — Toast Notifications
 * ═══════════════════════════════════════════ */

#nexbuy-sp-container {
    position: fixed;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 380px;
    width: calc(100% - 32px);
}

/* ─── Position variants ─── */
#nexbuy-sp-container.nsp-bottom-left   { bottom: 20px; left: 16px; }
#nexbuy-sp-container.nsp-bottom-right  { bottom: 20px; right: 16px; }
#nexbuy-sp-container.nsp-top-left      { top: 20px;    left: 16px; flex-direction: column-reverse; }
#nexbuy-sp-container.nsp-top-right     { top: 20px;    right: 16px; flex-direction: column-reverse; }
#nexbuy-sp-container.nsp-bottom-center { bottom: 20px; left: 50%; transform: translateX(-50%); }
#nexbuy-sp-container.nsp-top-center    { top: 20px;    left: 50%; transform: translateX(-50%); flex-direction: column-reverse; }

/* ─── Toast card ─── */
.nsp-toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    border-radius: var(--nsp-radius, 12px);
    background: var(--nsp-bg, #0f172a);
    border: 1px solid var(--nsp-border, #1e3a5f);
    color: var(--nsp-text, #f8fafc);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-shadow: 0 8px 32px rgba(0,0,0,.35), 0 2px 8px rgba(0,0,0,.2);
    position: relative;
    cursor: default;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

/* ─── Icon ─── */
.nsp-toast__icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.nsp-toast__icon svg {
    width: 24px;
    height: 24px;
}

/* ─── Content ─── */
.nsp-toast__body {
    flex: 1;
    min-width: 0;
}

.nsp-toast__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.nsp-toast__name {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nsp-toast__time {
    font-size: 12px;
    color: rgba(248,250,252,.5);
    white-space: nowrap;
    margin-left: 12px;
    flex-shrink: 0;
}

.nsp-toast__message {
    font-size: 13px;
    line-height: 1.4;
    color: rgba(248,250,252,.85);
    margin-bottom: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nsp-toast__location {
    font-size: 12px;
    color: var(--nsp-sub, #22c55e);
    line-height: 1.3;
}

/* ─── Close button ─── */
.nsp-toast__close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    color: rgba(248,250,252,.4);
    cursor: pointer;
    padding: 2px;
    line-height: 1;
    font-size: 18px;
    transition: color .2s;
}

.nsp-toast__close:hover {
    color: rgba(248,250,252,.8);
}

/* ─── Animations ─── */

/* Slide in from left */
@keyframes nsp-slide-in-left {
    from { transform: translateX(-110%); opacity: 0; }
    to   { transform: translateX(0);     opacity: 1; }
}
@keyframes nsp-slide-out-left {
    from { transform: translateX(0);     opacity: 1; }
    to   { transform: translateX(-110%); opacity: 0; }
}

/* Slide in from right */
@keyframes nsp-slide-in-right {
    from { transform: translateX(110%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}
@keyframes nsp-slide-out-right {
    from { transform: translateX(0);    opacity: 1; }
    to   { transform: translateX(110%); opacity: 0; }
}

/* Fade */
@keyframes nsp-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes nsp-fade-out {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(10px); }
}

/* Animation classes */
.nsp-toast.nsp-anim-slide-in-left  { animation: nsp-slide-in-left  .4s ease-out forwards; }
.nsp-toast.nsp-anim-slide-out-left { animation: nsp-slide-out-left .35s ease-in forwards; }
.nsp-toast.nsp-anim-slide-in-right  { animation: nsp-slide-in-right  .4s ease-out forwards; }
.nsp-toast.nsp-anim-slide-out-right { animation: nsp-slide-out-right .35s ease-in forwards; }
.nsp-toast.nsp-anim-fade-in  { animation: nsp-fade-in  .4s ease-out forwards; }
.nsp-toast.nsp-anim-fade-out { animation: nsp-fade-out .35s ease-in forwards; }

/* ─── Progress bar (auto-dismiss indicator) ─── */
.nsp-toast__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--nsp-sub, #22c55e);
    opacity: .6;
    border-radius: 0 0 var(--nsp-radius, 12px) var(--nsp-radius, 12px);
}

@keyframes nsp-progress {
    from { width: 100%; }
    to   { width: 0%; }
}

/* ─── Hover pause hint ─── */
.nsp-toast:hover .nsp-toast__progress {
    animation-play-state: paused;
}

/* ─── Mobile ─── */
@media (max-width: 480px) {
    #nexbuy-sp-container {
        max-width: calc(100% - 24px);
        left: 12px !important;
        right: 12px !important;
    }

    #nexbuy-sp-container.nsp-bottom-center,
    #nexbuy-sp-container.nsp-top-center {
        transform: none;
    }

    .nsp-toast {
        padding: 12px 14px;
        gap: 10px;
    }
}
