/* ============================================================================
   SHELFD — LANGUAGE PICKER  (v15.769)
   Editorial Dark, lavender accent. Bottom sheet, transform+opacity only so it
   holds 120Hz; no layout animation.
   ========================================================================== */

.shelfd-language-sheet {
  position: fixed;
  inset: 0;
  z-index: 100002;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.shelfd-language-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  opacity: 0;
  transition: opacity 220ms cubic-bezier(0.22, 1, 0.36, 1);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.shelfd-language-sheet.is-open .shelfd-language-scrim { opacity: 1; }

.shelfd-language-panel {
  position: relative;
  width: 100%;
  max-width: 560px;
  background: #121214;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  padding: 10px 16px calc(env(safe-area-inset-bottom, 0px) + 18px);
  box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.55);
  transform: translate3d(0, 100%, 0);
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.shelfd-language-sheet.is-open .shelfd-language-panel { transform: translate3d(0, 0, 0); }

.shelfd-language-grip {
  width: 38px;
  height: 4px;
  margin: 2px auto 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.shelfd-language-head { padding: 0 2px 12px; }
.shelfd-language-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.00em;
  color: #f4f4f5;
}
.shelfd-language-sub {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.00em;
  color: rgba(255, 255, 255, 0.56);
  line-height: 1.35;
}

.shelfd-language-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 4px 0 12px;
}

.shelfd-language-option {
  display: grid;
  /* the check column is fixed so rows do not shift when the tick moves —
     and the middle column can absorb longer translated names */
  grid-template-columns: 1fr auto 22px;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.045);
  color: #f4f4f5;
  text-align: left;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}
.shelfd-language-option:active { transform: scale(0.985); }
.shelfd-language-option.is-active {
  border-color: rgba(167, 139, 250, 0.55);
  background: rgba(167, 139, 250, 0.12);
}

.shelfd-language-native {
  font-size: 14.1px;
  font-weight: 500;
  letter-spacing: 0.00em;
}
.shelfd-language-english {
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0.00em;
  color: rgba(255, 255, 255, 0.5);
}
.shelfd-language-check {
  font-size: 14px;
  font-weight: 600;
  color: #a78bfa;
  text-align: right;
}

.shelfd-language-note {
  padding: 0 2px 12px;
  font-size: 11.5px;
  font-weight: 300;
  letter-spacing: 0.00em;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.42);
}
.shelfd-language-note:empty { display: none; }

.shelfd-language-cancel {
  width: 100%;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #f4f4f5;
  font-size: 14.1px;
  font-weight: 500;
  letter-spacing: 0.00em;
  cursor: pointer;
}

/* The Settings row's trailing "English" label. The row is a 2-column grid in
   the base stylesheet, so the added column is placed explicitly rather than
   relying on source order. */
.profile-settings-category-row .profile-settings-language-current {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.00em;
  color: rgba(255, 255, 255, 0.5);
  justify-self: end;
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .shelfd-language-panel,
  .shelfd-language-scrim { transition: none; }
}
