/**
 * Premium Toast Notification Styles
 * Modern design with smooth animations and gradients
 */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
}

.toast {
    pointer-events: auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: flex-start;
    padding: 16px;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    position: relative;
    overflow: hidden;
    border-left: 4px solid;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Toast Types */
.toast-success {
    border-left-color: #10b981;
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
}

.toast-error {
    border-left-color: #ef4444;
    background: linear-gradient(135deg, #ffffff 0%, #fef2f2 100%);
}

.toast-warning {
    border-left-color: #f59e0b;
    background: linear-gradient(135deg, #ffffff 0%, #fffbeb 100%);
}

.toast-info {
    border-left-color: #3b82f6;
    background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
}

/* Toast Icon */
.toast-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    color: white;
}

.toast-success .toast-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.toast-error .toast-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.toast-warning .toast-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.toast-info .toast-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

/* Toast Content */
.toast-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast-message {
    color: #1f2937;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 500;
}

/* Toast Close Button */
.toast-close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    color: #6b7280;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #1f2937;
    transform: rotate(90deg);
}

/* Progress Bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.3;
    transform-origin: left;
}

.toast-success .toast-progress { color: #10b981; }
.toast-error .toast-progress { color: #ef4444; }
.toast-warning .toast-progress { color: #f59e0b; }
.toast-info .toast-progress { color: #3b82f6; }

/* Animations */
.toast-enter {
    opacity: 0;
    transform: translateX(100px);
}

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

.toast-exit {
    opacity: 0;
    transform: translateX(100px) scale(0.9);
}

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

/* Responsive */
@media (max-width: 640px) {
    .toast-container {
        left: 20px;
        right: 20px;
        top: 20px;
        max-width: none;
    }

    .toast {
        min-width: auto;
        max-width: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .toast {
        background: #1f2937;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.2);
    }

    .toast-success {
        background: linear-gradient(135deg, #1f2937 0%, #064e3b 100%);
    }

    .toast-error {
        background: linear-gradient(135deg, #1f2937 0%, #7f1d1d 100%);
    }

    .toast-warning {
        background: linear-gradient(135deg, #1f2937 0%, #78350f 100%);
    }

    .toast-info {
        background: linear-gradient(135deg, #1f2937 0%, #1e3a8a 100%);
    }

    .toast-message {
        color: #f9fafb;
    }

    .toast-close {
        background: rgba(255, 255, 255, 0.1);
        color: #9ca3af;
    }

    .toast-close:hover {
        background: rgba(255, 255, 255, 0.2);
        color: #f9fafb;
    }
}
