/* Anahata v2 — balance tile. Figma: "Balance Feature" set. */

.balance-tile {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--a-space-2);
  padding: var(--a-space-3);
  border: 1px solid var(--a-border-strong);
  border-radius: var(--a-radius);
  background: var(--a-surface);
  text-decoration: none;
}

.balance-tile.is-selected {
  border-color: var(--a-tan);
}

.balance-tile__icon {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--a-radius);
  background: var(--a-tan);
  color: var(--a-on-dark);
}

.balance-tile__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.balance-tile__title {
  font-family: var(--a-font-body);
  font-weight: 500;
  font-size: var(--a-fs-label);
  color: var(--a-ink);
}

.balance-tile__subtitle {
  font-family: var(--a-font-body);
  font-size: var(--a-fs-caption);
  color: var(--a-text-muted);
}

.balance-tile:not(.is-selected) .balance-tile__badge {
  display: none;
}

.balance-tile__badge {
  position: absolute;
  top: -8px;
  right: -8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 21px;
  height: 21px;
  border-radius: var(--a-radius-round);
  background: var(--a-tan);
  color: var(--a-on-dark);
}


/* the tile itself is the control when it carries a radio (Figma 1552:3219) */
.balance-tile__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.balance-tile:has(.balance-tile__input) {
  position: relative;
  cursor: pointer;
}

/* keyboard focus rings the whole tile — a ring on the icon read as a stray
   stroke once the tile was selected (designer review 2026-09-26 #7) */
.balance-tile:has(.balance-tile__input:focus-visible) {
  outline: 2px solid var(--a-tan);
  outline-offset: 2px;
}

/* an inline svg sits on the text baseline and drifts off-centre in the square */
.balance-tile__icon .a-icon {
  display: block;
}
