/* Toast Notification System */
.toast-container {
    position: fixed;
    top: 80px; /* Header magasság + kis margó */
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
    width: 100%;
    pointer-events: none;
}

.toast {
    background: #1f2937; /* egyszínű, sötét semleges háttér alapértelmezésben */
    border-radius: 0; /* nincs lekerekítés */
    padding: 16px 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    pointer-events: auto;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 60px;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.hide {
    transform: translateX(100%);
    opacity: 0;
    margin-bottom: -72px;
}

/* Toast Types */
.toast.success {
    background: #16a34a; /* egyszínű zöld */
    border-left: 4px solid #15803d; /* sötétebb zöld */
}

.toast.error {
    background: #dc2626; /* egyszínű piros */
    border-left: 4px solid #b91c1c; /* sötétebb piros */
}

.toast.info {
    background: #2563eb; /* egyszínű kék */
    border-left: 4px solid #1d4ed8; /* sötétebb kék */
}

.toast.warning {
    background: #d97706; /* egyszínű narancs */
    border-left: 4px solid #b45309; /* sötétebb narancs */
}

/* Toast Icon */
.toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 14px;
    margin-top: 0;
}

.toast.success .toast-icon {
    background: rgba(255, 255, 255, 0.25);
}

.toast.error .toast-icon {
    background: rgba(255, 255, 255, 0.25);
}

.toast.info .toast-icon {
    background: rgba(255, 255, 255, 0.25);
}

.toast.warning .toast-icon {
    background: rgba(255, 255, 255, 0.25);
}

/* Toast Content */
.toast-content {
    flex: 1;
    color: #ffffff;
}

.toast-message {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 4px;
}

.toast-details {
    font-size: 13px;
    opacity: 0.9;
    line-height: 1.3;
    font-weight: 400;
}

/* Close Button */
.toast-close {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s ease;
    margin-top: 0;
}

.toast-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.toast-close:active {
    transform: scale(0.95);
}

/* Progress Bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 0; /* nincs lekerekítés a progressen sem */
    transform-origin: left;
    animation: toast-progress linear;
}

@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;
        max-width: none;
    }
    
    .toast {
        padding: 14px 16px;
        border-radius: 0; /* mobilon se legyen lekerekítés */
    }
    
    .toast-message {
        font-size: 13px;
    }
    
    .toast-details {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .toast-container {
        top: 5px;
        right: 5px;
        left: 5px;
        gap: 8px;
    }
    
    .toast {
        padding: 12px 14px;
        border-radius: 0; /* mobilon se legyen lekerekítés */
        min-height: 50px;
    }
    
    .toast-icon {
        width: 20px;
        height: 20px;
        font-size: 12px;
    }
    
    .toast-close {
        width: 18px;
        height: 18px;
        font-size: 10px;
    }
}

/* Dark theme compatibility */
@media (prefers-color-scheme: dark) {
    .toast {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .toast {
        transition: opacity 0.2s ease;
    }
    
    .toast.show {
        transform: none;
    }
    
    .toast.hide {
        transform: none;
    }
    
    .toast-progress {
        animation: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .toast {
        border: 2px solid #ffffff;
    }
    
    .toast.success {
        border-color: #22c55e;
    }
    
    .toast.error {
        border-color: #ef4444;
    }
    
    .toast.info {
        border-color: #3b82f6;
    }
    
    .toast.warning {
        border-color: #f59e0b;
    }
}