/* auto-scan.css — 智能自动拍摄面板（由 star 侧的 auto-scan.js 注入使用）
   CSP 是 style-src 'self'，所以样式必须走外部文件，不能用内联 style 属性。 */

.as-panel {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  width: 292px;
  font: 13px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #12202b;
  background: #ffffff;
  border: 1px solid #d8e2ea;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(12, 32, 48, 0.18);
  overflow: hidden;
}
.as-panel.as-collapsed .as-body { display: none; }

.as-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #f4f8fb;
  border-bottom: 1px solid #e3ecf3;
}
.as-head strong { font-size: 13px; font-weight: 600; }
.as-head .as-toggle {
  margin-left: auto;
  width: 24px;
  height: 24px;
  border: 1px solid #cfdce6;
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  line-height: 1;
}
.as-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: #b6c5d1; flex: 0 0 auto;
}
.as-dot.as-on { background: #1f9d63; box-shadow: 0 0 0 4px rgba(31, 157, 99, 0.16); }
.as-dot.as-hold { background: #e08a1e; box-shadow: 0 0 0 4px rgba(224, 138, 30, 0.18); }

.as-body { padding: 10px 12px 12px; }
.as-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 4px 0;
}
.as-row span { color: #4b5b68; }
.as-row select, .as-row input[type="checkbox"] { flex: 0 0 auto; }
.as-row select {
  border: 1px solid #cfdce6; border-radius: 8px; padding: 3px 6px; background: #fff; color: #12202b;
}

.as-status {
  margin: 8px 0 6px;
  padding: 7px 9px;
  border-radius: 9px;
  background: #f4f8fb;
  color: #3c4d5a;
  font-size: 12px;
  min-height: 32px;
}
.as-bar { height: 5px; border-radius: 4px; background: #e8eff5; overflow: hidden; }
.as-bar i { display: block; height: 100%; width: 0; background: #2f7fd1; transition: width .18s linear; }

.as-metrics {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin: 7px 0 0; font-size: 11px; color: #6b7c8a;
}
.as-metrics span { background: #f4f8fb; border-radius: 6px; padding: 2px 6px; }

.as-result {
  margin: 9px 0 0; padding: 9px 10px;
  border-radius: 10px; background: #eef7f1; border: 1px solid #cfe8da;
  font-size: 12px; color: #17563c;
}
.as-result b { font-size: 14px; }
.as-result .as-warn { color: #a35b00; }

.as-toast {
  position: fixed;
  left: 14px;
  bottom: 14px;
  z-index: 61;
  max-width: 320px;
  padding: 9px 12px;
  border-radius: 10px;
  background: #eef7f1;
  border: 1px solid #cfe8da;
  color: #17563c;
  font: 12px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  box-shadow: 0 12px 28px rgba(12, 32, 48, 0.16);
}

.as-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.as-actions button {
  flex: 1 1 auto;
  border: 1px solid #cfdce6; background: #fff; color: #12202b;
  border-radius: 9px; padding: 6px 8px; cursor: pointer; font-size: 12px;
}
.as-actions button:disabled { opacity: .5; cursor: default; }
.as-actions button#as-shoot { border-color: #2f7fd1; color: #1c5c9c; }
.as-actions button#as-measure { border-color: #1f9d63; color: #14653f; }
.as-actions button#as-notes { border-color: #b9a06a; color: #7a5c14; }

@media (max-width: 720px) {
  .as-panel { right: 10px; left: 10px; bottom: 10px; width: auto; }
}
