/* Toast Notifications System */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
    min-width: 300px;
    max-width: 400px;
}

.toast-success {
    border-left: 4px solid #198754;
}

.toast-error {
    border-left: 4px solid #dc3545;
}

.toast-info {
    border-left: 4px solid #0dcaf0;
}

.toast-warning {
    border-left: 4px solid #ffc107;
}

.toast-header {
    background: white;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.toast-header .btn-close {
    padding: 0.5rem;
    margin: -0.5rem -0.5rem -0.5rem auto;
}

.toast-body {
    padding: 0.75rem;
    color: #212529;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.1);
    width: 100%;
}

.toast-progress-bar {
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    width: 100%;
    animation: toastProgress 3s linear forwards;
}

@keyframes toastProgress {
    from { width: 100%; }
    to { width: 0%; }
}

/* Анимации появления */
.toast.show {
    animation: toastSlideIn 0.3s ease-out;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .toast {
        min-width: unset;
        max-width: unset;
        width: calc(100% - 20px);
        margin-bottom: 8px;
    }
}

/* Темная тема */
@media (prefers-color-scheme: dark) {
    .toast {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .toast-header {
        background: #2d3748;
        border-bottom-color: #4a5568;
        color: #e2e8f0;
    }
    
    .toast-body {
        color: #e2e8f0;
    }
}