/**
 * Toast Notification Styles
 * Modern, elegant toast notifications
 */

/* Toast Container */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 360px;
    max-width: 420px;
    pointer-events: none;
    will-change: transform;
}

/* Toast Base Styles */
.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: white;
    border-radius: 12px;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    pointer-events: auto;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    position: relative;
    overflow: hidden;
}

/* Toast Animation States */
.toast-enter {
    opacity: 0;
    transform: translateX(100%) scale(0.95);
}

.toast-visible {
    opacity: 1;
    transform: translateX(0) scale(1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast-exit {
    opacity: 0;
    transform: translateX(100%) scale(0.95);
    transition: all 0.25s cubic-bezier(0.4, 0, 1, 1);
}

/* Toast Icon */
.toast-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

/* Toast Message */
.toast-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    color: #1f2937;
    font-weight: 500;
    word-break: break-word;
}

/* Toast Close Button */
.toast-close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: all 0.2s;
    padding: 0;
    margin: -4px -4px 0 0;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #374151;
}

.toast-close:active {
    transform: scale(0.95);
}

/* Toast Type: Success */
.toast-success {
    border-left: 4px solid #10b981;
}

.toast-success .toast-icon {
    color: #10b981;
}

.toast-success::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.05) 0%, transparent 100%);
    pointer-events: none;
}

/* Toast Type: Error */
.toast-error {
    border-left: 4px solid #ef4444;
}

.toast-error .toast-icon {
    color: #ef4444;
}

.toast-error::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.05) 0%, transparent 100%);
    pointer-events: none;
}

/* Toast Type: Warning */
.toast-warning {
    border-left: 4px solid #f59e0b;
}

.toast-warning .toast-icon {
    color: #f59e0b;
}

.toast-warning::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.05) 0%, transparent 100%);
    pointer-events: none;
}

/* Toast Type: Info */
.toast-info {
    border-left: 4px solid #3b82f6;
}

.toast-info .toast-icon {
    color: #3b82f6;
}

.toast-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.05) 0%, transparent 100%);
    pointer-events: none;
}

/* Progress Bar (optional) */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.3;
    animation: toast-progress 5s linear;
}

@keyframes toast-progress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* Responsive */
@media (max-width: 640px) {
    .toast-container {
        top: auto;
        bottom: 20px;
        right: 16px;
        left: 16px;
        width: auto;
        max-width: none;
    }
    
    .toast {
        min-width: auto;
        width: 100%;
    }
    
    .toast-enter {
        transform: translateY(100%) scale(0.95);
    }
    
    .toast-visible {
        transform: translateY(0) scale(1);
    }
    
    .toast-exit {
        transform: translateY(100%) scale(0.95);
    }
}

/* Dark Mode Support - Disabled for consistent light theme */
/* We want toasts to always be light-themed for better visibility
@media (prefers-color-scheme: dark) {
    .toast {
        background: #1f2937;
        box-shadow: 
            0 4px 6px -1px rgba(0, 0, 0, 0.3),
            0 2px 4px -1px rgba(0, 0, 0, 0.2),
            0 0 0 1px rgba(255, 255, 255, 0.1);
    }
    
    .toast-message {
        color: #f9fafb;
    }
    
    .toast-close {
        color: #9ca3af;
    }
    
    .toast-close:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #e5e7eb;
    }
}
*/

/* Force light theme for toasts regardless of system preference */
.toast {
    background: white !important;
}

.toast-message {
    color: #1f2937 !important;
}

.toast-close {
    color: #6b7280 !important;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.05) !important;
    color: #374151 !important;
}
