/* OpsPing documentation assistant — shared by documentation and technical product pages. */
.docs-ai-trigger {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 170;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 15px;
  border: 1px solid rgba(139,133,255,.42);
  border-radius: 999px;
  background: rgba(26,26,46,.94);
  color: var(--text-primary);
  box-shadow: 0 12px 36px rgba(0,0,0,.38), 0 0 24px rgba(108,99,255,.16);
  backdrop-filter: blur(16px);
  font: 600 13px/1 var(--font);
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .15s;
}
.docs-ai-trigger:hover { border-color: var(--accent-hover); background: var(--surface-raised); transform: translateY(-1px); }
.docs-ai-trigger svg { width: 19px; height: 19px; fill: var(--accent-hover); }
.docs-ai-dialog {
  position: fixed;
  inset: auto 16px 16px auto;
  z-index: 170;
  width: min(410px, calc(100vw - 32px));
  max-width: none;
  height: auto;
  max-height: min(580px, calc(100dvh - 32px));
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  background: var(--bg);
  color: var(--text-primary);
  box-shadow: 0 24px 70px rgba(0,0,0,.52), 0 0 0 1px rgba(108,99,255,.08);
}
.docs-ai-dialog::backdrop { display: none; }
.docs-ai-shell { display: flex; flex-direction: column; max-height: inherit; }
.docs-ai-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(108,99,255,.12), transparent 70%);
}
.docs-ai-kicker { display: block; margin-bottom: 4px; color: var(--accent-hover); font-size: 10px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.docs-ai-header h2 { margin: 0; color: var(--text-primary); font: 700 20px/1.2 var(--font-display); letter-spacing: -.02em; }
.docs-ai-close {
  width: 40px; height: 40px; flex: 0 0 auto; border: 1px solid var(--border); border-radius: 50%;
  background: var(--surface); color: var(--text-secondary); font: 400 25px/1 var(--font); cursor: pointer;
}
.docs-ai-close:hover { color: var(--text-primary); border-color: var(--text-muted); }
.docs-ai-body { overflow-y: auto; padding: 16px 18px 18px; overscroll-behavior: contain; }
.docs-ai-intro { margin-bottom: 12px; color: var(--text-secondary); font-size: 12px; line-height: 1.5; }
.docs-ai-suggestions { display: flex; flex-wrap: nowrap; gap: 7px; margin: 0 -18px 14px 0; padding-right: 18px; overflow-x: auto; scrollbar-width: none; }
.docs-ai-suggestions::-webkit-scrollbar { display: none; }
.docs-ai-suggestions button {
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
  color: var(--text-secondary); font: 500 11px/1.35 var(--font); text-align: left; cursor: pointer;
}
.docs-ai-suggestions button:hover { border-color: rgba(139,133,255,.48); color: var(--text-primary); }
.docs-ai-form label { display: block; margin-bottom: 7px; color: var(--text-primary); font-size: 12px; font-weight: 650; }
.docs-ai-form textarea {
  width: 100%; min-height: 72px; max-height: 132px; resize: vertical; padding: 11px 12px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--surface); color: var(--text-primary); font: 400 14px/1.5 var(--font);
}
.docs-ai-form textarea::placeholder { color: var(--text-faint); }
.docs-ai-form textarea:focus { border-color: var(--accent); outline: 2px solid rgba(108,99,255,.22); outline-offset: 0; }
.docs-ai-form-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 9px; }
.docs-ai-count { color: var(--text-faint); font-size: 11px; }
.docs-ai-submit {
  min-height: 40px; padding: 9px 15px; border: 0; border-radius: 8px; background: var(--accent);
  color: var(--on-accent); font: 650 13px/1 var(--font); cursor: pointer;
}
.docs-ai-submit:hover { background: var(--accent-hover); }
.docs-ai-submit:disabled { opacity: .55; cursor: wait; }
.docs-ai-privacy { margin: 10px 0 0; color: var(--text-faint); font-size: 10px; line-height: 1.45; }
.docs-ai-status {
  display: none; align-items: center; gap: 8px; margin-top: 14px; padding: 9px 10px;
  border: 1px solid rgba(139,133,255,.22); border-radius: 9px; background: rgba(108,99,255,.06);
  color: var(--text-muted); font-size: 12px; line-height: 1.5;
}
.docs-ai-status.has-message { display: flex; }
.docs-ai-status::before {
  content: ""; width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 10px var(--accent);
}
.docs-ai-status.is-loading::before { animation: docs-ai-pulse 1.25s ease-in-out infinite; }
.docs-ai-dots { display: none; align-items: center; gap: 3px; margin-left: 1px; }
.docs-ai-status.is-loading .docs-ai-dots { display: inline-flex; }
.docs-ai-dots i {
  width: 4px; height: 4px; border-radius: 50%; background: var(--accent-hover);
  animation: docs-ai-dot 1.1s ease-in-out infinite;
}
.docs-ai-dots i:nth-child(2) { animation-delay: .14s; }
.docs-ai-dots i:nth-child(3) { animation-delay: .28s; }
.docs-ai-status.is-error { border-color: color-mix(in srgb, var(--error) 28%, transparent); background: color-mix(in srgb, var(--error) 7%, transparent); color: var(--error); }
.docs-ai-status.is-error::before { background: var(--error); box-shadow: none; }
@keyframes docs-ai-pulse {
  0%, 100% { opacity: .45; transform: scale(.72); box-shadow: 0 0 0 rgba(108,99,255,0); }
  50% { opacity: 1; transform: scale(1); box-shadow: 0 0 12px var(--accent); }
}
@keyframes docs-ai-dot {
  0%, 60%, 100% { opacity: .3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}
.docs-ai-result { margin-top: 4px; padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.docs-ai-answer-label,
.docs-ai-sources h3 {
  margin: 0 0 9px; color: var(--accent-hover); font-size: 10px; font-weight: 750;
  letter-spacing: .09em; text-transform: uppercase;
}
.docs-ai-answer-content { color: var(--text-primary); font-size: 14px; line-height: 1.62; overflow-wrap: anywhere; }
.docs-ai-answer-content p { margin: 0; }
.docs-ai-answer-content p + p { margin-top: 10px; }
.docs-ai-answer-content ol,
.docs-ai-answer-content ul { margin: 11px 0 0; padding-left: 22px; }
.docs-ai-answer-content > ol:first-child,
.docs-ai-answer-content > ul:first-child { margin-top: 0; }
.docs-ai-answer-content li { padding-left: 3px; }
.docs-ai-answer-content li + li { margin-top: 8px; }
.docs-ai-answer-content li::marker { color: var(--accent-hover); font-weight: 750; }
.docs-ai-sources { margin-top: 17px; padding-top: 14px; border-top: 1px solid var(--border); }
.docs-ai-sources h3 { color: var(--text-muted); }
.docs-ai-sources ul { margin: 0; padding: 0; list-style: none; }
.docs-ai-sources li + li { margin-top: 7px; }
.docs-ai-sources a { display: block; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: rgba(108,99,255,.045); color: var(--accent-hover); font-size: 12px; line-height: 1.45; text-decoration: none; }
.docs-ai-sources a:hover { border-color: rgba(139,133,255,.42); text-decoration: none; }
.docs-ai-feedback { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 16px; color: var(--text-muted); font-size: 11px; }
.docs-ai-feedback button { padding: 5px 9px; border: 1px solid var(--border); border-radius: 999px; background: transparent; color: var(--text-secondary); font: 600 10px/1 var(--font); cursor: pointer; }
.docs-ai-result[hidden], .docs-ai-sources[hidden], .docs-ai-feedback[hidden] { display: none; }
.docs-ai-feedback button:hover { border-color: var(--accent); color: var(--text-primary); }
.docs-ai-feedback button:disabled { opacity: .45; cursor: default; }
.docs-ai-feedback-status { flex-basis: 100%; color: var(--text-faint); }
.docs-ai-fallback { display: flex; gap: 16px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.docs-ai-fallback a { color: var(--text-secondary); font-size: 11px; text-decoration: none; }
.docs-ai-fallback a:hover { color: var(--accent-hover); }
[data-docs-assistant].is-open .docs-ai-trigger { visibility: hidden; }
[data-docs-assistant].has-result .docs-ai-intro,
[data-docs-assistant].has-result .docs-ai-suggestions,
[data-docs-assistant].has-result .docs-ai-privacy { display: none; }
[data-docs-assistant].has-result .docs-ai-form textarea { min-height: 52px; max-height: 72px; }
.cookie-banner ~ [data-docs-assistant] .docs-ai-trigger { bottom: 92px; }
.cookie-banner ~ [data-docs-assistant] .docs-ai-dialog { bottom: 92px; }
@media (max-width: 600px) {
  .docs-ai-trigger { right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); }
  .cookie-banner ~ [data-docs-assistant] .docs-ai-trigger { bottom: 164px; }
  .cookie-banner ~ [data-docs-assistant] .docs-ai-dialog { bottom: 164px; }
  .docs-ai-trigger span { font-size: 12px; }
  .docs-ai-dialog {
    inset: auto max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    width: auto;
    max-height: min(560px, calc(72dvh - env(safe-area-inset-bottom)));
    border-width: 1px;
    border-radius: 18px;
    padding-bottom: 0;
  }
  .docs-ai-header { padding: 14px 15px 12px; }
  .docs-ai-header h2 { font-size: 18px; }
  .docs-ai-close { width: 36px; height: 36px; }
  .docs-ai-body { padding: 14px 15px 16px; }
  .docs-ai-suggestions { margin-right: -15px; padding-right: 15px; }
  .docs-ai-suggestions button { flex: 0 0 auto; max-width: 230px; }
}
@media (prefers-color-scheme: light) {
  .docs-ai-trigger { background: rgba(255,255,255,.94); box-shadow: 0 10px 30px rgba(20,20,45,.18); }
  .docs-ai-dialog { border-color: rgba(20,20,45,.12); box-shadow: 0 24px 70px rgba(20,20,45,.2); }
  .docs-ai-dialog::backdrop { background: rgba(30,30,50,.28); }
}
@media (prefers-reduced-motion: reduce) {
  .docs-ai-trigger { transition: none; }
  .docs-ai-status.is-loading::before,
  .docs-ai-dots i { animation: none; }
}
