/* Toast Notification System - ElderWorldsStudio Templates */

/* Toast Container */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    pointer-events: none;
}

/* Toast Base Styles */
.toast {
    background: rgba(0, 0, 0, 0.9);
    color: #ffffff;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    min-width: 300px;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border-left: 4px solid #ff6b6b;
    backdrop-filter: blur(10px);
    pointer-events: auto;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Toast Show Animation */
.toast.show {
    transform: translateX(0);
    opacity: 1;
}

/* Toast Hide Animation */
.toast.hide {
    transform: translateX(100%);
    opacity: 0;
}

/* Toast Types */
.toast.error {
    border-left-color: #ff6b6b;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1) 0%, rgba(0, 0, 0, 0.9) 100%);
}

.toast.warning {
    border-left-color: #ffa726;
    background: linear-gradient(135deg, rgba(255, 167, 38, 0.1) 0%, rgba(0, 0, 0, 0.9) 100%);
}

.toast.success {
    border-left-color: #66bb6a;
    background: linear-gradient(135deg, rgba(102, 187, 106, 0.1) 0%, rgba(0, 0, 0, 0.9) 100%);
}

.toast.info {
    border-left-color: #42a5f5;
    background: linear-gradient(135deg, rgba(66, 165, 245, 0.1) 0%, rgba(0, 0, 0, 0.9) 100%);
}

/* Toast Content */
.toast-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 15px;
}

.toast-description {
    opacity: 0.9;
    font-size: 13px;
}

/* Close Button */
.toast-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    padding: 4px;
    line-height: 1;
}

.toast-close:hover {
    opacity: 1;
}

/* Progress Bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 0 0 8px 8px;
    transform-origin: left;
    animation: toast-progress 5s linear forwards;
}

.toast.error .toast-progress {
    background: #ff6b6b;
}

.toast.warning .toast-progress {
    background: #ffa726;
}

.toast.success .toast-progress {
    background: #66bb6a;
}

.toast.info .toast-progress {
    background: #42a5f5;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .toast {
        min-width: auto;
        max-width: none;
        margin-bottom: 8px;
    }
    
    .toast-content {
        gap: 10px;
    }
    
    .toast-message {
        font-size: 13px;
    }
    
    .toast-title {
        font-size: 14px;
    }
}

/* Dark Theme Compatibility */
@media (prefers-color-scheme: dark) {
    .toast {
        background: rgba(30, 30, 30, 0.95);
        border-color: rgba(255, 255, 255, 0.1);
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .toast {
        background: #000000;
        border-width: 2px;
        color: #ffffff;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .toast {
        transition: opacity 0.2s ease;
        transform: none;
    }
    
    .toast.show {
        transform: none;
    }
    
    .toast.hide {
        transform: none;
    }
    
    .toast-progress {
        animation: none;
    }
}