/* ── Report-a-game slide-in panel ─────────────────────────
   Shared by the main app (gameplay) and the library app (detail + tiles).
   Mirrors the feedback panel's slide-in language. Theme tokens come from
   each app's stylesheet; fallbacks keep it legible if a token is missing. */

.report-panel {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
}

.report-panel.hidden { display: none !important; }

.report-panel-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  pointer-events: auto;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.report-panel.open { pointer-events: auto; }
.report-panel.open .report-panel-backdrop { opacity: 1; }

.report-panel-content {
  position: relative;
  pointer-events: auto;
  background: var(--surface, #15151f);
  color: var(--text, #e8e8f0);
  border-left: 1px solid var(--border, #2c2c3a);
  width: 100vw;
  max-width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 28px rgba(0, 0, 0, 0.55);
  transform: translateX(100%);
  transition: transform 0.25s ease;
}

.report-panel.open .report-panel-content { transform: translateX(0); }

@media (min-width: 720px) {
  .report-panel-content { width: 440px; max-width: 440px; }
}

/* ── Header ─────────────────────────────────────────────── */

.report-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border, #2c2c3a);
  flex: 0 0 auto;
}

.report-panel-title {
  margin: 0;
  font-family: var(--font-pixel, 'Press Start 2P', monospace);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 13px;
  color: var(--accent, #ff5d8f);
}

.report-panel-close {
  background: none;
  border: none;
  color: var(--text, #e8e8f0);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
  padding: 0 4px;
}
.report-panel-close:hover { opacity: 1; }

/* ── Form ───────────────────────────────────────────────── */

.report-form,
.report-success {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Reported-game context card */
.report-context {
  background: color-mix(in srgb, var(--accent, #ff5d8f) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent, #ff5d8f) 35%, transparent);
  border-radius: 8px;
  padding: 10px 12px;
}
.report-context-label {
  display: block;
  font-family: var(--font-pixel, monospace);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 4px;
}
.report-game-name { font-weight: 700; font-size: 15px; }
.report-game-rom {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 11px;
  opacity: 0.7;
  margin-top: 2px;
  word-break: break-word;
}

.report-field-label {
  font-family: var(--font-pixel, monospace);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: -4px;
}

.report-field-input {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg, #0e0e16);
  color: var(--text, #e8e8f0);
  border: 1px solid var(--border, #2c2c3a);
  border-radius: 6px;
  padding: 9px 10px;
  font-size: 14px;
  font-family: inherit;
}
.report-field-input:focus {
  outline: none;
  border-color: var(--accent, #ff5d8f);
}
.report-field-textarea { resize: vertical; min-height: 88px; }

/* Dropzone + thumbnails */
.report-file-input { display: none; }
.report-dropzone {
  border: 1px dashed var(--border, #2c2c3a);
  border-radius: 8px;
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.report-dropzone:hover,
.report-dropzone:focus,
.report-dropzone.dragover {
  border-color: var(--accent, #ff5d8f);
  background: color-mix(in srgb, var(--accent, #ff5d8f) 6%, transparent);
  outline: none;
}
.report-dropzone-hint { font-size: 11px; opacity: 0.6; }

.report-thumbnails { display: flex; flex-wrap: wrap; gap: 8px; }
.report-thumb { position: relative; width: 64px; height: 64px; }
.report-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border, #2c2c3a);
}
.report-thumb-remove {
  position: absolute;
  top: -6px; right: -6px;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: none;
  background: #000;
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.report-error {
  color: #ff7676;
  font-size: 13px;
  background: rgba(255, 90, 90, 0.1);
  border: 1px solid rgba(255, 90, 90, 0.3);
  border-radius: 6px;
  padding: 8px 10px;
}

.report-submit {
  margin-top: 4px;
  background: var(--accent, #ff5d8f);
  color: #000;
  border: none;
  border-radius: 6px;
  padding: 11px 14px;
  font-family: var(--font-pixel, monospace);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: filter 0.15s ease;
}
.report-submit:hover:not(:disabled) { filter: brightness(1.12); }
.report-submit:disabled { opacity: 0.6; cursor: default; }

/* Success state */
.report-success { align-items: center; justify-content: center; text-align: center; }
.report-success-icon {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent, #ff5d8f) 20%, transparent);
  color: var(--accent, #ff5d8f);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}
.report-success-title { font-weight: 700; font-size: 16px; margin: 0; }
.report-success-msg { opacity: 0.75; font-size: 13px; margin: 0; max-width: 280px; }
