/* =========================================================
   LEARN — PRIVATE WORKSPACE ACCESS INDICATORS

   pending  → subdued lock
   locked   → visible lock
   unlocked → green left-edge nail, no lock
========================================================= */

.learn-pill-private {
  position: relative;

  display: flex;
  align-items: center;
  gap: 6px;

  /*
   * Leave room for the unlocked green access marker.
   */
  padding-left: 15px;
}

.learn-pill-label {
  min-width: 0;
  overflow: hidden;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.learn-pill-access-lock {
  flex: 0 0 auto;

  margin-left: 2px;

  color: rgba(93, 102, 124, 0.68);

  font-size: 0.61rem;
  line-height: 1;

  transition:
    opacity 160ms ease,
    color 160ms ease;
}

/* =========================================================
   CHECKING ACCESS
========================================================= */

.learn-pill-private.is-access-pending
  .learn-pill-access-lock {
  opacity: 0.38;
}

/* =========================================================
   LOCKED
========================================================= */

.learn-pill-private.is-locked
  .learn-pill-access-lock {
  display: inline-flex;

  opacity: 0.8;
}

/* =========================================================
   UNLOCKED

   Slim green vertical “nail” inspired by the governed
   status edge used elsewhere in the scientific interface.
========================================================= */

.learn-pill-private.is-unlocked::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0px;
    width: 7px;
    height: 7px;
    transform: translateY(-50%);
    border-radius: 999px;
    background: linear-gradient(
      180deg,
      #8de4c4 0%,
      #42bc91 52%,
      #269b72 100%
    );
    box-shadow: 0 0 0 1px
      rgba(43, 163, 119, 0.13),
    0 0 9px
      rgba(54, 194, 143, 0.22);
    pointer-events: none;
}

.learn-pill-private.is-unlocked
  .learn-pill-access-lock {
  display: none;
}

.learn-pill-private.is-unlocked
  .learn-pill-label {
  color: inherit;
}

/* Slightly stronger marker for the selected workspace. */

.learn-pill-private.is-unlocked.is-active::before,
.learn-pill-private.is-unlocked[aria-current="page"]::before {
  height: 24px;

  background:
    linear-gradient(
      180deg,
      #a1edd2 0%,
      #4fc99b 50%,
      #208f68 100%
    );

  box-shadow:
    0 0 0 1px
      rgba(43, 163, 119, 0.18),
    0 0 12px
      rgba(54, 194, 143, 0.32);
}

/* =========================================================
   UNKNOWN / TEMPORARY NETWORK FAILURE
========================================================= */

.learn-pill-private.is-access-unknown
  .learn-pill-access-lock {
  opacity: 0.45;
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {
  .learn-pill-private {
    padding-left: 16px;
  }
}