/* pm-addon 统一反馈层样式（P1-3）——纯新增；不使用强制优先级声明，
 * 也不以隐藏声明遮蔽任何既有入口。
 * 所有容器由 pm_feedback.js / pm_confirm.js 动态创建并挂到 body，删除挂载点即整体消失。
 */

.pm-fb-host {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--pm-z-toast);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  max-width: 92vw;
}

.pm-toast {
  pointer-events: auto;
  min-width: 160px;
  max-width: 420px;
  padding: 10px 16px;
  border-radius: var(--pm-radius);
  background: var(--pm-surface);
  border: 1px solid var(--pm-line);
  border-left: 4px solid var(--pm-info);
  box-shadow: var(--pm-shadow);
  color: var(--pm-text);
  font-size: 13.5px;
  line-height: 1.6;
  word-break: break-word;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .22s ease, transform .22s ease;
}

.pm-toast.is-on { opacity: 1; transform: translateY(0); }
.pm-toast.pm-toast--ok { border-left-color: var(--pm-ok); }
.pm-toast.pm-toast--success { border-left-color: var(--pm-ok); }
.pm-toast.pm-toast--warn { border-left-color: var(--pm-warn); }
.pm-toast.pm-toast--error { border-left-color: var(--pm-err); }
.pm-toast.pm-toast--info { border-left-color: var(--pm-info); }

.pm-loading-mask {
  position: fixed;
  inset: 0;
  z-index: var(--pm-z-toast);
  background: rgba(20, 26, 34, .18);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .18s ease, visibility .18s ease;
}

.pm-loading-mask.is-on {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.pm-loading-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: var(--pm-radius);
  background: var(--pm-surface);
  box-shadow: var(--pm-shadow);
  font-size: 13.5px;
  color: var(--pm-text);
}

.pm-spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid var(--pm-line);
  border-top-color: var(--pm-brand);
  border-radius: 50%;
  animation: pm-spin .7s linear infinite;
}

@keyframes pm-spin { to { transform: rotate(360deg); } }

.pm-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--pm-text-sub);
  font-size: 13px;
  line-height: 1.8;
}

.pm-empty .pm-empty-icon { font-size: 26px; display: block; margin-bottom: 6px; opacity: .55; }
.pm-empty .pm-empty-hint { font-size: 12px; color: var(--pm-text-faint); }

/* 危险操作二次确认条（pm_confirm.js 使用） */
.pm-confirm-bar {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(14px);
  z-index: var(--pm-z-toast);
  width: min(460px, 92vw);
  background: var(--pm-surface);
  border: 1px solid var(--pm-line);
  border-top: 3px solid var(--pm-err);
  border-radius: var(--pm-radius);
  box-shadow: var(--pm-shadow);
  padding: 14px 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}

.pm-confirm-bar.is-on {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.pm-confirm-title { font-size: 14px; font-weight: 600; color: var(--pm-text); margin-bottom: 4px; }
.pm-confirm-desc { font-size: 12.5px; color: var(--pm-text-sub); line-height: 1.7; margin-bottom: 12px; word-break: break-word; }
.pm-confirm-actions { display: flex; gap: 8px; justify-content: flex-end; }

.pm-btn {
  appearance: none;
  border: 1px solid var(--pm-line);
  background: var(--pm-surface);
  color: var(--pm-text);
  font-size: 13px;
  padding: 7px 16px;
  border-radius: var(--pm-radius-sm);
  cursor: pointer;
  font-family: inherit;
}

.pm-btn:hover { border-color: var(--pm-brand); }
.pm-btn:focus-visible { outline: 2px solid var(--pm-brand); outline-offset: 2px; }
.pm-btn.pm-btn-primary { background: var(--pm-err); border-color: var(--pm-err); color: #fff; }
.pm-btn.pm-btn-brand { background: var(--pm-brand); border-color: var(--pm-brand); color: #fff; }

/* 自检 / 生效层级 / 搜索 卡片共用面板 */
.pm-panel {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: var(--pm-z-panel);
  width: min(360px, 92vw);
  background: var(--pm-surface);
  border: 1px solid var(--pm-line);
  border-radius: var(--pm-radius-lg);
  box-shadow: var(--pm-shadow);
  overflow: hidden;
}

.pm-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--pm-line);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--pm-text);
}

.pm-panel-close {
  border: 0;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  color: var(--pm-text-sub);
  cursor: pointer;
  padding: 2px 6px;
}

.pm-panel-body { padding: 12px 14px; max-height: 60vh; overflow: auto; }
.pm-panel-row { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; font-size: 12.5px; border-bottom: 1px dashed var(--pm-line); }
.pm-panel-row:last-child { border-bottom: 0; }
.pm-panel-row .pm-k { color: var(--pm-text-sub); flex: 0 0 auto; }
.pm-panel-row .pm-v { color: var(--pm-text); text-align: right; word-break: break-all; }
.pm-panel-note { font-size: 11.5px; color: var(--pm-text-faint); line-height: 1.7; margin-top: 8px; }

.pm-launcher {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: var(--pm-z-panel);
  border: 1px solid var(--pm-line);
  background: var(--pm-surface);
  color: var(--pm-text-sub);
  font-size: 12px;
  padding: 7px 12px;
  border-radius: var(--pm-radius-pill);
  box-shadow: var(--pm-shadow-sm);
  cursor: pointer;
  font-family: inherit;
}

.pm-launcher:hover { color: var(--pm-brand); border-color: var(--pm-brand); }
.pm-launcher:focus-visible { outline: 2px solid var(--pm-brand); outline-offset: 2px; }

.pm-input {
  width: 100%;
  box-sizing: border-box;
  border: 1.5px solid var(--pm-line);
  border-radius: var(--pm-radius-sm);
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
  color: var(--pm-text);
  background: var(--pm-surface);
}

.pm-input:focus-visible { outline: 2px solid var(--pm-brand); outline-offset: 1px; border-color: var(--pm-brand); }
