/*
 * Local styles Tailwind's utility classes can't express: the JS-free field
 * toggles (Avulso/Fixo, Parcelado) built with the CSS :has() selector.
 */

/* Quick entry: Avulso vs Fixo */

.quick-entry-field--fixo {
  display: none;
}

.quick-entry:has(.fixed-toggle:checked) .quick-entry-field--fixo {
  display: block;
}

.quick-entry:has(.fixed-toggle:checked) .quick-entry-field--avulso {
  display: none;
}

/* Quick entry: Parcelado vs sem parcelas, nested inside the Fixo block above */

.quick-entry-subfield--parcelado {
  display: none;
}

.quick-entry:has(.parcelado-toggle:checked) .quick-entry-subfield--parcelado {
  display: block;
}

.quick-entry:has(.parcelado-toggle:checked) .quick-entry-subfield--sem-parcelas {
  display: none;
}

/* Quick entry cards: red for Gasto, green for Receita */

.quick-entry--expense .quick-entry-summary {
  background-color: #dc2626;
  color: #fff;
}

.quick-entry--income .quick-entry-summary {
  background-color: #16a34a;
  color: #fff;
}

.quick-entry-summary {
  cursor: pointer;
  list-style: none;
}

.quick-entry-summary::-webkit-details-marker {
  display: none;
}

/* History table: color the amount by kind */

.transaction-row--expense td:last-child {
  color: #dc2626;
  font-weight: 600;
}

.transaction-row--income td:last-child {
  color: #16a34a;
  font-weight: 600;
}

/* Links without an explicit color/class need one — Tailwind's Preflight
   resets <a> to inherit color and drop the underline. */
a:not([class]) {
  color: #2563eb;
  text-decoration: underline;
}
