/* The signed-in reader's account chip (see account-chip.js). Self-contained: no
 * page tokens, so the landing page and the manual both load it as it is. */

.acct {
  position: relative;
  font-family: "Noto Sans Thai", -apple-system, "Segoe UI", sans-serif;
}
.acct-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  max-width: 220px;
  padding: 0 10px 0 5px;
  border: 1px solid #e6e8ec;
  border-radius: 6px;
  background: #fff;
  color: #0f1420;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.acct-btn:hover { border-color: #c9cdd4; }
.acct-btn:focus-visible { outline: 2px solid #1667d8; outline-offset: 2px; }
.acct-avatar {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 5px;
  background: #e8f0fc;
  color: #1667d8;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}
.acct-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.acct-chevron {
  flex: none;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-right: 1.5px solid #677181;
  border-bottom: 1.5px solid #677181;
  transform: rotate(45deg);
}
.acct-btn[aria-expanded="true"] .acct-chevron { margin-top: 3px; transform: rotate(-135deg); }

.acct-menu {
  position: absolute;
  inset-block-start: calc(100% + 6px);
  inset-inline-end: 0;
  z-index: 60;
  min-width: 232px;
  max-width: min(320px, calc(100vw - 32px));
  padding: 6px;
  border: 1px solid #e1e4ea;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(15, 23, 42, 0.06);
}
.acct-menu[hidden] { display: none; }
.acct-who {
  display: grid;
  gap: 2px;
  padding: 8px 10px 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid #eef0f3;
  font-size: 13px;
  line-height: 1.4;
}
.acct-who-name { color: #181b25; font-weight: 600; overflow-wrap: anywhere; }
.acct-who-name[hidden] { display: none; }
.acct-who-email { color: #5f6876; overflow-wrap: anywhere; }
.acct-item {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  color: #181b25;
  font-size: 14px;
  text-decoration: none;
}
.acct-item:hover, .acct-item:focus-visible { background: #f3f4f6; }
.acct-item:focus-visible { outline: 2px solid #1667d8; outline-offset: -2px; }

@media (max-width: 700px) {
  .acct-name, .acct-chevron { display: none; }
  .acct-btn { padding: 0 4px; }
}
