/* Custom Toast Styles */
.toast-custom {
    /* Enhanced animations */
    animation: slideInFromRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    /* Better contrast for readability */
    color: hsl(var(--foreground));
    /* Smooth transitions for hover effects */
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    /* Positioning context for absolutely positioned ::before elements */
    position: relative;
}

.toast-custom[data-state="closed"] {
    animation: slideOutToRight 0.2s cubic-bezier(0.4, 0, 1, 1);
}

/* Success toast specific styling */
.toast-custom[data-type="success"] {
    background: hsl(var(--background));
    border: 1px solid hsl(var(--green-500) / 0.3);
    box-shadow:
        0 10px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04),
        0 0 0 1px hsl(var(--green-500) / 0.1);
}

.toast-custom[data-type="success"]::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom,
            hsl(var(--green-500)),
            hsl(var(--green-400)));
    border-radius: 12px 0 0 12px;
}

/* Error toast specific styling */
.toast-custom[data-type="error"] {
    background: hsl(var(--background));
    border: 1px solid hsl(var(--red-500) / 0.3);
    box-shadow:
        0 10px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04),
        0 0 0 1px hsl(var(--red-500) / 0.1);
}

.toast-custom[data-type="error"]::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom,
            hsl(var(--red-500)),
            hsl(var(--red-400)));
    border-radius: 12px 0 0 12px;
}

/* Info toast specific styling */
.toast-custom[data-type="info"] {
    background: hsl(var(--background));
    border: 1px solid hsl(var(--blue-500) / 0.3);
    box-shadow:
        0 10px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04),
        0 0 0 1px hsl(var(--blue-500) / 0.1);
}

.toast-custom[data-type="info"]::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom,
            hsl(var(--blue-500)),
            hsl(var(--blue-400)));
    border-radius: 12px 0 0 12px;
}

/* Warning toast specific styling */
.toast-custom[data-type="warning"] {
    background: hsl(var(--background));
    border: 1px solid hsl(var(--yellow-500) / 0.3);
    box-shadow:
        0 10px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04),
        0 0 0 1px hsl(var(--yellow-500) / 0.1);
}

.toast-custom[data-type="warning"]::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom,
            hsl(var(--yellow-500)),
            hsl(var(--yellow-400)));
    border-radius: 12px 0 0 12px;
}

/* Animations */
@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutToRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Hover effects */
.toast-custom:hover {
    transform: translateY(-2px);
    box-shadow:
        0 20px 40px -5px rgba(0, 0, 0, 0.15),
        0 15px 20px -5px rgba(0, 0, 0, 0.08);
}

/* Close button styling */
.toast-custom [data-sonner-toast-close] {
    background: transparent;
    border: none;
    border-radius: 6px;
    padding: 4px;
    opacity: 0.6;
    transition: all 0.2s ease;
}

.toast-custom [data-sonner-toast-close]:hover {
    opacity: 1;
    background: hsl(var(--muted) / 0.5);
}

/* Icon styling */
.toast-custom [data-sonner-icon] {
    margin-right: 8px;
    flex-shrink: 0;
}

/* Content styling */
.toast-custom [data-sonner-content] {
    flex: 1;
    line-height: 1.5;
}

/* Title styling */
.toast-custom [data-sonner-title] {
    font-weight: 600;
    margin-bottom: 2px;
}

/* Description styling */
.toast-custom [data-sonner-description] {
    opacity: 0.9;
    font-size: 13px;
}
