/* ═══════════════════════════════════════════════════════════
   PPN TOAST — Glass Pill Style
   Frosted glass pill notifications. Compact, modern, non-intrusive.
   Usage: window.showToast('success', 'message', {options})
   z-index: 99999
   ═══════════════════════════════════════════════════════════ */

.ppn-toast-container {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    width: auto;
    max-width: 90vw;
}

.ppn-toast {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px 10px 14px;
    background: rgba(255, 253, 251, 0.82);
    backdrop-filter: blur(20px) saturate(1.8);
    -webkit-backdrop-filter: blur(20px) saturate(1.8);
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12),
                0 2px 8px rgba(0, 0, 0, 0.06);
    pointer-events: auto;
    transform: translateY(30px) scale(0.92);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.3s ease;
    font-family: var(--ppn-font-heading, 'Inter', -apple-system, sans-serif);
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--ppn-charcoal, #444);
    white-space: nowrap;
    max-width: 90vw;
    cursor: default;
}

.ppn-toast.ppn-toast--visible {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.ppn-toast.ppn-toast--leaving {
    transform: translateY(10px) scale(0.95);
    opacity: 0;
    transition-duration: 0.2s;
}

/* ── Status Dot ── */
.ppn-toast__icon {
    width: 8px;
    height: 8px;
    min-width: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.ppn-toast__icon svg { display: none; }

.ppn-toast--success .ppn-toast__icon { background: #25D366; box-shadow: 0 0 6px rgba(37, 211, 102, 0.5); }
.ppn-toast--error .ppn-toast__icon   { background: #960000; box-shadow: 0 0 6px rgba(150, 0, 0, 0.4); }
.ppn-toast--cart .ppn-toast__icon    { background: #E8731A; box-shadow: 0 0 6px rgba(232, 115, 26, 0.5); }
.ppn-toast--info .ppn-toast__icon    { background: #2271B1; box-shadow: 0 0 6px rgba(34, 113, 177, 0.4); }

/* ── Message ── */
.ppn-toast__msg {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 280px;
}

/* ── Body (wraps thumb + content) ── */
.ppn-toast__body {
    display: contents;
}
.ppn-toast__content {
    display: contents;
}

/* ── Thumbnail (hidden in pill style — too compact) ── */
.ppn-toast__thumb {
    display: none;
}

/* ── Action Link ── */
.ppn-toast__action {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--ppn-maroon, #960000);
    text-decoration: none;
    white-space: nowrap;
    padding-left: 2px;
    transition: opacity 0.15s;
}
.ppn-toast__action:hover { opacity: 0.7; }

/* ── Close ── */
.ppn-toast__close {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: none;
    background: rgba(68, 68, 68, 0.08);
    color: rgba(68, 68, 68, 0.5);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 0;
    margin-left: 2px;
    transition: background 0.15s, color 0.15s;
    -webkit-tap-highlight-color: transparent;
    font-size: 0;
    line-height: 1;
}
.ppn-toast__close:hover {
    background: rgba(68, 68, 68, 0.15);
    color: var(--ppn-charcoal, #444);
}

/* ── Desktop: right-aligned ── */
@media (min-width: 769px) {
    .ppn-toast-container {
        left: auto;
        right: 24px;
        bottom: 24px;
        transform: none;
        align-items: flex-end;
    }
}

/* ── Mobile adjustments ── */
@media (max-width: 768px) {
    .ppn-toast-container {
        bottom: 90px;
    }
    .ppn-toast {
        font-size: 0.78rem;
        padding: 9px 14px 9px 12px;
        gap: 8px;
    }
    .ppn-toast__msg {
        max-width: 220px;
    }
    .ppn-toast__close {
        width: 22px;
        height: 22px;
    }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .ppn-toast,
    .ppn-toast.ppn-toast--visible,
    .ppn-toast.ppn-toast--leaving {
        transition-duration: 0.01ms !important;
    }
}
