/* ==========================================================================
   ФиноПомощник - Стили уведомлений для финансового модуля (Premium Design)
   ========================================================================== */

/* Контейнер для уведомлений: центрирован по горизонтали вверху */
.finance-notifications-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: var(--z-loading, 1060);
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    pointer-events: none;
}

/* Базовые стили уведомления: современный "стеклянный" дизайн */
.finance-notification {
    width: 100%;
    pointer-events: auto;
    background: rgba(var(--bg-rgb, 255, 255, 255), 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(var(--border-rgb, 200, 200, 200), 0.3);
    border-left: 4px solid var(--color-info, #007aff); /* Цвет по умолчанию */
    border-radius: var(--radius-lg, 12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    color: var(--text-primary, #1e293b);
    overflow: hidden;

    /* Анимация появления/исчезновения */
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
    max-height: 0;
    transition: transform 0.3s cubic-bezier(0.215, 0.610, 0.355, 1),
                opacity 0.3s ease,
                max-height 0.3s ease,
                margin-bottom 0.3s ease;
}

.finance-notification.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    max-height: 200px;
}

.finance-notification.hide {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    max-height: 0;
}

/* Контент уведомления */
.notification-content {
    display: flex;
    align-items: flex-start;
    padding: 14px 18px;
    position: relative;
}

.notification-icon {
    font-size: 22px;
    margin-right: 14px;
    flex-shrink: 0;
    margin-top: -2px;
}

.notification-body {
    flex: 1;
    min-width: 0;
    padding-right: 20px;
}

.notification-message {
    font-weight: 600;
    font-size: 15px;
    line-height: 1.4;
    color: var(--text-primary);
}

.notification-details {
    font-size: 13px;
    opacity: 0.8;
    line-height: 1.4;
    margin-top: 4px;
}

.notification-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(var(--text-primary-rgb), 0.05);
    border: none;
    font-size: 18px;
    cursor: pointer;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    opacity: 0.7;
}

.notification-close:hover {
    background: rgba(var(--text-primary-rgb), 0.1);
    opacity: 1;
    transform: scale(1.1);
}

/* Прогресс-бар для уведомлений о загрузке */
.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(142, 142, 147, 0.2);
}

.notification-progress .progress-bar {
    height: 100%;
    background: var(--color-secondary, #8e8e93);
    width: 0%;
    animation: progress-animation 2s ease-out infinite;
}

@keyframes progress-animation {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* Стили по типам уведомлений */
.finance-notification--success {
    border-left-color: var(--color-success, #34c759);
    background: rgba(var(--color-success-rgb, 52, 199, 89), 0.15);
}
.finance-notification--error {
    border-left-color: var(--color-danger, #ff3b30);
    background: rgba(var(--color-danger-rgb, 255, 59, 48), 0.15);
}
.finance-notification--warning {
    border-left-color: var(--color-warning, #ffcc00);
    background: rgba(var(--color-warning-rgb, 255, 204, 0), 0.15);
}
.finance-notification--info {
    border-left-color: var(--color-info, #007aff);
    background: rgba(var(--color-info-rgb, 0, 122, 255), 0.15);
}
.finance-notification--loading {
    border-left-color: var(--color-secondary, #8e8e93);
    background: rgba(var(--color-secondary-rgb, 142, 142, 147), 0.15);
}


/* --- Темная тема --- */
[data-theme="dark"] .finance-notification {
    background: rgba(var(--bg-dark-rgb, 44, 44, 46), 0.7);
    border-color: rgba(var(--border-dark-rgb, 80, 80, 80), 0.5);
    color: var(--text-dark-primary, #f3f4f6);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
[data-theme="dark"] .notification-message { color: var(--text-dark-primary); }

[data-theme="dark"] .finance-notification--success {
    border-left-color: var(--color-success, #34c759);
    background: rgba(var(--color-success-rgb, 52, 199, 89), 0.2);
}
[data-theme="dark"] .finance-notification--error {
    border-left-color: var(--color-danger, #ff3b30);
    background: rgba(var(--color-danger-rgb, 255, 59, 48), 0.2);
}
[data-theme="dark"] .finance-notification--warning {
    border-left-color: var(--color-warning, #ffcc00);
    background: rgba(var(--color-warning-rgb, 255, 204, 0), 0.2);
}
[data-theme="dark"] .finance-notification--info {
    border-left-color: var(--color-info, #007aff);
    background: rgba(var(--color-info-rgb, 0, 122, 255), 0.2);
}
[data-theme="dark"] .finance-notification--loading {
    border-left-color: var(--color-secondary, #8e8e93);
    background: rgba(var(--color-secondary-rgb, 142, 142, 147), 0.2);
}

[data-theme="dark"] .notification-close {
    background: rgba(var(--text-dark-primary-rgb), 0.1);
    color: var(--text-dark-secondary);
}
[data-theme="dark"] .notification-close:hover {
    background: rgba(var(--text-dark-primary-rgb), 0.2);
}


/* --- Адаптивность --- */
@media (max-width: 480px) {
    .finance-notifications-container {
        top: 10px;
        left: 10px;
        right: 10px;
        width: auto;
        transform: none;
        max-width: none;
    }
} 