/* GPTGenie – kleine UI-Verbesserungen (wird als letztes CSS geladen) */

/* ── Rückgängig-Button am Buchstaben-Canvas ── */
.canvas-btn-undo {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.14);
  color: rgba(245,245,247,0.85);
  padding: 11px 14px;
}
.canvas-btn-undo:hover:not(:disabled) {
  background: rgba(255,255,255,0.11);
  border-color: rgba(255,255,255,0.22);
  transform: translateY(-1px);
}
.canvas-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  transform: none !important;
}

/* Zeichenflächen: keine Textauswahl / kein Scrollen beim Zeichnen */
#letterCanvas, #fastScanCanvas {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

/* ── Fast Scan: Zusatzleiste ── */
.fs-toolbar {
  display: flex;
  gap: 8px;
  justify-content: center;
  width: 100%;
}
.fs-toolbar .clear-button { flex: 1; justify-content: center; position: static !important; }
.fs-undo-button {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.14);
  color: rgba(245,245,247,0.85);
  border-radius: 100px;
  padding: 10px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  transition: all 0.2s;
}
.fs-undo-button:hover:not(:disabled) { background: rgba(255,255,255,0.12); }
.fs-undo-button:disabled { opacity: 0.35; cursor: not-allowed; }

.fs-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: -2px 0 8px;
  font-size: 12px;
  color: rgba(245,245,247,0.65);
}
.fs-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
.fs-toggle input { accent-color: #A855F7; width: 15px; height: 15px; cursor: pointer; }
.fs-hint {
  font-size: 11px;
  color: rgba(245,245,247,0.40);
  text-align: center;
  margin-top: 8px;
}
.fs-hint kbd {
  font-family: inherit;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
}
.fs-saved-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(48,209,88,0.16);
  color: #30D158;
  border: 1px solid rgba(48,209,88,0.35);
  vertical-align: middle;
}
@media (hover: none) {
  .fs-hint { display: none; }
}

/* ── Icon-Buttons im Text-Bereich: Beschriftung per Tooltip ── */
#text-info-button, #history-button { cursor: pointer; }

/* ── Hinweis auf fehlende Buchstaben ── */
.missing-chars-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin: 10px 0 4px;
}
.missing-chars-list span {
  min-width: 30px;
  height: 30px;
  padding: 0 6px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  background: rgba(255,159,10,0.12);
  border: 1px solid rgba(255,159,10,0.35);
  color: #FFB340;
}

/* ── Zeichenzähler: Wörter + Seiten-Schätzung ── */
.char-counter .text-stats { color: var(--text-3); }

/* ── Verifizierungscode: Zahlenfeld ── */
.verification-box { font-variant-numeric: tabular-nums; }



/* Bewegung reduzieren, wenn im System eingestellt */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Download-Button: Hinweis bei geändertem Text */
#download-pdf-button.pdf-outdated::after {
  content: '⟳ Text geändert';
  display: inline-block;
  margin-left: 8px;
  vertical-align: middle;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 100px;
  background: #FF9F0A;
  color: #1a1206;
  box-shadow: 0 2px 8px rgba(255,159,10,0.4);
}
html[lang="en"] #download-pdf-button.pdf-outdated::after { content: '⟳ Text changed'; }

/* Pinsel-Zeile auf dem Handy: Buttons umbrechen statt aus dem Bild laufen */
@media (max-width: 600px) {
  .brush-action-buttons { width: 100%; flex-wrap: wrap; justify-content: center; }
  .brush-action-buttons .brush-btn { flex: 1 1 auto; justify-content: center; }
  .canvas-buttons { flex-wrap: wrap; justify-content: center; }
  .canvas-btn { padding: 10px 16px; font-size: 13px; }
}

/* Fast Scan: „Zurück“ beim ersten Zeichen ausgegraut */
.nav-button:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
