/* about-dialogs.css — 从 styles.css 原行号 L6985-L7376 原样切出,顺序即级联顺序 */
/* ============== IDEA 风格关于对话框 ============== */
.about-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  justify-content: center;
  align-items: center;
}

.about-overlay.active {
  display: flex;
}

.about-dialog {
  width: 480px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  color: var(--text-primary);
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  overflow: hidden;
}

.about-header {
  display: flex;
  align-items: flex-start;
  padding: 24px 24px 12px 24px;
  position: relative;
}

.about-logo {
  flex-shrink: 0;
  margin-right: 16px;
  width: 76px;
  height: 76px;
}

.about-logo img {
  display: block;
  width: 76px;
  height: 76px;
  object-fit: contain;
  user-select: none;
}

.about-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 20px;
  color: var(--text-secondary);
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.15s;
}

.about-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.about-body {
  padding: 0 24px 16px 24px;
}

.about-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.about-build {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.about-sep {
  height: 1px;
  background: var(--panel-border);
  margin: 10px 0;
}

.about-info {
  font-size: 12px;
  color: var(--text-primary);
  line-height: 1.6;
}

.about-license {
  font-size: 12px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.about-powered {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 6px;
}

.about-link {
  color: var(--accent-blue);
  text-decoration: none;
}

.about-link:hover {
  text-decoration: underline;
}

.about-copyright {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
}

.about-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 24px 16px 24px;
}

.about-btn {
  padding: 6px 16px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: background 0.15s;
}

.about-btn-primary {
  background: var(--accent-blue);
  color: #fff;
}

.about-btn-primary:hover {
  filter: brightness(1.08);
}

.about-btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--panel-border);
}

.about-btn-secondary:hover {
  background: var(--bg-hover);
}

/* ============== Contact author dialog ============== */
.contact-dialog {
  width: 400px;
}

.contact-dialog-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 28px;
}

.contact-body {
  padding: 4px 24px 12px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* 企业微信"加我"海报为竖版整图(933×1410 ≈ 0.66:1),
   按原始比例放大展示,小屏下用 56vh 封顶防止超出视口 */
.contact-qrcode-frame {
  position: relative;
  width: 300px;
  max-width: 70vw;
  aspect-ratio: 933 / 1410;
  max-height: 56vh;
  margin: 4px 0 12px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: var(--panel-bg);
  overflow: hidden;
}

.contact-qrcode {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
}

.contact-qrcode.ready {
  display: block;
}

.contact-qrcode-loading {
  font-size: 12px;
  color: var(--text-secondary);
}

.contact-qrcode-loading.hidden {
  display: none;
}

.contact-tip {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 8px;
}

.contact-meta {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.contact-meta a {
  color: var(--accent-blue);
  text-decoration: none;
}

.contact-meta a:hover {
  text-decoration: underline;
}

/* ============== Documentation dialog ============== */
.documentation-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  align-items: center;
  justify-content: center;
  background: transparent;
  pointer-events: auto;
}

.documentation-overlay.active {
  display: flex;
}

.documentation-dialog {
  display: flex;
  width: 640px;
  max-width: 88vw;
  height: 500px;
  max-height: 82vh;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  background-color: var(--panel-bg);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6);
  color: var(--text-primary);
}

.documentation-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--panel-border);
  background-color: var(--panel-header-bg);
}

.documentation-title {
  font-size: 16px;
  font-weight: 600;
}

.documentation-subtitle {
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 11px;
}

.documentation-close {
  display: flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

.documentation-close:hover {
  background-color: var(--bg-hover);
  color: var(--text-primary);
}

.documentation-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px;
}

.documentation-section {
  margin-bottom: 20px;
}

.documentation-section:last-child {
  margin-bottom: 0;
}

.documentation-section h3 {
  margin: 0 0 7px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
}

.documentation-section p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.65;
}

.documentation-section .doc-cn {
  margin-bottom: 4px;
}

.documentation-section .doc-en {
  font-size: 11px;
  line-height: 1.5;
  opacity: 0.58;
}

.documentation-section strong {
  color: var(--text-primary);
  font-weight: 500;
}

.documentation-footer {
  display: flex;
  justify-content: flex-end;
  padding: 12px 18px;
  border-top: 1px solid var(--panel-border);
  background-color: var(--panel-header-bg);
}

/* Toast 提示弹框 */
.cide-toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 13px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--panel-border);
  opacity: 0;
  transition: opacity 0.25s,
    transform 0.25s;
  pointer-events: none;
  z-index: 11000;
  white-space: nowrap;
}

.cide-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}