/**
 * NightLifeV Global Toast System CSS
 * Einheitliches Design für Toast-Benachrichtigungen
 */

/* Toast Container */
.toast-container {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 99999; /* Much higher than modals */
    max-width: 400px;
    width: 100%;
    pointer-events: none;
}

/* Toast Base Styles */
.toast {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding: 0;
    border-radius: 12px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    pointer-events: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    transform: translateX(100%);
    opacity: 0;
}

.toast-content {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 16px 20px;
    gap: 12px;
}

.toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-size: 18px;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    word-wrap: break-word;
}

.toast-close {
    background: none;
    border: none;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    opacity: 0.7;
    flex-shrink: 0;
    margin-left: 8px;
}

.toast-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

/* Toast Types */
.toast-success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.25));
    border-left: 4px solid #22c55e;
    color: #22c55e;
}

.toast-success .toast-close {
    color: #22c55e;
}

.toast-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.25));
    border-left: 4px solid #ef4444;
    color: #ef4444;
}

.toast-error .toast-close {
    color: #ef4444;
}

.toast-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.25));
    border-left: 4px solid #f59e0b;
    color: #f59e0b;
}

.toast-warning .toast-close {
    color: #f59e0b;
}

.toast-info {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.15), rgba(0, 255, 255, 0.25));
    border-left: 4px solid #00ffff;
    color: #00ffff;
}

.toast-info .toast-close {
    color: #00ffff;
}

/* Animation States */
.toast-enter {
    transform: translateX(100%);
    opacity: 0;
}

.toast-visible {
    transform: translateX(0);
    opacity: 1;
}

.toast-exit {
    transform: translateX(100%);
    opacity: 0;
    margin-bottom: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
}

/* Hover Effects */
.toast:hover {
    transform: translateX(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.toast-success:hover {
    box-shadow: 0 12px 40px rgba(34, 197, 94, 0.2);
}

.toast-error:hover {
    box-shadow: 0 12px 40px rgba(239, 68, 68, 0.2);
}

.toast-warning:hover {
    box-shadow: 0 12px 40px rgba(245, 158, 11, 0.2);
}

.toast-info:hover {
    box-shadow: 0 12px 40px rgba(0, 255, 255, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .toast-container {
        top: 80px;
        right: 16px;
        left: 16px;
        max-width: none;
    }
    
    .toast {
        margin-bottom: 10px;
    }
    
    .toast-content {
        padding: 14px 16px;
        gap: 10px;
    }
    
    .toast-message {
        font-size: 13px;
    }
    
    .toast-icon {
        width: 20px;
        height: 20px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .toast-container {
        top: 70px;
        right: 12px;
        left: 12px;
    }
    
    .toast-content {
        padding: 12px 14px;
        gap: 8px;
    }
    
    .toast-message {
        font-size: 12px;
    }
}

/* Dark Theme Support */
@media (prefers-color-scheme: dark) {
    .toast {
        background: rgba(20, 20, 20, 0.95);
        border-color: rgba(255, 255, 255, 0.15);
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .toast {
        border-width: 2px;
    }
    
    .toast-success {
        border-left-width: 6px;
    }
    
    .toast-error {
        border-left-width: 6px;
    }
    
    .toast-warning {
        border-left-width: 6px;
    }
    
    .toast-info {
        border-left-width: 6px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .toast {
        transition: none;
    }
    
    .toast:hover {
        transform: none;
    }
}

/* Focus Styles for Accessibility */
.toast-close:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .toast-container {
        display: none;
    }
}

/* Stacking Context for Multiple Toasts */
.toast:nth-child(1) { z-index: 10; }
.toast:nth-child(2) { z-index: 9; }
.toast:nth-child(3) { z-index: 8; }
.toast:nth-child(4) { z-index: 7; }
.toast:nth-child(5) { z-index: 6; }

/* Animation for stacked toasts */
.toast:not(:first-child) {
    margin-top: -2px;
}

/* Special handling for very long messages */
.toast-message {
    max-height: 120px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.toast-message::-webkit-scrollbar {
    width: 4px;
}

.toast-message::-webkit-scrollbar-track {
    background: transparent;
}

.toast-message::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}