.student-inbox { flex: none; }
.student-inbox-trigger {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid #5a6680;
  border-radius: 7px;
  background: transparent;
  color: #f2f5ff;
  cursor: pointer;
}
.student-inbox-trigger:hover,
.student-inbox-trigger[aria-expanded="true"] { background: #202c45; border-color: #8392b2; }
.student-inbox-count {
  position: absolute;
  inset: -5px -6px auto auto;
  min-width: 18px;
  height: 18px;
  padding-inline: 3px;
  border: 1px solid #111622;
  border-radius: 20px;
  background: #bf263d;
  color: #fff;
  font-size: 10px;
  font-weight: 750;
  line-height: 16px;
  text-align: center;
  box-sizing: border-box;
}
.student-inbox-panel {
  position: fixed;
  z-index: 20;
  inset: var(--inbox-top, 68px) var(--inbox-right, 12px) auto auto;
  width: min(320px, calc(100vw - 16px));
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #d9e1f0;
  border-radius: 10px;
  background: #fff;
  color: #1b2438;
  box-shadow: 0 12px 36px #14214032;
}
.student-inbox-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 12px; border-bottom: 1px solid #e6eaf3; }
.student-inbox-heading h2 { margin: 0; font-size: 14px; }
.student-inbox-heading h2:focus { outline: none; }
.student-inbox-clear { min-height: 32px; padding: 4px; border: 0; border-radius: 4px; background: transparent; color: #1a45c3; font: inherit; font-size: 12px; cursor: pointer; }
.student-inbox-clear:disabled { color: #64718b; cursor: default; }
.student-inbox-clear:hover:not(:disabled) { background: #edf2ff; }
.student-inbox-list { padding: 4px; max-height: min(265px, calc(100vh - var(--inbox-top, 68px) - 54px)); overflow-y: auto; overscroll-behavior: contain; }
.student-inbox-empty { margin: 0; padding: 12px 8px; color: #586782; font-size: 13px; }
.student-inbox-item {
  display: grid;
  grid-template-columns: 6px 1fr;
  gap: 9px;
  width: 100%;
  margin: 0;
  padding: 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #25324a;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.student-inbox-item[data-unread] { background: #f5f8ff; }
.student-inbox-item:hover { background: #eaf0ff; }
.student-inbox-dot { width: 6px; height: 6px; margin-top: 6px; border-radius: 50%; }
.student-inbox-item[data-unread] .student-inbox-dot { background: #bf263d; }
.student-inbox-item strong,
.student-inbox-item small { display: block; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.student-inbox-item small { margin-top: 2px; color: #506079; }
.student-inbox button:focus-visible { outline: 2px solid #456bff; outline-offset: -2px; }
@media (max-width: 900px) {
  .attempt-banner > .student-inbox { order: 1; }
  .student-inbox-trigger { width: 36px; height: 36px; }
}
@media (max-width: 480px) {
  html[data-theme] .attempt-banner:has(> .student-inbox) > .race-day { order: 0; }
}
