/* shared/mod-report.css — sitewide "report a problem" floating button + modal.
   Loaded on every page via _redesign_lib.py head() (see TODO/tech/TODO_moderation_admin.md).
   Uses only the CSS variables already defined by assets/site.css — no new design tokens. */

.mr-btn {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 70; /* above mega-menu (60), below nothing else currently defined */
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid var(--line2);
  background: var(--panel);
  color: var(--text);
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  animation: mr-float 3.2s ease-in-out infinite;
}
.mr-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.mr-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.mr-btn[hidden] {
  display: none;
}

@keyframes mr-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@media (prefers-reduced-motion: reduce) {
  .mr-btn { animation: none; }
}

/* Native <dialog> — gives us top-layer, ::backdrop and default focus handling for free. */
.mr-dialog {
  z-index: 71;
  width: min(420px, calc(100vw - 32px));
  max-height: min(640px, calc(100vh - 64px));
  overflow: auto;
  border: 1px solid var(--line2);
  border-radius: 16px;
  padding: 20px 22px 18px;
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}
.mr-dialog::backdrop {
  background: rgba(5, 7, 13, 0.6);
  backdrop-filter: blur(2px);
}
[data-theme="light"] .mr-dialog::backdrop {
  background: rgba(15, 23, 42, 0.35);
}

.mr-dialog h2 {
  margin: 0 0 14px;
  padding-right: 28px;
  font-size: 18px;
}

.mr-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid var(--line2);
  background: var(--line);
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
}
.mr-close:hover { border-color: var(--accent); color: var(--accent); }

.mr-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--soft);
}
.mr-field span {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
}
.mr-field small {
  font-weight: 400;
  color: var(--muted);
}
.mr-field input,
.mr-field select,
.mr-field textarea,
.mr-steps textarea {
  font: inherit;
  font-size: 13.5px;
  color: var(--text);
  background: var(--line);
  border: 1px solid var(--line2);
  border-radius: 10px;
  padding: 9px 11px;
  resize: vertical;
}
.mr-field input:focus-visible,
.mr-field select:focus-visible,
.mr-field textarea:focus-visible,
.mr-steps textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.mr-steps {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--soft);
}
.mr-steps summary {
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 8px;
}
.mr-steps textarea {
  width: 100%;
  box-sizing: border-box;
  margin-top: 8px;
}

/* Honeypot — invisible to sighted and keyboard users, still present for bots. */
.mr-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.mr-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}
.mr-submit {
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #05070d;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
}
.mr-submit:disabled {
  opacity: 0.6;
  cursor: default;
}

.mr-status {
  margin: 10px 0 0;
  font-size: 13px;
  min-height: 1em;
}
.mr-status[data-kind="ok"] { color: var(--green); }
.mr-status[data-kind="err"] { color: #ef5350; }
