/* Toast Notifications - Premium Styling */

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

.toast {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12),
        0 2px 10px rgba(0, 0, 0, 0.08);
    transform: translateX(120%);
    opacity: 0;
    animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    pointer-events: auto;
    position: relative;
    overflow: hidden;
    border-left: 4px solid var(--toast-color, #3b82f6);
}

.toast.closing {
    animation: slideOut 0.3s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes slideIn {
    0% {
        transform: translateX(120%);
        opacity: 0;
    }

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

@keyframes slideOut {
    0% {
        transform: translateX(0);
        opacity: 1;
    }

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

.toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--toast-color, #3b82f6);
}

.toast-content {
    flex-grow: 1;
    min-width: 0;
}

.toast-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #1f2937;
    margin-bottom: 2px;
    line-height: 1.4;
}

.toast-message {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.5;
    word-wrap: break-word;
}

.toast-close {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: #9ca3af;
    transition: all 0.2s ease;
    margin: -4px -8px -4px 0;
}

.toast-close:hover {
    background: #f3f4f6;
    color: #4b5563;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--toast-color, #3b82f6);
    opacity: 0.3;
    animation: progress linear forwards;
}

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

    100% {
        width: 0%;
    }
}

/* Toast Type Colors */
.toast.success {
    --toast-color: #10b981;
}

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

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

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

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

    .toast-title {
        color: #f9fafb;
    }

    .toast-message {
        color: #9ca3af;
    }

    .toast-close:hover {
        background: #374151;
        color: #d1d5db;
    }
}

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

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