/* Меню аккаунта от сайта (окно профиля): кнопка с аватаром и список аккаунтов.
   Отдельным файлом, потому что его подключают и главный экран, и страница
   магазина, и страница-отказ: меню аккаунта нужно на любой странице кабинета,
   иначе не видно, кем вы вошли, и не переключиться (25.09.2026). */
.who { position: relative; display: flex; align-items: center; gap: 4px; margin: 0; min-width: 0; }
.who-mail { font-size: 12.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }

/* Окно профиля от сайта: кнопка с аватаром и список аккаунтов. Разметка общая с
   сайтом (parts.html, шаблон who), цвета берутся из переменных этой темы. */
/* Текст только для программ чтения с экрана: без этого класса подпись кнопки
   профиля вылезала в шапку словами (снимок 18.09.2026). */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.who-btn {
  display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%;
  padding: 4px 8px 4px 4px; border: 1px solid transparent; border-radius: 999px;
  background: transparent; color: var(--ink-3); font: inherit; cursor: pointer;
}
.who-btn:hover { background: var(--surface-2); color: var(--ink); }
.who-btn[aria-expanded="true"] { background: var(--surface-2); border-color: var(--line); color: var(--ink); }
.who-name { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }
.who-ava {
  display: inline-grid; place-items: center; flex: none; width: 26px; height: 26px;
  border-radius: 50%; background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 650; line-height: 1;
}
.who-ava-lg { width: 44px; height: 44px; font-size: 18px; }
.who-chev { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.who-btn[aria-expanded="true"] .who-chev { transform: rotate(180deg); }
.who-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 60;
  width: min(300px, calc(100vw - 32px));
  display: grid; gap: 2px; padding: 8px;
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface); color: var(--ink); box-shadow: 0 16px 40px rgba(0, 0, 0, .35);
}
.who-head { display: grid; justify-items: center; gap: 4px; padding: 12px 8px 14px; text-align: center; }
.who-title { font-size: 15px; overflow-wrap: anywhere; }
.who-mail { max-width: none; }
.who-head .who-mail { font-size: 12px; white-space: normal; overflow-wrap: anywhere; }
.who-row { display: flex; align-items: center; gap: 2px; }
.who-row form { margin: 0; }
.who-row form:first-child { flex: 1; min-width: 0; }
.who-item {
  display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0;
  padding: 8px; border: 0; border-radius: 10px; background: transparent;
  color: var(--ink); font: inherit; text-align: left; cursor: pointer;
}
.who-item:hover { background: var(--surface-2); }
.who-item-text { display: grid; min-width: 0; }
.who-item-text b { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-item-text small { color: var(--ink-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-drop {
  display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px;
  border: 0; border-radius: 10px; background: transparent; color: var(--ink-3); cursor: pointer;
}
.who-drop:hover { background: var(--surface-2); color: var(--ink); }
.who-drop svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.who-menu form { margin: 0; }
.who-action {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 8px; border: 0; border-radius: 10px; background: transparent;
  color: var(--ink); font: inherit; font-size: 13px; text-align: left; text-decoration: none; cursor: pointer;
}
.who-action:hover { background: var(--surface-2); }
.who-action svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.who-menu .who-action:first-of-type { margin-top: 6px; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; padding-top: 12px; }

/* 🔴 Закрытое меню прячется здесь же, а не общим правилом страницы: стиль меню
   задаёт ему сетку и перебивает атрибут hidden. На странице магазина общего
   правила нет, и меню не закрывалось вовсе (замечание владельца 25.09.2026). */
.who-menu[hidden] { display: none !important; }
.who-action.who-danger { color: #e2688f; font-weight: 600; background: rgba(208, 59, 59, .12); }
