/* =============================================================================
   ИСТОРИЯ ТРАНЗАКЦИЙ
   =============================================================================
   Использует дизайн-токены из tokens.css
   ============================================================================= */

/* ============= ОБЩИЕ СТИЛИ ============= */

#historyTab {
    padding: 0 var(--space-1);
}

/* ============= КОНТЕЙНЕРЫ ============= */

.transaction-history-section {
    margin-top: 0;
    width: 100%;
}

.transaction-history-container {
    width: 100%;
    margin-top: 0;
    max-height: 500px;
    overflow-y: auto;
    background-color: var(--color-bg);
    border-radius: var(--radius-xl);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.transaction-history-container::-webkit-scrollbar {
    display: none;
}

.transaction-history-list {
    width: 100%;
    background-color: var(--color-bg);
    padding: 0 var(--space-3);
}

/* ============= ЭЛЕМЕНТЫ ИСТОРИИ ТРАНЗАКЦИЙ ============= */

.transaction-history-item {
    display: flex;
    align-items: center;
    padding: var(--space-3) 0;
    position: relative;
    gap: var(--space-3);
    background-color: var(--color-bg);
    width: 100%;
    box-sizing: border-box;
}

/* Разделительная линия */
.transaction-history-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50px;
    right: 0;
    height: 0.5px;
    background-color: var(--color-border);
    z-index: 1;
}

/* Убираем линию у последнего элемента */
.transaction-history-item:last-child::after {
    display: none;
}

/* ============= ИКОНКА ТРАНЗАКЦИИ ============= */

.transaction-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    overflow: hidden;
    background-color: var(--color-surface-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

/* ============= ИНФОРМАЦИЯ О ТРАНЗАКЦИИ ============= */

.transaction-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-width: 0;
}

.transaction-title {
    font-size: var(--text-md);
    font-weight: var(--weight-normal);
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.transaction-date {
    font-size: var(--text-sm);
    color: var(--color-text-tertiary);
    margin-top: 2px;
    font-weight: var(--weight-normal);
}

/* ============= СУММА ТРАНЗАКЦИИ ============= */

.transaction-amount {
    font-size: var(--text-md);
    font-weight: var(--weight-medium);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 50px;
    margin-left: auto;
    padding-left: var(--space-3);
    text-align: right;
    gap: 3px;
}

.transaction-amount.positive {
    color: var(--color-success);
}

.transaction-amount.negative {
    color: var(--color-error);
}

.transaction-amount.neutral {
    color: var(--color-text);
}

/* Иконка кристалла в сумме */
.transaction-amount .crystal-icon {
    width: 1.15em;
    height: 1.15em;
    transform: none !important;
    animation: none !important;
    transition: none !important;
    position: static;
    flex-shrink: 0;
    margin-left: 2px;
}

/* Цвет для SVG иконки кристалла */
.transaction-amount .crystal-icon {
    fill: var(--color-text) !important;
    color: var(--color-text) !important;
}

/* ============= АДАПТИВНОСТЬ ============= */

@media (max-width: 360px) {
    .transaction-history-item {
        gap: var(--space-2);
        padding: var(--space-3) 0;
    }
    
    .transaction-icon {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 20px;
    }
    
    .transaction-title {
        font-size: var(--text-sm);
    }
    
    .transaction-amount {
        font-size: var(--text-sm);
        min-width: 40px;
    }
}
