/* Toast Container */
.custom-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    max-width: 400px;
    width: calc(100% - 50px);
}

/* Toast Base Styles */
.custom-toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 8px 5px rgba(0, 0, 0, 0.15);
    pointer-events: auto;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
    min-height: 60px;
    border-left: 6px solid;
}

/* Show Animation */
.custom-toast-show {
    opacity: 1;
    transform: translateX(0);
}

/* Hide Animation */
.custom-toast-hide {
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease-in;
}

/* Toast Icon */
.custom-toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Toast Message */
.custom-toast-message {
    flex: 1;
    font-family: "Roboto", serif;
    font-weight: 700;
    font-size: 16px;
    line-height: 1.5;
    color: #333;
}

/* Close Button */
.custom-toast-close {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
    color: #666;
    padding: 0;
    margin-left: 8px;
}

.custom-toast-close:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Progress Bar */
.custom-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: currentColor;
    opacity: 0.3;
    transform-origin: left;
    animation: toast-progress 4000ms linear forwards;
}

@keyframes toast-progress {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

/* Success Toast */
.custom-toast-success {
    border-left-color: rgb(0, 66, 22);
    background-color: #f9ffe8;
    color: #b6e537;
}

.custom-toast-success .custom-toast-icon {
    color: rgb(0, 66, 22);;
}

/* Error Toast */
.custom-toast-error {
    border-left-color: #550000;
    background-color: #ffe7e7;
    color: #ef4444;
}

.custom-toast-error .custom-toast-icon {
    color: #ef4444;
}

/* Warning Toast */
.custom-toast-warning {
    border-left-color: #f59e0b;
    color: #f59e0b;
}

.custom-toast-warning .custom-toast-icon {
    color: #f59e0b;
}

/* Info Toast */
.custom-toast-info {
    border-left-color: #3b82f6;
    color: #3b82f6;
}

.custom-toast-info .custom-toast-icon {
    color: #3b82f6;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .custom-toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        width: auto;
        max-width: none;
    }

    .custom-toast {
        padding: 14px 16px;
    }

    .custom-toast-message {
        font-size: 13px;
    }
}

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

[dir="rtl"] .custom-toast {
    transform: translateX(-400px);
    border-left: none;
    border-right: 4px solid;
}

[dir="rtl"] .custom-toast-show {
    transform: translateX(0);
}

[dir="rtl"] .custom-toast-hide {
    transform: translateX(-400px);
}

/* Dark Mode Support (Optional) */
/* @media (prefers-color-scheme: dark) {
    .custom-toast {
        background: #1f2937;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    .custom-toast-message {
        color: #e5e7eb;
    }

    .custom-toast-close {
        color: #9ca3af;
    }

    .custom-toast-close:hover {
        background: rgba(255, 255, 255, 0.1);
    }
} */


/* // Success notification
toast.success("Subscription successful!");

// Error notification
toast.error("Something went wrong!");

// Warning notification
toast.warning("Please check your input");

// Info notification
toast.info("New updates available");

// Custom duration (5 seconds)
toast.success("Saved successfully!", 5000);

// Never auto-close (set duration to 0)
toast.error("Critical error occurred", 0); */