/* JR 账户组件（account-widget.js）配套样式 —— 右上角账户入口，三个生态通用 */

.jr-acct {
  position: fixed;
  top: 14px;
  right: 16px;
  z-index: 1200;
  font-size: 13px;
  --jr-acct-line: rgba(127, 127, 127, 0.22);
  --jr-acct-bg: rgba(255, 255, 255, 0.92);
  --jr-acct-bg-soft: rgba(127, 127, 127, 0.08);
  color: var(--text, #2b2723);
}

body[data-theme="ocean"] .jr-acct,
.jr-acct:where(body[data-theme="ocean"] *) {
  --jr-acct-bg: rgba(18, 22, 34, 0.94);
  --jr-acct-line: rgba(255, 255, 255, 0.14);
  --jr-acct-bg-soft: rgba(255, 255, 255, 0.06);
  color: #e8e6e1;
}

/* 触发按钮 */
.jr-acct__trigger {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 12px 6px 6px;
  border: 1px solid var(--jr-acct-line);
  border-radius: 999px;
  background: var(--jr-acct-bg);
  color: inherit;
  font: inherit;
  cursor: pointer;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.10);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.jr-acct__trigger:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.14);
}

.jr-acct__avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
}

.jr-acct__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.25;
}
.jr-acct__name {
  font-size: 12.5px;
  font-weight: 600;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.jr-acct__quota {
  font-size: 11px;
  opacity: 0.62;
}

/* 下拉菜单 */
.jr-acct__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 216px;
  padding: 14px;
  border: 1px solid var(--jr-acct-line);
  border-radius: 18px;
  background: var(--jr-acct-bg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.jr-acct__menu[hidden] { display: none; }

.jr-acct__head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 10px;
}
.jr-acct__head strong {
  font-size: 13.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.jr-acct__head span {
  font-size: 11.5px;
  opacity: 0.6;
}

.jr-acct__bar {
  height: 5px;
  border-radius: 999px;
  background: var(--jr-acct-bg-soft);
  overflow: hidden;
}
.jr-acct__fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #B4532A, #D99A2B);
  transition: width 0.4s ease;
}

.jr-acct__hint {
  margin: 8px 0 12px;
  font-size: 11.5px;
  opacity: 0.7;
}

.jr-acct__item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 13px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
}
.jr-acct__item:hover { background: var(--jr-acct-bg-soft); }
.jr-acct__logout { margin-top: 4px; opacity: 0.78; }
.jr-acct__logout:hover { opacity: 1; }

/* 移动端：只留圆形头像，名字额度收起 */
@media (max-width: 720px) {
  .jr-acct { top: 10px; right: 10px; }
  .jr-acct__meta { display: none; }
  .jr-acct__trigger { padding: 5px; }
  .jr-acct__menu { width: min(240px, calc(100vw - 24px)); }
}
