/* ==========================================
   顺佳物流 — 主题切换器 浮动面板样式
   ========================================== */

#theme-switcher-panel {
  position: fixed;
  right: 0;
  bottom: 120px;
  z-index: 9999;
  font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* 触发按钮 */
.ts-toggle {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 54px;
  height: 54px;
  background: linear-gradient(135deg, #0C1844, #2563EB);
  color: white;
  border-radius: 12px 0 0 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.4rem;
  box-shadow: -4px 4px 16px rgba(0,0,0,0.25);
  transition: all 0.2s ease;
  user-select: none;
}
.ts-toggle:hover {
  width: 60px;
  background: linear-gradient(135deg, #1a2e6e, #3572f5);
}
.ts-badge {
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.85);
  margin-top: 2px;
}

/* 抽屉面板 */
.ts-drawer {
  position: absolute;
  right: 60px;
  bottom: 0;
  width: 320px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18), 0 4px 16px rgba(0,0,0,0.1);
  overflow: hidden;
  transform: translateX(20px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ts-drawer--open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: all;
}

/* 面板标题 */
.ts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #0C1844, #1e3a6e);
  color: white;
  padding: 14px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.ts-close {
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.ts-close:hover { background: rgba(255,255,255,0.3); }

/* 主题格网 */
.ts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 14px;
  max-height: 360px;
  overflow-y: auto;
}
.ts-grid::-webkit-scrollbar { width: 4px; }
.ts-grid::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 2px; }

/* 主题按钮 */
.ts-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  gap: 2px;
}
.ts-btn:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37,99,235,0.12);
}
.ts-btn--active {
  background: #dbeafe;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59,130,246,0.3);
}
.ts-btn--active::after {
  content: '✓ 当前';
  display: block;
  font-size: 0.6rem;
  color: #2563EB;
  font-weight: 700;
  margin-top: 2px;
}
.ts-emoji {
  font-size: 1.3rem;
  line-height: 1;
  margin-bottom: 3px;
}
.ts-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: #1e293b;
}
.ts-desc {
  font-size: 0.67rem;
  color: #64748b;
  line-height: 1.3;
}

/* 底部说明 */
.ts-footer-note {
  background: #f1f5f9;
  border-top: 1px solid #e2e8f0;
  padding: 8px 14px;
  font-size: 0.7rem;
  color: #64748b;
  text-align: center;
}

/* 响应式：小屏幕缩短宽度 */
@media (max-width: 400px) {
  .ts-drawer { width: 280px; right: 58px; }
}
