/* Shared between the "Select an Account" page (account-selection.css) and the
   header account dropdown (dashboard.css) — see AccountSearch.cs for the
   matching/filtering/highlighting logic both surfaces call into. */

.account-row-button-reset {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.account-search-bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  border-bottom: 1px solid var(--color-text-primary);
  border-radius: var(--space-1) var(--space-1) 0 0;
  padding: 0 var(--space-1);
  color: var(--color-text-secondary);
}

.account-search-bar:focus-within {
  border-bottom-color: var(--color-brand-blue);
  box-shadow: var(--focus-ring-shadow);
  background-color: var(--focus-ring-bg);
}

.account-search-bar input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: var(--color-text-primary);
  font: inherit;
}

.account-search-bar input::placeholder {
  color: var(--color-text-faint);
}

.account-row-number {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--color-text-primary);
}

.account-row-site-name {
  display: block;
  color: var(--color-text-body-alt);
  font-weight: 700;
}

.account-search-highlight {
  background: none;
  color: var(--color-brand-blue-text);
  font-weight: 700;
  padding: 0;
}

.account-row-disabled {
  opacity: 0.55;
}

.account-row-expand-button {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  font: inherit;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  line-height: 1;
}

.account-row-expand-icon {
  display: inline-block;
  font-size: 1.375rem;
  line-height: 1;
  transition: transform 0.2s ease;
}

.account-row-expand-icon.expanded {
  transform: rotate(90deg);
}

/* Expandable address/site list under a row: a <button> when every item selects the same
   account (items are plain <div>s), or a plain <div> when each item is its own separately
   selectable account (items are <button>s). Hover/selected highlight only ever applies to
   the button variant of an item — never the div variant, which isn't independently
   clickable. */
.account-row-address-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  position: relative;
  z-index: 1;
  margin-top: var(--space-2);
  overflow-y: auto;
  cursor: pointer;
}

.account-row-address {
  display: block;
  text-align: left;
  padding: var(--space-1);
  border-radius: var(--space-1);
  color: var(--color-text-secondary);
  font-size: 0.875rem;
}

button.account-row-address:hover,
.account-row-address-selected {
  background: var(--color-info-bg);
}
