/* BitterKraft! Bild-Übersetzer — Stil */

:root {
  --brand: #005032;
  --brand-dark: #003e26;
  --accent: #e0007a;
  --bg: #f7f5ef;
  --card: #ffffff;
  --border: #d8d4c8;
  --text: #1d2421;
  --muted: #6b7068;
  --warn-bg: #fff3cd;
  --warn-border: #e6c97a;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

.topbar {
  background: var(--brand);
  color: white;
  padding: 14px 0;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; }
.topbar h1 { margin: 0; font-size: 20px; font-weight: 600; }
.topbar .logout { color: rgba(255,255,255,0.85); text-decoration: none; font-size: 14px; }
.topbar .logout:hover { color: white; }

main.wrap { padding-bottom: 40px; }
footer.wrap { color: var(--muted); font-size: 13px; padding: 30px 20px; }

h2 { color: var(--brand); margin: 24px 0 12px; font-size: 22px; }
h3 { color: var(--brand-dark); margin: 20px 0 10px; font-size: 18px; }

p.hint { color: var(--muted); margin: 6px 0 16px; }

p.warn, .warn {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-radius: 6px;
  padding: 10px 14px;
  margin: 12px 0;
}

/* Steuer-Sektion (Sprache, Layout-Test, Button) */
section.controls {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 22px;
  margin: 0 0 22px;
}
section.controls.bottom { margin-top: 24px; }
section.controls .row { display: flex; align-items: center; gap: 12px; margin: 8px 0; }
section.controls .row.checkbox { gap: 8px; }
section.controls label { font-weight: 400; }
select, input[type="text"], input[type="password"], textarea {
  font: inherit;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: white;
  color: var(--text);
}
select { min-width: 220px; }
textarea, input[type="text"] { width: 100%; }
textarea { resize: vertical; min-height: 36px; }

button.primary, a.primary {
  display: inline-block;
  background: var(--brand);
  color: white;
  border: 0;
  padding: 10px 22px;
  border-radius: 6px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  margin-top: 10px;
}
button.primary:hover, a.primary:hover { background: var(--brand-dark); }

/* Motiv-Karten (Accordion via <details>) */
details.motif {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin: 10px 0;
  overflow: hidden;
}
details.motif > summary {
  padding: 12px 18px;
  cursor: pointer;
  user-select: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  list-style: none;
}
details.motif > summary::-webkit-details-marker { display: none; }
details.motif > summary::before {
  content: "▸";
  margin-right: 10px;
  color: var(--brand);
  transition: transform 0.15s;
  display: inline-block;
}
details.motif[open] > summary::before { transform: rotate(90deg); }
details.motif > summary:hover { background: rgba(0,80,50,0.04); }
.motif-id { color: var(--brand); font-size: 16px; }
.motif-info { color: var(--muted); font-weight: 400; font-size: 14px; }

.motif-body {
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr;
  gap: 22px;
  padding: 18px;
  border-top: 1px solid var(--border);
}
.motif-preview img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #eee;
}
.motif-uploads { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.motif-uploads .upload {
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.motif-uploads .upload span { color: var(--muted); }
.motif-uploads input[type="file"] { font-size: 13px; }

.motif-fields { display: flex; flex-direction: column; gap: 14px; }
.region {
  background: rgba(0,80,50,0.03);
  border: 1px solid rgba(0,80,50,0.08);
  border-radius: 6px;
  padding: 10px 12px;
}
.region-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
  font-size: 13px;
}
.region-id { font-weight: 600; color: var(--brand-dark); }
.region-tags { color: var(--muted); }
.region-input { margin-top: 4px; }
.region input.region-input + input.region-input { margin-top: 6px; }

/* Ergebnisse */
.results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 12px;
}
.result {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  margin: 0;
}
.result img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  background: #eee;
}
.result figcaption {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
  word-break: break-all;
}

/* Login */
section.login {
  max-width: 360px;
  margin: 60px auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px;
}
section.login label { display: block; margin-bottom: 14px; }
section.login input[type="password"] { width: 100%; margin-top: 6px; }

/* Schmale Bildschirme */
@media (max-width: 720px) {
  .motif-body { grid-template-columns: 1fr; }
}
