/* Kleinanzeigen-Werkbank - eigenes Stylesheet, kein Framework.
   Mobile-first: die Grundeinstellungen gelten für das Handy im Hochformat,
   erst ab 700 Pixel Breite wird umgestellt. */

:root {
  --schrift: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --grund: #f5f5f4;
  --karte: #ffffff;
  --rand: #d9d7d3;
  --text: #1c1b19;
  --gedaempft: #6b6862;
  --akzent: #1f6feb;
  --akzent-dunkel: #17509f;
  --gruen: #1a7f45;
  --rot: #b3261e;
  --gelb: #8a6100;
}

* {
  box-sizing: border-box;
}

html {
  /* Verhindert waagerechtes Scrollen auf schmalen Bildschirmen. */
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--schrift);
  font-size: 17px;
  line-height: 1.5;
  color: var(--text);
  background: var(--grund);
}

img {
  max-width: 100%;
  height: auto;
}

/* ------------------------------------------------------------ Kopfzeile */

.kopfzeile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--karte);
  border-bottom: 1px solid var(--rand);
  position: sticky;
  top: 0;
  z-index: 10;
}

.marke {
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
}

.abmelden {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.benutzername {
  font-size: 0.85rem;
  color: var(--gedaempft);
}

.inhalt {
  max-width: 46rem;
  margin: 0 auto;
  padding: 1rem;
}

h1 {
  font-size: 1.4rem;
  margin: 0.5rem 0 1rem;
  overflow-wrap: anywhere;
}

h2 {
  font-size: 1.1rem;
  margin: 0 0 0.75rem;
}

/* ------------------------------------------------------------- Knöpfe */

.knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* Mindestens 44 Pixel hoch, damit der Finger sicher trifft. */
  min-height: 44px;
  padding: 0.6rem 1rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--akzent);
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.knopf:hover {
  background: var(--akzent-dunkel);
}

.knopf.gross {
  width: 100%;
  min-height: 52px;
  font-size: 1.05rem;
  margin: 0.5rem 0;
}

.knopf.klein {
  min-height: 38px;
  padding: 0.3rem 0.6rem;
  font-size: 0.85rem;
}

.knopf.grau {
  background: var(--karte);
  color: var(--text);
  border-color: var(--rand);
}

.knopf.grau:hover {
  background: #eceae6;
}

.knopf.rot {
  background: var(--rot);
}

.knopf.aktiv {
  background: var(--gruen);
}

.knopf[disabled] {
  opacity: 0.7;
  cursor: default;
}

/* ----------------------------------------------------------- Formulare */

.formular {
  display: block;
}

label {
  display: block;
  margin: 1rem 0 0.3rem;
  font-weight: 600;
  font-size: 0.95rem;
}

label.kaestchen {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 400;
  min-height: 44px;
}

label.kaestchen input {
  width: 22px;
  height: 22px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="date"],
input[type="file"],
select,
textarea {
  width: 100%;
  max-width: 100%;
  padding: 0.6rem;
  font-family: inherit;
  /* 16 Pixel oder mehr - sonst zoomt iOS beim Antippen hinein. */
  font-size: 16px;
  border: 1px solid var(--rand);
  border-radius: 8px;
  background: var(--karte);
  color: var(--text);
}

textarea {
  resize: vertical;
}

textarea.schreibmaschine {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 14px;
}

.zaehler {
  float: right;
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--gedaempft);
}

.zaehler.voll {
  color: var(--rot);
  font-weight: 600;
}

.feldhinweis {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--gedaempft);
}

.speicherleiste {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1.5rem 0 3rem;
}

/* -------------------------------------------------------- Meldeboxen */

.fehlermeldung,
.erfolgsmeldung,
.warnung,
.hinweis {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin: 1rem 0;
}

.fehlermeldung {
  background: #fdecea;
  border: 1px solid #f2b8b5;
  color: var(--rot);
}

.fehlermeldung ul {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
}

.erfolgsmeldung {
  background: #e6f4ea;
  border: 1px solid #b7e0c4;
  color: var(--gruen);
}

.warnung {
  background: #fff6e0;
  border: 1px solid #f0d9a0;
  color: var(--gelb);
}

.hinweis {
  background: var(--karte);
  border: 1px solid var(--rand);
  color: var(--gedaempft);
}

.grau-text {
  color: var(--gedaempft);
}

/* ------------------------------------------------------------- Blöcke */

.block {
  background: var(--karte);
  border: 1px solid var(--rand);
  border-radius: 10px;
  padding: 1rem;
  margin: 1rem 0;
}

/* --------------------------------------------------------------- Filter */

.filter {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.75rem;
  background: var(--karte);
  border: 1px solid var(--rand);
  border-radius: 10px;
  padding: 0.75rem 1rem 1rem;
  margin: 1rem 0;
}

.filter label {
  margin-top: 0;
}

.filter select {
  min-width: 10rem;
}

/* --------------------------------------------------------- Artikelliste */

.artikelliste {
  list-style: none;
  margin: 0;
  padding: 0;
}

.artikelliste li {
  margin-bottom: 0.6rem;
}

.artikelliste a {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.6rem;
  background: var(--karte);
  border: 1px solid var(--rand);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  min-height: 76px;
}

.miniatur {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--grund);
  display: flex;
  align-items: center;
  justify-content: center;
}

.miniatur img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kein-bild {
  font-size: 0.7rem;
  color: var(--gedaempft);
  text-align: center;
}

.angaben {
  min-width: 0;
  flex: 1;
}

.bezeichnung {
  display: block;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.zeile2 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.3rem;
  font-size: 0.85rem;
}

.preis {
  font-variant-numeric: tabular-nums;
}

.kuerzel {
  margin-left: auto;
  background: var(--grund);
  border: 1px solid var(--rand);
  border-radius: 999px;
  padding: 0.05rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gedaempft);
}

/* -------------------------------------------------------- Statusmarken */

.marke-status {
  display: inline-block;
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: #e6e4e0;
  color: #43403b;
}

.status-freigegeben { background: #dfe9fb; color: #17509f; }
.status-online      { background: #e6f4ea; color: #1a7f45; }
.status-reserviert  { background: #fff6e0; color: #8a6100; }
.status-verkauft    { background: #1a7f45; color: #fff; }
.status-verworfen   { background: #f0eeea; color: #8a8479; }

.statusknoepfe {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ---------------------------------------------------------- Bilderliste */

.bilderliste {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.bilderliste li {
  border: 1px solid var(--rand);
  border-radius: 10px;
  overflow: hidden;
  background: var(--grund);
}

.bilderliste li.titelbild {
  border-color: var(--gruen);
  border-width: 2px;
}

.bilderliste img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.bildknoepfe {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem;
  background: var(--karte);
}

.bildknoepfe form {
  display: flex;
  gap: 0.3rem;
}

.marke {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gruen);
}

/* -------------------------------------- KI-Ergebnisse und Freigabe */

.ergebnis {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.1rem 1rem;
  margin: 0;
}

.ergebnis dt {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--gedaempft);
  margin-top: 0.6rem;
}

.ergebnis dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.kopierfeld {
  margin-bottom: 1.2rem;
}

.kopierfeld textarea {
  background: var(--grund);
}

.kopierfeld .knopf {
  margin-top: 0.4rem;
}

.quelle {
  border-left: 3px solid var(--rand);
  padding: 0.2rem 0 0.2rem 0.8rem;
  margin-bottom: 1rem;
}

.quelle p {
  margin: 0.2rem 0;
  overflow-wrap: anywhere;
}

.wortlaut {
  font-style: italic;
  color: var(--gedaempft);
}

.konfidenz-hoch,
.guete-woertlich {
  background: #e6f4ea;
  color: var(--gruen);
}

.konfidenz-mittel {
  background: #fff6e0;
  color: var(--gelb);
}

.konfidenz-niedrig,
.guete-indirekt {
  background: #fdecea;
  color: var(--rot);
}

/* ------------------------------------------------ größere Bildschirme */

@media (min-width: 700px) {
  .knopf.gross {
    width: auto;
    min-width: 12rem;
  }

  .speicherleiste {
    flex-direction: row;
    align-items: center;
  }

  .bilderliste {
    grid-template-columns: repeat(3, 1fr);
  }
}
