/* "Report a problem" (commons/report-problem.js). LogosCat look: white card, indigo buttons, red serif
   title. Own variables, so pages without lc-theme.css (memorize) look the same. */
.lc-report-button,
.lc-report-dialog {
  --lcr-ink: #1e1b4b;
  --lcr-muted: #475569;
  --lcr-label: #4f46e5;
  --lcr-primary: #4f46e5;
  --lcr-primary-hover: #4338ca;
  --lcr-border: #c7d2fe;
  --lcr-tint: #eef2ff;
  --lcr-title: #dc2626;
  --lcr-error: #b91c1c;
  --lcr-ok: #047857;
  --lcr-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --lcr-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
}

.lc-report-button {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 9000;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px 0 6px;
  border: 1px solid var(--lcr-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--lcr-ink);
  font: 600 14px/1 var(--lcr-sans);
  box-shadow: 0 4px 16px rgba(30, 27, 75, 0.25);
  cursor: pointer;
}
.lc-report-button:hover { background: #fff; border-color: var(--lcr-primary); }
.lc-report-button:focus-visible { outline: 3px solid var(--lcr-primary); outline-offset: 2px; }
.lc-report-button[aria-busy="true"] { cursor: progress; opacity: 0.7; }
.lc-report-button-icon {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--lcr-primary);
  color: #fff;
  font: 700 18px/1 var(--lcr-sans);
}

/* Phone: a round button, the label for screen readers only. It sits above the connection badge that
   mobile/sse-client.js fixes 10 px from the bottom-right corner (about 26 px tall, z-index 10000). */
.lc-report-button--mobile {
  right: 12px;
  bottom: calc(48px + env(safe-area-inset-bottom, 0px));
  padding: 0;
  width: 44px;
  height: 44px;
  justify-content: center;
  opacity: 0.85;
}
.lc-report-button--mobile .lc-report-button-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Desktop pages 768px wide and narrower (C-9): the labelled pill covered the bottom-right corner of the workspace
   card. Use the phone's round button there, centred in the 56px right gutter styles.css keeps from 481 to 768px. */
@media (max-width: 768px) {
  .lc-report-button:not(.lc-report-button--mobile) {
    right: 6px;
    padding: 0;
    width: 44px;
    height: 44px;
    justify-content: center;
  }
  .lc-report-button:not(.lc-report-button--mobile) .lc-report-button-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

html.lc-report-open { overflow: hidden; }

.lc-report-dialog {
  width: min(520px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: none;
  border-radius: 18px;
  background: #fff;
  color: var(--lcr-ink);
  font: 15px/1.45 var(--lcr-sans);
  box-shadow: 0 24px 60px rgba(15, 12, 50, 0.45);
}
.lc-report-dialog::backdrop { background: rgba(12, 10, 29, 0.55); }

.lc-report-form {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 24px);
}
.lc-report-title {
  margin: 0;
  padding: 18px 20px 6px;
  color: var(--lcr-title);
  font: 400 24px/1.2 var(--lcr-serif);
}
.lc-report-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px 20px 8px;
  overflow-y: auto;
}
.lc-report-label {
  margin-top: 8px;
  color: var(--lcr-label);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.lc-report-select,
.lc-report-text {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--lcr-border);
  border-radius: 10px;
  background: #fff;
  color: var(--lcr-ink);
  font: 16px/1.4 var(--lcr-sans); /* 16 px keeps iOS from zooming in */
}
.lc-report-select { min-height: 44px; }
.lc-report-text { resize: vertical; min-height: 110px; }
.lc-report-select:focus,
.lc-report-text:focus { outline: 2px solid var(--lcr-primary); outline-offset: 1px; border-color: var(--lcr-primary); }
.lc-report-counter { align-self: flex-end; color: var(--lcr-muted); font-size: 12px; }
.lc-report-counter--short,
.lc-report-counter--long { color: var(--lcr-error); }

.lc-report-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.lc-report-thumb {
  position: relative;
  width: 96px;
  height: 72px;
  border: 1px solid var(--lcr-border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--lcr-tint);
}
.lc-report-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lc-report-thumb-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(30, 27, 75, 0.8);
  color: #fff;
  font-size: 14px;
  line-height: 28px;
  cursor: pointer;
}
.lc-report-images-row { display: flex; align-items: center; gap: 12px; }
.lc-report-add {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--lcr-primary);
  border-radius: 10px;
  background: #fff;
  color: var(--lcr-primary);
  font: 600 14px var(--lcr-sans);
  cursor: pointer;
}
.lc-report-add:disabled { opacity: 0.45; cursor: default; }
.lc-report-images-hint { color: var(--lcr-muted); font-size: 13px; }
.lc-report-file { display: none; }

.lc-report-status { min-height: 1.4em; margin: 6px 0 0; font-size: 14px; }
.lc-report-status--error { color: var(--lcr-error); }
.lc-report-status--ok { color: var(--lcr-ok); font-weight: 600; }

.lc-report-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 20px calc(16px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--lcr-tint);
}
.lc-report-cancel,
.lc-report-send {
  min-height: 44px;
  min-width: 96px;
  padding: 0 18px;
  border-radius: 10px;
  font: 600 15px var(--lcr-sans);
  cursor: pointer;
}
.lc-report-cancel { border: 1px solid var(--lcr-border); background: #fff; color: var(--lcr-ink); }
.lc-report-send { border: none; background: var(--lcr-primary); color: #fff; }
.lc-report-send:hover:not(:disabled) { background: var(--lcr-primary-hover); }
.lc-report-send:disabled { opacity: 0.6; cursor: default; }
.lc-report-form--done .lc-report-body > :not(.lc-report-status) { opacity: 0.5; pointer-events: none; }

@media (max-width: 480px) {
  .lc-report-dialog {
    width: 100vw;
    max-width: 100vw;
    max-height: 100dvh;
    margin: auto 0 0;
    border-radius: 18px 18px 0 0;
  }
  .lc-report-form { max-height: 100dvh; }
}
