.fav-toast-container {
    position: fixed;
    top: 24px;
    left: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 420px;
    width: calc(100% - 48px);
    pointer-events: none;
    font-family: 'Tajawal', sans-serif;
}

.fav-toast {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    padding: 16px 20px 18px 20px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.08), 
        0 1px 3px rgba(0, 0, 0, 0.02),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    overflow: hidden;
    pointer-events: auto;
    direction: rtl;
    transform: translateX(-120%);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fav-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.fav-toast.hide {
    transform: translateX(-120%) scale(0.9);
    opacity: 0;
    margin-top: -80px; 
}

.fav-toast-body {
    display: flex;
    align-items: center;
    gap: 16px;
}

.fav-toast-icon-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    font-size: 20px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.fav-toast--add {
    background: rgba(239, 246, 255, 0.85);
    border-color: rgba(147, 197, 253, 0.35);
    box-shadow: 
        0 20px 40px rgba(37, 99, 235, 0.08), 
        0 1px 3px rgba(0, 0, 0, 0.02),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.fav-toast--add .fav-toast-icon-wrap {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: #e11d48; /* Red heart looks natural */
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.15);
}

.fav-toast--add .fav-toast-icon-wrap i {
    animation: heartBeat 1.2s infinite ease-in-out;
}

.fav-toast--remove {
    background: rgba(248, 250, 252, 0.8);
    border-color: rgba(148, 163, 184, 0.3);
    box-shadow: 
        0 20px 40px rgba(71, 85, 105, 0.06), 
        0 1px 3px rgba(0, 0, 0, 0.02),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.fav-toast--remove .fav-toast-icon-wrap {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    color: #64748b;
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.1);
}

.fav-toast--remove .fav-toast-icon-wrap i {
    animation: heartBreak 0.8s ease-in-out forwards;
}

.fav-toast-content {
    flex-grow: 1;
}

.fav-toast-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px 0;
    line-height: 1.4;
}

.fav-toast-message {
    font-size: 13px;
    color: #475569;
    margin: 0;
    line-height: 1.5;
}

.fav-toast-product-name {
    font-weight: 600;
    color: #2563eb; 
}

.fav-toast--remove .fav-toast-product-name {
    color: #475569;
}

.fav-toast-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 6px 14px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 12px;
    font-weight: 700;
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    border: none;
    cursor: pointer;
}

.fav-toast-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
    background: linear-gradient(135deg, #60a5fa, #2563eb);
}

.fav-toast-action-btn i {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.fav-toast-action-btn:hover i {
    transform: translateX(-3px);
}

.fav-toast-close {
    background: rgba(15, 23, 42, 0.05);
    color: #64748b;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: -2px;
}

.fav-toast-close:hover {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    transform: rotate(90deg) scale(1.1);
}

.fav-toast-progress {
    position: absolute;
    bottom: 0;
    right: 0;
    height: 4px;
    width: 100%;
    background: rgba(0, 0, 0, 0.04);
}

.fav-toast-progress-bar {
    height: 100%;
    width: 100%;
    transform-origin: right;
    animation: toastProgress 4.5s linear forwards;
}

.fav-toast--add .fav-toast-progress-bar {
    background: linear-gradient(90deg, #1d4ed8, #60a5fa);
}

.fav-toast--remove .fav-toast-progress-bar {
    background: linear-gradient(90deg, #475569, #cbd5e1);
}

.fav-heart-particle {
    position: fixed;
    z-index: 100000;
    pointer-events: none;
    font-size: 20px;
    color: #ff4d6d;
    filter: drop-shadow(0 2px 5px rgba(225, 29, 72, 0.3));
    animation: particleFly 1.2s cubic-bezier(0.075, 0.82, 0.165, 1) forwards;
}

@keyframes heartBeat {
    0%, 100% {
        transform: scale(1);
    }
    30% {
        transform: scale(1.22);
    }
    50% {
        transform: scale(0.95);
    }
    70% {
        transform: scale(1.12);
    }
}

@keyframes heartBreak {
    0% {
        transform: scale(1) rotate(0deg);
    }
    20% {
        transform: scale(1.2) rotate(-15deg);
    }
    45% {
        transform: scale(1.1) rotate(15deg);
    }
    70% {
        transform: scale(1) rotate(-8deg);
        filter: grayscale(0.5);
    }
    100% {
        transform: scale(0.95) rotate(0deg);
        filter: grayscale(1);
        opacity: 0.8;
    }
}

@keyframes toastProgress {
    to {
        transform: scaleX(0);
    }
}

@keyframes particleFly {
    0% {
        transform: translate(0, 0) scale(0) rotate(0deg);
        opacity: 0;
    }
    15% {
        opacity: 0.9;
        transform: translate(var(--dx-mid), var(--dy-mid)) scale(1.2) rotate(var(--rot-mid));
    }
    100% {
        transform: translate(var(--dx), var(--dy)) scale(0.5) rotate(var(--rot));
        opacity: 0;
    }
}

@media (max-width: 576px) {
    .fav-toast-container {
        top: auto;
        bottom: 24px;
        left: 50%;
        transform: translateX(-50%);
        max-width: 90%;
        width: 100%;
    }

    .fav-toast {
        transform: translateY(120%);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    }

    .fav-toast.show {
        transform: translateY(0);
    }

    .fav-toast.hide {
        transform: translateY(120%) scale(0.95);
        margin-top: 0;
        margin-bottom: -80px;
    }
}
