/**
 * notifications.css - Стили для всплывающих уведомлений
 */

:root {
    --notification-success: #10b981;
    --notification-error: #ef4444;
    --notification-warning: #f59e0b;
    --notification-info: #3b82f6;
    --notification-bg: #ffffff;
    --notification-text: #1f2937;
    --notification-text-light: #6b7280;
}

.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2147483647;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 380px;
    width: calc(100% - 40px);
    pointer-events: none;
}

.notification {
    background: var(--notification-bg);
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    padding: 16px 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transform: translateX(120%);
    animation: slideIn 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    border-left: 4px solid transparent;
    pointer-events: auto;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.notification.success {
    border-left-color: var(--notification-success);
}

.notification.success .notification-icon {
    background: rgba(16, 185, 129, 0.15);
    color: var(--notification-success);
}

.notification.error {
    border-left-color: var(--notification-error);
}

.notification.error .notification-icon {
    background: rgba(239, 68, 68, 0.15);
    color: var(--notification-error);
}

.notification.warning {
    border-left-color: var(--notification-warning);
}

.notification.warning .notification-icon {
    background: rgba(245, 158, 11, 0.15);
    color: var(--notification-warning);
}

.notification.info {
    border-left-color: var(--notification-info);
}

.notification.info .notification-icon {
    background: rgba(59, 130, 246, 0.15);
    color: var(--notification-info);
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.notification:hover .notification-icon {
    transform: scale(1.1);
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--notification-text);
    font-size: 1rem;
}

.notification-message {
    font-size: 0.875rem;
    color: var(--notification-text-light);
    line-height: 1.5;
}

.notification-close {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    transition: all 0.2s;
    font-size: 1.1rem;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.notification-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #4b5563;
    transform: rotate(90deg);
}

/* Прогресс-бар */
.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.3;
    width: 100%;
    transform-origin: left;
    animation: progress 5s linear forwards;
}

.notification.success .notification-progress {
    background: var(--notification-success);
}

.notification.error .notification-progress {
    background: var(--notification-error);
}

.notification.warning .notification-progress {
    background: var(--notification-warning);
}

.notification.info .notification-progress {
    background: var(--notification-info);
}

@keyframes slideIn {
    to {
        transform: translateX(0);
    }
}

@keyframes slideOut {
    to {
        transform: translateX(120%);
        opacity: 0;
    }
}

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

.notification.fade-out {
    animation: slideOut 0.3s ease forwards;
}

.notification.fade-out .notification-progress {
    animation: none;
}

/* Адаптивность для мобильных */
@media (max-width: 640px) {
    .notification-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        width: auto;
    }
    
    .notification {
        padding: 14px 16px;
        gap: 12px;
    }
    
    .notification-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}