/* The target-project chooser: the list an operator picks a project from after
 * a password sign-in, and the same list again when changing project from the
 * topbar. Linked by the login page and by every portal page, so it may only
 * use tokens and components.css primitives.
 *
 * Every row rule is scoped under .form-overlay on purpose. source_cloud_auth.css
 * sets `.form-overlay label { display: block; margin: 0 0 4px }`, which outranks
 * a bare `.proj-row` and would drop each row's chip onto its own line.
 */

/* The picker toggles .hidden on its own parts, and a bare `.hidden` rule only
 * exists on the login and run sheets -- the portal pages get theirs from
 * base.css, which scopes it to .browser-loading. Declared here so the picker
 * hides the same way on every host that includes it. */
.form-overlay .hidden {
  display: none;
}

.form-overlay .picker-search {
  margin-bottom: 10px;
}

.form-overlay .proj-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  max-height: 264px;
  overflow: auto;
  background: var(--surface);
}

.form-overlay .proj-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--line);
}

.form-overlay .proj-row:last-child {
  border-bottom: 0;
}

.form-overlay .proj-row:hover {
  background: var(--surface-2);
}

.form-overlay .proj-row.on {
  background: var(--red-soft);
  box-shadow: inset 2px 0 0 var(--red);
}

.form-overlay .proj-row input[type="radio"] {
  width: auto;
  margin: 3px 0 0;
  accent-color: var(--red);
}

.form-overlay .proj-main {
  min-width: 0;
  flex: 1 1 auto;
}

.form-overlay .proj-name {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.form-overlay .proj-desc {
  display: block;
  font-size: 11.5px;
  color: var(--dim);
  margin-top: 2px;
  line-height: 1.45;
}

.form-overlay .proj-id {
  display: block;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10.5px;
  color: var(--faint);
  margin-top: 3px;
}

.form-overlay .proj-tail {
  flex: 0 0 auto;
  margin-left: auto;
  align-self: center;
  padding-left: 12px;
}

.form-overlay .proj-empty {
  padding: 14px 12px;
  font-size: 12px;
  color: var(--dim);
}

/* The login page does not link source_cloud_auth.css, so the overlay's own
 * notice style cannot be borrowed here. */
.form-overlay .picker-notice {
  margin-top: 12px;
  padding: 10px 12px;
  border-left: 2px solid var(--amber);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 12px;
  line-height: 1.55;
}

.form-overlay .picker-notice.info {
  border-left-color: var(--line-strong);
  background: var(--surface-2);
  color: var(--dim);
}

.form-overlay .picker-notice.error {
  border-left-color: var(--red);
  background: var(--red-soft);
  color: var(--red-dark);
}

.form-overlay .picker-reauth {
  margin-top: 12px;
}

.form-overlay .picker-reauth label {
  display: block;
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}
