/* ========================================
   个人资料相关样式（合并文件）
   合并来源：auth_bot.css + focus_profile.css
   ======================================== */

.ios-switch { position: relative; width: 46px; height: 28px; display: inline-block; }
.ios-switch input { display: none; }
.ios-switch .slider { position: absolute; inset: 0; background: rgba(17,24,39,0.12); border: 1px solid var(--border); border-radius: 999px; box-shadow: inset 0 1px rgba(255,255,255,0.6); transition: all 160ms ease; }
.ios-switch .slider::before { content: ""; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px; background: #fff; border-radius: 50%; box-shadow: 0 2px 8px rgba(17,24,39,0.12), inset 0 1px rgba(255,255,255,0.7); transition: all 160ms ease; }
.ios-switch input:checked + .slider { background: linear-gradient(135deg, var(--accent-1), var(--accent-2)); border-color: transparent; }
.ios-switch input:checked + .slider::before { transform: translateX(18px); }

.kw-list { display: flex; flex-wrap: wrap; gap: 6px; }
.kw-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--border); background: rgba(255,255,255,0.85); font-size: 12px; cursor: pointer; }
.kw-chip .remove { cursor: pointer; color: var(--muted); }
.kw-chip .remove:hover { color: var(--text); }

#bot-modal .analysis-block:not(:last-child) { margin-bottom: 12px; }
.inline-controls .small { font-size: 12px; color: var(--muted); }

/* bot-modal 中的重点关注列表样式：垂直显示，支持滚动 */
#bot-modal #bot-focus-watchlist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  grid-auto-flow: row;
  gap: 6px;
  overflow-x: hidden;
  overflow-y: auto;
  max-height: 200px;
  padding: 8px 10px;
}

#bot-modal #bot-focus-watchlist .tge-item {
  width: 100%;
  min-width: auto;
}

#bot-modal #bot-focus-watchlist .tge-add-btn {
  width: 26px !important;
  height: 26px !important;
  min-width: 26px !important;
  max-width: 26px !important;
  grid-column: span 1;
  justify-self: start;
  align-self: center;
  box-sizing: border-box;
}

/* 当添加按钮存在时，调整网格布局以支持更小的第一列 */
#bot-modal #bot-focus-watchlist:has(.tge-add-btn) {
  grid-template-columns: 26px repeat(auto-fill, minmax(70px, 1fr));
}

/* bot-modal 中的加载占位符动画 - 使用与首页相同的 busy 状态样式 */
#bot-modal #bot-focus-watchlist .tge-item[data-placeholder="true"] .tge-icon {
  position: relative;
}

#bot-modal #bot-focus-watchlist .tge-item[data-placeholder="true"] .tge-icon::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.2);
  border-top-color: var(--accent-3);
  animation: spin 0.8s linear infinite;
  background: transparent;
  box-shadow: 0 1px 2px rgba(0,0,0,0.12);
  z-index: 2;
}

@keyframes spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}

.opinions-section { gap: 6px; margin-top: 10px; }

.tge-grid { display: grid; grid-auto-flow: column; grid-auto-columns: min-content; gap: 6px; padding: 8px 10px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-padding-left: 10px; scroll-padding-right: 10px; -webkit-overflow-scrolling: touch; align-items: center; }
.tge-grid > .tge-add-btn { width: 26px; min-width: 26px; max-width: 26px; justify-self: start; }
.tge-grid:has(.tge-add-btn:first-child) { grid-template-columns: 26px; grid-auto-columns: min-content; }
.tge-grid > .tge-add-btn:first-child { grid-column: 1; }
.tge-grid > .tge-item:first-child { margin-left: 0; }
.tge-item { display: grid; gap: 6px; justify-items: center; padding: 6px 8px; border-radius: 12px; border: 1px solid var(--border); background: rgba(255,255,255,0.65); backdrop-filter: blur(14px) saturate(150%); -webkit-backdrop-filter: blur(14px) saturate(150%); scroll-snap-align: start; overflow: hidden; min-width: 60px; width: fit-content; }
.tge-item > * { min-width: 0; }
.tge-add-btn { display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; min-width: 26px; border-radius: 7px; border: 1px solid var(--border); background: rgba(255,255,255,0.65); backdrop-filter: blur(14px) saturate(150%); -webkit-backdrop-filter: blur(14px) saturate(150%); cursor: pointer; transition: all 160ms ease; flex-shrink: 0; scroll-snap-align: start; position: relative; grid-column: span 1; justify-self: start; }
.tge-add-btn:hover { background: rgba(255,255,255,0.75); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(17,24,39,0.08); }
.tge-add-btn::before, .tge-add-btn::after { content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: linear-gradient(135deg, var(--accent-1), var(--accent-2)); border-radius: 2px; }
.tge-add-btn::before { width: 12px; height: 1.5px; }
.tge-add-btn::after { width: 1.5px; height: 12px; }
.tge-icon { width: 32px; height: 32px; border-radius: 10px; background: linear-gradient(135deg, var(--accent-3), var(--accent-1)); box-shadow: 0 4px 12px rgba(52,211,153,0.3); position: relative; }
.tge-icon.plus { background: rgba(255,255,255,0.65); box-shadow: 0 6px 12px rgba(17,24,39,0.08); }
.tge-icon.plus::before, .tge-icon.plus::after { content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: linear-gradient(135deg, var(--accent-1), var(--accent-2)); border-radius: 2px; }
.tge-icon.plus::before { width: 18px; height: 2px; }
.tge-icon.plus::after { width: 2px; height: 18px; }
.tge-name { font-size: 11px; color: var(--text); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
@media (orientation: landscape) { .tge-grid { gap: 6px; grid-auto-columns: min-content; } .tge-item { padding: 6px 10px; min-width: 65px; } .tge-icon { width: 32px; height: 32px; } .tge-name { font-size: 11px; } }
/* 手机端优化：提高重点关注板块展示密度 */
@media (max-width: 767px) {
  .tge-grid {
    gap: 5px;
    grid-auto-columns: 70px;
    padding: 6px 8px;
    align-items: center;
  }
  .tge-item {
    padding: 5px 7px;
    min-width: 58px;
    gap: 4px;
    border-radius: 10px;
  }
  .tge-icon {
    width: 28px;
    height: 28px;
    border-radius: 9px;
  }
  .tge-name {
    font-size: 10px;
    line-height: 1.1;
  }
  .tge-add-btn {
    width: 26px;
    height: 26px;
    min-width: 26px;
    border-radius: 7px;
  }
  .tge-add-btn::before {
    width: 12px;
    height: 1.5px;
  }
  .tge-add-btn::after {
    width: 1.5px;
    height: 12px;
  }
}

#profile-follow-star { width: auto; height: auto; padding: 0; background: transparent; border: none; box-shadow: none; }
#profile-follow-star span { font-size: 18px; line-height: 1; color: var(--muted); }
#profile-follow-star[data-focused="true"] span { color: var(--accent-2); }
#profile-follow-star.loading span { animation: starPulse 800ms ease-in-out infinite; transform-origin: center; }
@keyframes starPulse { 0% { transform: scale(1); } 50% { transform: scale(1.1); color: var(--accent-2); } 100% { transform: scale(1); } }
#profile-follow-star[disabled] { cursor: default; opacity: 0.95; }

#profile-modal .segmented .tab { align-items: center; padding: 0 10px; }
#profile-modal .segmented .tab span { line-height: 1; }
#profile-modal .segmented .tab .tab-count { margin-left: 3px; }

