/**
 * Toast Notification Styles
 * Modern, non-intrusive notification system
 */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 500px;
    padding: 16px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: all;
    border-left: 4px solid #ccc;
}

.toast-show {
    opacity: 1;
    transform: translateX(0);
}

.toast-hide {
    opacity: 0;
    transform: translateX(400px);
}

/* Toast Types */
.toast-success {
    border-left-color: #10b981;
    background: linear-gradient(to right, #ecfdf5 0%, white 20%);
}

.toast-success .toast-icon {
    color: #10b981;
    background: #d1fae5;
}

.toast-error {
    border-left-color: #ef4444;
    background: linear-gradient(to right, #fef2f2 0%, white 20%);
}

.toast-error .toast-icon {
    color: #ef4444;
    background: #fee2e2;
}

.toast-warning {
    border-left-color: #f59e0b;
    background: linear-gradient(to right, #fffbeb 0%, white 20%);
}

.toast-warning .toast-icon {
    color: #f59e0b;
    background: #fef3c7;
}

.toast-info {
    border-left-color: #3b82f6;
    background: linear-gradient(to right, #eff6ff 0%, white 20%);
}

.toast-info .toast-icon {
    color: #3b82f6;
    background: #dbeafe;
}

/* Toast Elements */
.toast-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    color: #1f2937;
    word-wrap: break-word;
}

.toast-close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 20px;
    color: #6b7280;
    transition: all 0.2s;
    padding: 0;
    line-height: 1;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #1f2937;
}

/* Responsive Design */
@media (max-width: 640px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        align-items: stretch;
    }

    .toast {
        min-width: auto;
        max-width: none;
        transform: translateY(-100px);
    }

    .toast-show {
        transform: translateY(0);
    }

    .toast-hide {
        transform: translateY(-100px);
    }
}

/* Animation for multiple toasts */
.toast:nth-child(n+4) {
    opacity: 0.7;
    transform: scale(0.95) translateX(0);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .toast {
        background: #1f2937;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    .toast-message {
        color: #f3f4f6;
    }

    .toast-close {
        color: #9ca3af;
    }

    .toast-close:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #f3f4f6;
    }

    .toast-success {
        background: linear-gradient(to right, #064e3b 0%, #1f2937 20%);
    }

    .toast-error {
        background: linear-gradient(to right, #7f1d1d 0%, #1f2937 20%);
    }

    .toast-warning {
        background: linear-gradient(to right, #78350f 0%, #1f2937 20%);
    }

    .toast-info {
        background: linear-gradient(to right, #1e3a8a 0%, #1f2937 20%);
    }
}
