/**
 * GiftCodeNgon - Toast Notification Component
 * 
 * Lightweight toast notifications for user feedback
 * @version 1.0.0
 */

/* ========================================
   TOAST CONTAINER
   ======================================== */

.toast-container {
    position: fixed;
    bottom: var(--space-6);
    left: 50%;
    transform: translateX(-50%);
    z-index: var(--z-tooltip);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    pointer-events: none;
}

/* ========================================
   TOAST ITEM
   ======================================== */

.toast {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-5);
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.95) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(99, 102, 241, 0.2);
    color: var(--color-text-primary);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    pointer-events: auto;

    /* Animation */
    animation: toastSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast.toast-hide {
    animation: toastSlideOut 0.3s ease-in forwards;
}

/* Toast Icon */
.toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

/* Toast Variants */
.toast-success .toast-icon {
    background: var(--color-success-light);
    color: var(--color-success);
}

.toast-error .toast-icon {
    background: var(--color-danger-light);
    color: var(--color-danger);
}

.toast-info .toast-icon {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.toast-warning .toast-icon {
    background: var(--color-warning-light);
    color: var(--color-warning);
}

/* Progress bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--color-primary);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    animation: toastProgress 2.5s linear forwards;
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes toastSlideIn {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toastSlideOut {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
}

@keyframes toastProgress {
    0% {
        width: 100%;
    }

    100% {
        width: 0%;
    }
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 480px) {
    .toast-container {
        left: var(--space-4);
        right: var(--space-4);
        transform: none;
    }

    .toast {
        width: 100%;
        justify-content: center;
    }
}