/* assets/bug-report.css — плавающая кнопка репорта (на КАЖДОЙ странице, создаётся из bug-report.js) +
   модалка + свой тост. Самодостаточно (грузится из siteNavHtml). Тёмная палитра под сайт.
   Кнопка — СПРАВА ВВЕРХУ (под хедером), узнаваемый значок Ionicons bug-outline + подпись «Report a bug». */

.hov-bug-btn {
  position: fixed;
  top: 72px;                 /* ниже шапки, справа вверху (как в menya) */
  right: 14px;
  z-index: 2147483000;       /* поверх любого контента/модалок сайта */
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px 0 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: #17171f;
  color: #f0f0f6;            /* задаёт currentColor для SVG */
  font: 600 13px/1 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.hov-bug-btn:hover { transform: translateY(-1px); background: #22222e; box-shadow: 0 10px 26px rgba(0, 0, 0, 0.55); }
.hov-bug-btn:focus-visible { outline: 2px solid #7c9cff; outline-offset: 2px; }
.hov-bug-btn.busy { opacity: 0.6; cursor: progress; }
.hov-bug-btn svg { width: 20px; height: 20px; display: block; flex: none; }
.hov-bug-btn-label { white-space: nowrap; }

/* Узкие экраны — компактный кружок (только значок). Двухстрочная мобильная шапка выше (~159px) —
   опускаем кнопку ПОД неё, чтобы не наезжала (справа вверху над контентом). */
@media (max-width: 640px) {
  .hov-bug-btn { top: 168px; right: 12px; padding: 0; width: 42px; height: 42px; justify-content: center; border-radius: 50%; }
  .hov-bug-btn-label { display: none; }
}
@media print { .hov-bug-btn { display: none; } }

/* Модалка */
.hov-bug-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483001;
  background: rgba(6, 6, 12, 0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.hov-bug-card {
  width: 100%;
  max-width: 420px;
  max-height: 92vh;
  overflow-y: auto;
  background: #14141c;
  color: #ececf2;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 18px 18px 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6);
}
.hov-bug-card h2 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
}
.hov-bug-preview {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: #0d0d14;
  overflow: hidden;
  margin-bottom: 14px;
  max-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hov-bug-preview img { display: block; width: 100%; height: auto; max-height: 220px; object-fit: contain; }
.hov-bug-noshot { padding: 22px 14px; font-size: 13px; color: #9aa0b0; text-align: center; }

/* Пометка области на застывшем снимке (блок 32, атом 32.5): canvas лежит ПОВЕРХ <img> — сам <img>
   остаётся картинкой (на неё смотрит приёмка), а рисование идёт на прозрачном слое. */
.hov-bug-shotwrap { position: relative; display: block; width: 100%; line-height: 0; }
.hov-bug-annot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none; /* палец выделяет область, а не скроллит страницу */
}
.hov-bug-hint { margin: -8px 0 12px; font-size: 12px; color: #7a7f8c; display: flex; align-items: center; gap: 8px; }
.hov-bug-annot-clear {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  color: #b9bdca;
  font: inherit;
  font-size: 12px;
  padding: 2px 8px;
  cursor: pointer;
}
.hov-bug-annot-clear:hover { color: #ececf2; border-color: rgba(255, 255, 255, 0.32); }

.hov-bug-types { display: flex; gap: 10px; margin-bottom: 14px; }
.hov-bug-type {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  user-select: none;
}
.hov-bug-type:has(input:checked) { border-color: #7c9cff; background: rgba(124, 156, 255, 0.12); }
.hov-bug-type input { accent-color: #7c9cff; }

.hov-bug-lbl { display: block; font-size: 13px; color: #b9bdca; margin-bottom: 6px; }
.hov-bug-opt { color: #7a7f8c; }
#hov-bug-msg {
  width: 100%;
  box-sizing: border-box;
  background: #0d0d14;
  color: #ececf2;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 10px;
  font: inherit;
  resize: vertical;
  min-height: 84px;
  margin-bottom: 14px;
}
#hov-bug-msg:focus-visible { outline: 2px solid #7c9cff; outline-offset: 1px; }

/* Email для ответа (блок 32, атомы 32.6/32.7): анониму — поле, залогиненному — строка «ответим на …». */
.hov-bug-reply { margin-bottom: 14px; }
.hov-bug-reply[hidden] { display: none; }
#hov-bug-email {
  width: 100%;
  box-sizing: border-box;
  background: #0d0d14;
  color: #ececf2;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 10px;
  font: inherit;
}
#hov-bug-email:focus-visible { outline: 2px solid #7c9cff; outline-offset: 1px; }
#hov-bug-email[aria-invalid="true"] { border-color: #ff4d61; }
.hov-bug-acct { margin: -4px 0 14px; font-size: 13px; color: #b9bdca; }
.hov-bug-acct[hidden], .hov-bug-err[hidden] { display: none; }
.hov-bug-err { margin: -4px 0 12px; font-size: 13px; color: #ff8a95; }

/* Honeypot — вне экрана (не display:none: часть ботов пропускает скрытые) */
.hov-bug-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.hov-bug-actions { display: flex; gap: 10px; justify-content: flex-end; }
.hov-bug-actions button {
  padding: 9px 16px;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
}
.hov-bug-cancel { background: transparent; color: #b9bdca; border-color: rgba(255, 255, 255, 0.16); }
.hov-bug-cancel:hover { background: rgba(255, 255, 255, 0.06); }
.hov-bug-send { background: #7c9cff; color: #0b0b12; }
.hov-bug-send:hover { background: #93adff; }
.hov-bug-send:disabled { opacity: 0.6; cursor: progress; }

/* Тост */
.hov-bug-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(12px);
  z-index: 2147483002;
  max-width: 90vw;
  padding: 11px 16px;
  border-radius: 10px;
  background: #1c3b25;
  color: #d6ffe2;
  border: 1px solid #2f6b40;
  font-size: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.hov-bug-toast.err { background: #3b1c1c; color: #ffd9d9; border-color: #6b2f2f; }
.hov-bug-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .hov-bug-btn, .hov-bug-toast { transition: none; }
}
