.staff-role-help,
.staff-access-help {
  position: relative;
}

.staff-role-help > summary {
  min-height: 42px;
  padding: 10px 14px;
  color: var(--brand-blue);
  background: #fff7ed;
  border: 1px solid var(--orange-line);
  border-radius: 6px;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.staff-role-help > summary::-webkit-details-marker,
.staff-access-help > summary::-webkit-details-marker {
  display: none;
}

.staff-role-help > summary::after {
  content: " +";
}

.staff-role-help[open] > summary::after {
  content: " −";
}

.staff-role-popover,
.staff-access-help > p {
  position: absolute;
  z-index: 30;
  top: calc(100% + 7px);
  right: 0;
  width: min(360px, calc(100vw - 48px));
  margin: 0;
  padding: 12px 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--orange);
  border-radius: 7px;
  box-shadow: 0 12px 30px rgba(15, 27, 48, 0.18);
}

.staff-role-popover strong,
.staff-role-popover p {
  display: block;
  margin: 0;
}

.staff-role-popover p {
  margin: 3px 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.staff-role-popover p:last-child {
  margin-bottom: 0;
}

.staff-access-field {
  min-width: 0;
}

.staff-access-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 800;
}

.staff-access-label label {
  margin: 0;
}

.staff-access-help > summary {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  padding: 0;
  color: var(--brand-blue);
  background: #eef4ff;
  border: 1px solid #a9bbd8;
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  cursor: help;
  list-style: none;
}

.staff-access-help > p {
  right: auto;
  left: -8px;
  width: min(330px, calc(100vw - 48px));
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

@media (hover: hover) {
  .staff-role-help:not([open]):hover > .staff-role-popover,
  .staff-access-help:not([open]):hover > p {
    display: block;
  }
}

@media (max-width: 760px) {
  .staff-role-popover {
    right: -116px;
  }

  .staff-access-help > p {
    left: -128px;
  }
}
