.settings-import-file {
  display: none;
}

.transaction .manual-money-inputs > select,
.transaction .detail-row > .manual-field select {
  width: 100%;
}

.transaction .manual-money-inputs {
  grid-template-columns: minmax(0, 1fr) 4ch;
}

.transaction .manual-source-field {
  display: block;
  width: 100%;
}

.transaction .transaction-source-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-top: 4px;
  padding-bottom: 2px;
  text-align: right;
}

.transaction .transaction-source-link {
  width: 100%;
  border: 0;
  padding: 4px 0 2px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--accent);
  text-align: right;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transaction .transaction-source-link:hover,
.transaction .transaction-source-link:focus-visible {
  color: color-mix(in srgb, var(--accent) 84%, var(--text));
}

.settings-screen button.categories,
.settings-screen button.sources,
.settings-screen button.imports,
.settings-screen button.transactions {
  min-width: 2rem;
  padding: 4px 6px;
  font-size: 0.92rem;
  line-height: 1;
}

.transaction .transaction-value-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 4ch;
  gap: 8px;
  width: 100%;
}

.transaction .detail-row input:not([type="file"]),
.transaction .detail-row select {
  padding-top: 4px;
  padding-bottom: 2px;
}

.transaction .transaction-source-input,
.transaction .tag-input,
.transaction .tag-suggestions {
  text-align: right;
}

.transaction .transaction-original-amount-input {
  text-align: right;
  padding-left: 0;
  padding-right: 0;
  appearance: textfield;
  -moz-appearance: textfield;
}

.transaction .transaction-original-currency-select {
  width: 4ch;
  min-width: 4ch;
  padding-left: 0;
  padding-right: 0;
  text-align: center;
  text-align-last: center;
}

.transaction .transaction-original-amount-input::-webkit-outer-spin-button,
.transaction .transaction-original-amount-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.transaction .transaction-converted-number {
  text-align: right;
  white-space: nowrap;
}

.transaction .transaction-converted-currency {
  color: var(--muted);
  text-align: center;
  white-space: nowrap;
}

.source .detail-grid {
  padding: 1.125rem;
}

.source .source-name-input,
.source .source-category-select {
  text-align: right;
}

.category .category-color-field {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  min-width: 0;
}

.category .category-color-button {
  width: 52px;
  min-width: 52px;
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  padding: 0;
  background: color-mix(in srgb, var(--panel) 72%, var(--btn-bg) 28%);
  box-shadow:
    0 1px 0 color-mix(in srgb, var(--text) 7%, transparent),
    0 8px 18px color-mix(in srgb, var(--shadow) 38%, transparent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.category .category-color-button:hover,
.category .category-color-button:focus-visible {
  background: color-mix(in srgb, var(--panel) 72%, var(--btn-bg) 28%);
}

.category .category-color-button::before {
  content: "";
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--category-color, transparent);
  border: 1px solid color-mix(in srgb, var(--category-color, var(--accent)) 55%, var(--border) 45%);
}

.category .category-color-input {
  position: absolute;
  inset: 0 0 0 auto;
  width: 52px !important;
  min-width: 52px;
  height: 44px;
  opacity: 0;
  pointer-events: none;
  padding: 0;
}
