#yanse-wecom-sidebar-root {
  position: relative;
  z-index: 2140;
}

body.yanse-wecom-sidebar-enabled {
  padding-bottom: 92px;
}

body.yanse-wecom-sidebar-enabled .ym-wrap {
  padding-bottom: 110px;
}

.yw-sidebar-shell {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.yw-sidebar-dock,
.yw-sidebar-panel {
  pointer-events: auto;
}

.yw-sidebar-dock-wrap {
  width: min(100%, 760px);
  margin: 0 auto max(env(safe-area-inset-bottom), 0);
}

.yw-sidebar-dock {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 12px 12px;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid rgba(148, 163, 184, 0.35);
  backdrop-filter: blur(16px);
  box-shadow: 0 -10px 28px rgba(15, 23, 42, 0.08);
}

.yw-sidebar-tab {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 6px;
  min-height: 58px;
  border: 1px solid #d9e0ea;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  padding: 10px 8px;
  font: inherit;
}

.yw-sidebar-tab.is-active {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}

.yw-sidebar-tab-icon,
.yw-sidebar-panel-icon,
.yw-sidebar-item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.yw-sidebar-tab-icon svg,
.yw-sidebar-panel-icon svg,
.yw-sidebar-item-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.yw-sidebar-tab-label {
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0;
}

.yw-sidebar-tab-badge,
.yw-sidebar-item-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
}

.yw-sidebar-tab-badge {
  position: absolute;
  top: 6px;
  right: 6px;
}

.yw-sidebar-panel {
  margin: 0 auto 8px;
  width: min(calc(100% - 16px), 760px);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
  overflow: hidden;
}

.yw-sidebar-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--section-soft);
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.yw-sidebar-panel-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--section-color);
}

.yw-sidebar-panel-title {
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
}

.yw-sidebar-panel-subtitle {
  font-size: 12px;
  color: #64748b;
}

.yw-sidebar-close {
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 8px;
  background: #fff;
  color: #334155;
  min-height: 34px;
  padding: 0 12px;
  font: inherit;
}

.yw-sidebar-items {
  display: grid;
  gap: 10px;
  padding: 12px;
  max-height: min(56vh, 460px);
  overflow: auto;
}

.yw-sidebar-item {
  border: 1px solid #d9e0ea;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.yw-sidebar-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.yw-sidebar-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #0f172a;
}

.yw-sidebar-item-label {
  font-size: 14px;
  font-weight: 600;
}

.yw-sidebar-item-actions {
  display: flex;
  gap: 8px;
}

.yw-sidebar-action {
  flex: 1;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
}

.yw-sidebar-action-primary {
  background: #1d4ed8;
  color: #fff;
}

.yw-sidebar-action-secondary {
  background: #f8fafc;
  color: #0f172a;
  border: 1px solid #d9e0ea;
}

@media (min-width: 1025px) {
  #yanse-wecom-sidebar-root {
    display: none;
  }

  body.yanse-wecom-sidebar-enabled {
    padding-bottom: 0;
  }
}
