/* Toast Container - Fixed Position (Bottom Right) */
.wolf-toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column-reverse; /* New toasts appear above older ones since it's bottom anchored */
    gap: 10px;
    pointer-events: none;
}

/* RTL Support */
html[dir="rtl"] .wolf-toast-container {
    right: 20px;
    left: auto;
}

/* Toast Item */
.wolf-toast {
    background: #1e1e1e; /* Dark Card Background */
    color: #e0e0e0;
    min-width: 300px;
    max-width: 400px;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-right: 4px solid #d4af37; /* Default Gold Border */
    display: flex;
    align-items: center;
    justify-content: space-between;
    opacity: 0;
    transform: translateX(100%);
    animation: slideIn 0.4s forwards, fadeOut 0.4s forwards 3.6s;
    pointer-events: auto;
    position: relative;
    overflow: hidden;
    font-family: 'Cairo', sans-serif;
}

/* RTL Animation Direction */
html[dir="rtl"] .wolf-toast {
    transform: translateX(-100%);
    border-right: none;
    border-left: 4px solid #d4af37;
}

/* =========================================
   ANIMATIONS
   ========================================= */
@keyframes wolfToastSlideIn {
    0% { transform: translate3d(120%, 0, 0); opacity: 0; }
    60% { transform: translate3d(-5%, 0, 0); opacity: 1; }
    100% { transform: translate3d(0, 0, 0); opacity: 1; }
}

@keyframes wolfToastSlideOut {
    0% { transform: translate3d(0, 0, 0); opacity: 1; }
    100% { transform: translate3d(120%, 0, 0); opacity: 0; }
}

@keyframes wolfToastProgress {
    0% { width: 100%; }
    100% { width: 0%; }
}

/* =========================================
   CONFIRM TOAST SPECIAL STYLES
   ========================================= */
.wolf-toast-confirm .wolf-toast-progress,
.wolf-toast-confirm .wolf-toast-close {
    display: none !important;
}

/* Animations */
@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(20px);
    }
}

/* Toast Content */
.wolf-toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
}

.wolf-toast-icon {
    font-size: 18px;
    color: #d4af37;
}

/* Close Button */
.wolf-toast-close {
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 16px;
    margin-right: -5px; /* Adjust spacing */
    transition: color 0.3s;
    padding: 0 5px;
}

html[dir="rtl"] .wolf-toast-close {
    margin-right: 0;
    margin-left: -5px;
}

.wolf-toast-close:hover {
    color: #fff;
}

/* Types */
.wolf-toast.success .wolf-toast-icon { color: #2ecc71; }
.wolf-toast.success { border-color: #2ecc71; }

.wolf-toast.error .wolf-toast-icon { color: #e74c3c; }
.wolf-toast.error { border-color: #e74c3c; }

.wolf-toast.warning .wolf-toast-icon { color: #f1c40f; }
.wolf-toast.warning { border-color: #f1c40f; }

.wolf-toast.info .wolf-toast-icon { color: #3498db; }
.wolf-toast.info { border-color: #3498db; }

/* Progress Bar (Optional nice touch) */
.wolf-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
}

.wolf-toast-progress-bar {
    height: 100%;
    background: #d4af37;
    width: 0%;
    animation: progress 3.6s linear forwards;
}

.wolf-toast.success .wolf-toast-progress-bar { background: #2ecc71; }
.wolf-toast.error .wolf-toast-progress-bar { background: #e74c3c; }
.wolf-toast.warning .wolf-toast-progress-bar { background: #f1c40f; }
.wolf-toast.info .wolf-toast-progress-bar { background: #3498db; }

@keyframes progress {
    to { width: 100%; }
}

/* Responsive */
@media (max-width: 480px) {
    .wolf-toast-container {
        top: auto;
        bottom: 20px;
        left: 20px;
        right: 20px;
        width: auto;
    }
    
    .wolf-toast {
        min-width: auto;
        width: 100%;
        max-width: none;
        animation: slideUp 0.4s forwards, fadeOut 0.4s forwards 3.6s;
    }

    /* Mobile Animation */
    @keyframes slideUp {
        from { transform: translateY(100%); opacity: 0; }
        to { transform: translateY(0); opacity: 1; }
    }
}
