/* Toast Notification System Styles */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 350px;
    pointer-events: none;
}

/* Message Container for signup/authentication pages */
.message-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    max-width: 500px;
    width: 90%;
}

.message-box {
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-align: center;
    animation: slideDown 0.3s ease-out;
}

.message-box.success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message-box.error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message-box.info {
    background: linear-gradient(135deg, #cce5ff 0%, #b3d9ff 100%);
    color: #004085;
    border: 1px solid #b3d9ff;
}

.message-box.warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    border: 1px solid #ffeaa7;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.toast {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-left: 4px solid #17a2b8;
    min-height: 60px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease-in-out;
    pointer-events: auto;
    position: relative;
    overflow: hidden;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast.removing {
    opacity: 0;
    transform: translateX(100%);
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    min-height: 0;
}

.toast-success {
    border-left-color: #28a745;
    background: linear-gradient(135deg, #ffffff 0%, #f8fff9 100%);
}

.toast-error {
    border-left-color: #dc3545;
    background: linear-gradient(135deg, #ffffff 0%, #fff8f8 100%);
}

.toast-warning {
    border-left-color: #ffc107;
    background: linear-gradient(135deg, #ffffff 0%, #fffef8 100%);
}

.toast-info {
    border-left-color: #17a2b8;
    background: linear-gradient(135deg, #ffffff 0%, #f8fcfd 100%);
}

.toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 20px;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-message {
    font-size: 14px;
    line-height: 1.4;
    color: #333;
    word-wrap: break-word;
}

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    margin-left: 8px;
    color: #6c757d;
    font-size: 16px;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.toast-close:hover {
    background-color: rgba(0, 0, 0, 0.1);
    color: #333;
}

/* Mobile responsive */
@media (max-width: 480px) {
    .toast-container {
        left: 10px;
        right: 10px;
        top: 10px;
        max-width: none;
    }
    
    .toast {
        margin-bottom: 8px;
    }
}

/* Animation for multiple toasts */
.toast:nth-child(1) { animation-delay: 0ms; }
.toast:nth-child(2) { animation-delay: 100ms; }
.toast:nth-child(3) { animation-delay: 200ms; }
.toast:nth-child(4) { animation-delay: 300ms; }
.toast:nth-child(5) { animation-delay: 400ms; }

/* Progress bar for auto-dismiss (optional enhancement) */
.toast::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, currentColor 0%, transparent 100%);
    opacity: 0.3;
    animation: toast-progress 5s linear forwards;
}

.toast-success::after { color: #28a745; }
.toast-error::after { color: #dc3545; }
.toast-warning::after { color: #ffc107; }
.toast-info::after { color: #17a2b8; }

@keyframes toast-progress {
    from { width: 100%; }
    to { width: 0%; }
}

/* Hover to pause auto-dismiss */
.toast:hover::after {
    animation-play-state: paused;
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    .toast {
        background: #2d3748;
        color: #e2e8f0;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
    
    .toast-success {
        background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    }
    
    .toast-error {
        background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    }
    
    .toast-warning {
        background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    }
    
    .toast-info {
        background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    }
    
    .toast-message {
        color: #e2e8f0;
    }
    
    .toast-close {
        color: #a0aec0;
    }
    
    .toast-close:hover {
        background-color: rgba(255, 255, 255, 0.1);
        color: #e2e8f0;
    }
}
