/* Toast Notification System for SPACVision Fallback */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    pointer-events: none;
}

.toast {
    background: #333;
    color: white;
    padding: 12px 20px;
    margin-bottom: 10px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    max-width: 400px;
    word-wrap: break-word;
    pointer-events: auto;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease-in-out;
    position: relative;
    border-left: 4px solid #666;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast.hide {
    opacity: 0;
    transform: translateX(100%);
}

/* Toast Types */
.toast.toast-info {
    background: #2196F3;
    border-left-color: #1976D2;
}

.toast.toast-success {
    background: #4CAF50;
    border-left-color: #388E3C;
}

.toast.toast-warning {
    background: #FF9800;
    border-left-color: #F57C00;
    color: #000;
}

.toast.toast-error {
    background: #F44336;
    border-left-color: #D32F2F;
}

/* Toast Icons */
.toast::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    vertical-align: middle;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.toast.toast-info::before {
    content: 'ℹ️';
    background: none;
    font-size: 14px;
}

.toast.toast-success::before {
    content: '✅';
    background: none;
    font-size: 14px;
}

.toast.toast-warning::before {
    content: '⚠️';
    background: none;
    font-size: 14px;
}

.toast.toast-error::before {
    content: '❌';
    background: none;
    font-size: 14px;
}

/* Close button */
.toast-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: inherit;
    font-size: 16px;
    cursor: pointer;
    opacity: 0.7;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-close:hover {
    opacity: 1;
}

/* Responsive design */
@media (max-width: 480px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .toast {
        max-width: none;
        margin-bottom: 8px;
    }
}

/* Animation keyframes */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Progress bar for auto-dismiss */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 0 0 6px 6px;
    animation: toast-progress-shrink 5s linear forwards;
}

@keyframes toast-progress-shrink {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}
