/* Transaction Item Component Styles */

/* A row inside the day block — the block owns the card; rows are separated by
   an internal divider, with no divider under the last row. */
.transaction-item {
  display: block;
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-light);
  transition: background-color 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.transaction-item:last-child {
  border-bottom: none;
}

.transaction-item:hover {
  background-color: var(--color-off-white);
}

.transaction-item__content {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.transaction-item__left {
  flex: 1;
  min-width: 0;
}

.transaction-item__info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.transaction-item__icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.transaction-item__icon--income {
  background-color: var(--color-success-20);
}

.transaction-item__icon--expense {
  background-color: var(--color-danger-20);
}

.transaction-item__icon--debt {
  background-color: var(--color-warning-20);
}

.transaction-item__icon--transfer {
  background-color: var(--color-info-20);
}

.transaction-item__icon--neutral {
  background-color: var(--color-neutral-pill);
}

.transaction-item__icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.transaction-item__icon--income svg {
  color: var(--color-success);
}

.transaction-item__icon--expense svg {
  color: var(--color-danger);
}

.transaction-item__icon--debt svg {
  color: var(--color-warning);
}

.transaction-item__icon--transfer svg {
  color: var(--color-info);
}

.transaction-item__icon--neutral svg {
  color: var(--text-muted);
}

.transaction-item__details {
  min-width: 0;
  flex: 1;
}

.transaction-item__type {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-dark);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transaction-item__description {
  font-size: 0.75rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transaction-item__account {
  font-size: 0.75rem;
  color: #6b7280;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transaction-item__right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: 1rem;
}

.transaction-item__amount-container {
  text-align: right;
}

.transaction-item__amount {
  font-size: 0.875rem;
  font-weight: 600;
}

/* Amounts stay dark where a balance really moved; the coloured icon carries the
   family. Neutral reconciliations are muted (Tour 17c/d). */
.transaction-item__amount--strong {
  color: var(--text-dark);
}

.transaction-item__amount--muted {
  color: var(--text-muted);
  font-weight: 500;
}

.transaction-item__chevron {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--text-muted);
}

/* A provider fee, hung under its parent — never a row of its own. */
.transaction-item__fee {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.25rem;
  padding-left: 3rem; /* aligns under the title, past the 2.5rem icon + gap */
  font-size: 0.75rem;
  color: var(--text-muted);
}

.transaction-item__fee-title {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transaction-item__fee-arrow {
  color: var(--text-muted);
}

.transaction-item__fee-amount {
  flex-shrink: 0;
  font-weight: 500;
  color: var(--text-muted);
}
