/* The account switcher (templates/accounts/_switcher.html): the chip on the
   dashboard hero, its panel, and "Continue as" on the log-in page. */

.px-switch-chip {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 14px; padding: 6px 14px 6px 6px;
  border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 999px;
  background: rgba(255, 255, 255, 0.16); color: #fff;
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 6px 18px rgba(11, 26, 74, 0.18);
  transition: background .2s, transform .2s;
}
.px-switch-chip:hover { background: rgba(255, 255, 255, 0.26); transform: translateY(-1px); }
.px-switch-chip:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.px-switch-chip__faces { display: inline-flex; }
.px-switch-chip__faces .px-switch__face { width: 30px; height: 30px; font-size: 12px; border: 2px solid #fff; }
.px-switch-chip__faces .px-switch__face + .px-switch__face { margin-left: -10px; }
.px-switch-chip__n {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  display: inline-grid; place-items: center;
  background: var(--yellow); color: var(--navy); font-size: 12px; font-weight: 800;
}

/* avatars: initials on the logo's colours */
.px-switch__face {
  flex: none; width: 42px; height: 42px; border-radius: 50%;
  display: inline-grid; place-items: center;
  font-weight: 800; font-size: 15px; letter-spacing: .02em; line-height: 1;
}
.px-switch__face--a { background: linear-gradient(135deg, #1846E0, #0F31AE); color: #fff; }
.px-switch__face--b { background: linear-gradient(135deg, #FFC72C, #E9AE00); color: #0B1A4A; }
.px-switch__face--c { background: linear-gradient(135deg, #0B1A4A, #1846E0); color: #FFC72C; }
.px-switch__face--school { background: #E7EFFF; color: #1846E0; border-radius: 12px; }
.px-switch__face--big { width: 56px; height: 56px; font-size: 20px; box-shadow: 0 0 0 3px #fff, 0 0 0 5px #FFC72C; }

/* the panel: a centred card on wide screens, a sheet from the bottom on phones */
.px-switch {
  width: min(460px, calc(100vw - 32px)); max-height: min(640px, calc(100vh - 48px));
  padding: 0; border: 0; border-radius: 24px; background: transparent; color: var(--navy);
  overflow: visible;
}
.px-switch::backdrop { background: rgba(11, 26, 74, 0.55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.px-switch[open] { animation: px-switch-in .28s cubic-bezier(.2, .9, .3, 1.1); }
@keyframes px-switch-in { from { opacity: 0; transform: translateY(18px) scale(.97); } }
.px-switch__sheet {
  display: flex; flex-direction: column; max-height: inherit;
  background: #fff; border-radius: 24px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(11, 26, 74, 0.35);
  border: 2px solid transparent;
  background: linear-gradient(#fff, #fff) padding-box, linear-gradient(135deg, rgba(24, 70, 224, .45), rgba(255, 199, 44, .6)) border-box;
}
.px-switch__head {
  display: flex; align-items: center; gap: 8px;
  padding: 18px 18px 12px; border-bottom: 1px solid var(--line);
}
.px-switch__title { flex: 1; margin: 0; font-size: 18px; font-weight: 800; }
.px-switch__close, .px-switch__back {
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: var(--sky); color: var(--blue); font-size: 22px; line-height: 1; cursor: pointer;
}
.px-switch__close:hover, .px-switch__back:hover { background: #D6E3FF; }
.px-switch__pane { padding: 16px 18px 6px; overflow-y: auto; }
.px-switch__pane[hidden] { display: none; }
.px-switch__pane.is-entering { animation: px-pane-in .22s ease-out; }
@keyframes px-pane-in { from { opacity: 0; transform: translateX(16px); } }

.px-switch__me {
  display: flex; align-items: center; gap: 14px;
  padding: 14px; border-radius: 18px;
  background: linear-gradient(135deg, #E7EFFF, #FFF5D6);
}
.px-switch__who { display: flex; flex-direction: column; min-width: 0; flex: 1; text-align: left; }
.px-switch__who strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.px-switch__who small { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.px-switch__badge {
  flex: none; padding: 4px 10px; border-radius: 999px;
  background: var(--blue); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .03em;
}
.px-switch__label { margin: 18px 2px 8px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.px-switch__empty { margin: 0; padding: 14px; border-radius: 14px; border: 1.5px dashed #D6E3FF; color: var(--muted); font-size: 14px; }
.px-switch__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.px-switch__row { display: flex; align-items: center; gap: 6px; }
.px-switch__go { flex: 1; min-width: 0; margin: 0; }
.px-switch__drop { margin: 0; }
.px-switch__pick, .px-switch__school-btn {
  width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 16px;
  background: #fff; color: var(--navy); font: inherit; cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.px-switch__pick:hover, .px-switch__school-btn:hover,
.px-switch__pick:focus-visible, .px-switch__school-btn:focus-visible {
  border-color: var(--blue); box-shadow: 0 8px 20px rgba(24, 70, 224, 0.14); transform: translateY(-1px); outline: none;
}
.px-switch__pick:disabled { opacity: .6; cursor: progress; }
.px-switch__arrow { flex: none; color: var(--blue); font-weight: 800; font-size: 13px; }
.px-switch__school-btn { margin-top: 14px; background: linear-gradient(135deg, #fff, #F2F5FC); }
.px-switch__schoolicon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--butter); font-size: 20px; }
.px-switch__x {
  width: 34px; height: 34px; border: 0; border-radius: 50%;
  background: transparent; color: var(--muted); font-size: 20px; cursor: pointer;
}
.px-switch__x:hover { background: var(--sky); color: var(--blue); }

.px-switch__foot { padding: 12px 18px 18px; border-top: 1px solid var(--line); text-align: center; }
.px-switch__foot form { margin: 0; }
.px-switch__add {
  width: 100%; padding: 13px 16px; border: 0; border-radius: 14px;
  background: var(--yellow); color: var(--navy); font: inherit; font-weight: 800; font-size: 15px; cursor: pointer;
  box-shadow: 0 8px 18px rgba(233, 174, 0, 0.28);
}
.px-switch__add:hover { background: #FFD24F; }
.px-switch__add span { font-size: 18px; margin-right: 4px; }
.px-switch__note { margin: 8px 0 6px; font-size: 12.5px; color: var(--muted); }
.px-switch__forget { border: 0; background: none; color: var(--blue); font: inherit; font-size: 13px; font-weight: 700; text-decoration: underline; cursor: pointer; }

@media (max-width: 700px) {
  .px-switch-chip { margin-top: 12px; gap: 8px; padding-right: 10px; font-size: 13px; }
  .px-switch-chip__faces .px-switch__face + .px-switch__face { display: none; }
  .px-switch {
    width: 100vw; max-width: 100vw; max-height: 88vh; margin: auto 0 0; border-radius: 24px 24px 0 0;
  }
  .px-switch[open] { animation-name: px-switch-up; }
  @keyframes px-switch-up { from { transform: translateY(100%); } }
  .px-switch__sheet { border-radius: 24px 24px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .px-switch__sheet::before { content: ""; align-self: center; width: 44px; height: 5px; margin-top: 8px; border-radius: 3px; background: #D6E3FF; }
}
@media (prefers-reduced-motion: reduce) {
  .px-switch[open], .px-switch__pane.is-entering { animation: none; }
}

/* log-in page: "Continue as" and "Remember me on this device" */
.px-continue { margin: 0 0 18px; }
.px-continue__title { margin: 0 0 8px; font-size: 13px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.px-continue .px-switch__list { gap: 8px; }
.px-continue__or { display: flex; align-items: center; gap: 10px; margin: 16px 0 4px; color: var(--muted); font-size: 13px; }
.px-continue__or::before, .px-continue__or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.px-remember { display: flex; align-items: flex-start; gap: 10px; margin: 4px 0 16px; font-size: 14px; color: var(--navy); cursor: pointer; }
.px-remember input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--blue); flex: none; }
.px-remember small { display: block; color: var(--muted); font-size: 12.5px; }
.px-adding { margin: 0 0 14px; padding: 12px 14px; border-radius: 14px; background: #FFF5D6; border: 1px solid #FFC72C; font-size: 14px; }
