/* Ledger choice group: independent of login layout and application handlers.
   Use labelled role="group" and type="button" with aria-pressed on every option. */
:root {
  --portal-choice-muted: #505d69;
  --portal-choice-text: #1d252c;
  --portal-choice-selected: #e2e6e9;
  --portal-choice-hover: #f5f6f7;
  --portal-choice-focus: #234e70;
}
:root[data-theme="dark"] {
  --portal-choice-muted: #b1bcc5;
  --portal-choice-text: #eef0f2;
  --portal-choice-selected: #35414b;
  --portal-choice-hover: #090b0e;
  --portal-choice-focus: #91bfe3;
}
.portal-choice {
  display: flex;
  gap: 2px;
}
.portal-choice--outlined {
  width: fit-content;
  max-width: 100%;
  flex-wrap: wrap;
  padding: 3px;
  border: 1px solid var(--portal-field-border, var(--portal-choice-muted));
}
.portal-choice > button {
  box-sizing: border-box;
  font-family: inherit;
  line-height: inherit;
  cursor: pointer;
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 0;
  color: var(--portal-choice-muted);
  background: transparent;
  font-size: 13px;
  font-weight: 500;
}
.portal-choice > button[aria-pressed="true"] {
  background: var(--portal-choice-selected);
  color: var(--portal-choice-text);
}
.portal-choice--outlined > button[aria-pressed="true"] {
  border-color: var(--portal-choice-focus);
  font-weight: 600;
}
.portal-choice > button:hover:not([aria-pressed="true"]) {
  background: var(--portal-choice-hover);
}
.portal-choice > button:focus-visible {
  outline: 2px solid var(--portal-choice-focus);
  outline-offset: 3px;
}

/* Preview options retain the choice group's semantics and state palette. */
.portal-choice--previews {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 720px;
}
.portal-choice--previews > button {
  height: auto;
  min-width: 0;
  padding: 12px;
  gap: 10px;
  place-items: stretch;
  text-align: left;
  align-content: start;
  border-color: var(--fo-edge, var(--portal-choice-muted));
}
.portal-choice--previews > button[aria-pressed="true"] {
  border-color: var(--portal-choice-focus);
  box-shadow: inset 0 0 0 1px var(--portal-choice-focus);
}
.portal-choice__caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
}
.portal-choice__check {
  visibility: hidden;
  color: var(--portal-choice-focus);
}
[aria-pressed="true"] > .portal-choice__caption > .portal-choice__check {
  visibility: visible;
}
.portal-choice__description {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
}
@media (max-width: 480px) {
  .portal-choice--previews {
    grid-template-columns: minmax(0, 1fr);
  }
  .portal-choice--previews > button {
    grid-template-columns: 80px minmax(0, 1fr);
    column-gap: 12px;
    row-gap: 4px;
    align-content: center;
  }
  .portal-choice--previews > button > :first-child {
    grid-row: span 2;
  }
  .portal-choice__caption {
    font-size: 13px;
  }
}
