/* CareBridge Marktplatz — Ergaenzung zu carebridge.css
   Enthaelt ausschliesslich Bausteine, die es auf der Website nicht gibt.
   Farben, Schriften, Abstaende und Breakpoints kommen aus dem Designsystem
   der Hauptwebsite. Keine externen Aufrufe. */

/* ---------------------------------------------------------------
   Anzeigenraster
   --------------------------------------------------------------- */
.mp-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.mp-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.mp-item:hover {
  border-color: var(--emerald);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.mp-item:focus-visible { outline: 2px solid var(--emerald); outline-offset: 3px; }

.mp-item h3 {
  font-family: var(--display);
  font-size: 1.12rem;
  line-height: 1.3;
  margin: 0;
  color: var(--ink);
}

.mp-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 0;
  font-size: .88rem;
  color: var(--ink-muted);
}
.mp-meta b { color: var(--slate-600); font-weight: 600; }

/* Sprachkuerzel als Datenpunkt, nicht als Dekor */
.mp-langs { display: flex; gap: 5px; margin-top: auto; padding-top: 12px; }
.mp-langs span {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .06em;
  padding: 3px 7px;
  border-radius: 4px;
  background: var(--slate-100);
  color: var(--slate-600);
}

/* ---------------------------------------------------------------
   Kennzeichen: Angebot / Gesuch
   --------------------------------------------------------------- */
.mp-tag {
  align-self: flex-start;
  font-family: var(--mono);
  font-size: .66rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
}
.mp-tag-angebot { background: var(--emerald-50); color: var(--emerald-700); }
.mp-tag-gesuch  { background: #EFF6FF;           color: #1D4ED8; }

/* ---------------------------------------------------------------
   Filterleiste
   --------------------------------------------------------------- */
.mp-filter {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 16px;
  align-items: end;
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.mp-filter .field { gap: 6px; }

/* ---------------------------------------------------------------
   Statusmarken in Tabellen
   --------------------------------------------------------------- */
.mp-status {
  display: inline-block;
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .04em;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.mp-s-aktiv      { background: var(--emerald-50); color: var(--emerald-700); }
.mp-s-pruefung   { background: var(--amber-50);   color: var(--amber); }
.mp-s-entwurf    { background: var(--slate-100);  color: var(--slate-500); }
.mp-s-gesperrt,
.mp-s-abgelaufen { background: #FEF2F2;           color: #B91C1C; }

/* ---------------------------------------------------------------
   Tabellen — auf schmalen Displays horizontal scrollbar,
   damit nichts abgeschnitten wird
   --------------------------------------------------------------- */
.mp-tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.mp-table { width: 100%; border-collapse: collapse; font-size: .93rem; min-width: 460px; }
.mp-table th, .mp-table td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line); }
.mp-table th {
  font-family: var(--mono);
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--slate-500);
  font-weight: 500;
}
.mp-table tr:last-child td { border-bottom: 0; }

/* ---------------------------------------------------------------
   Rollenauswahl bei der Registrierung
   --------------------------------------------------------------- */
.mp-choice {
  display: block;
  position: relative;
  padding: 22px 130px 22px 24px;
  margin-bottom: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.mp-choice:hover { border-color: var(--emerald); box-shadow: var(--shadow-sm); }
.mp-choice:focus-visible { outline: 2px solid var(--emerald); outline-offset: 3px; }
.mp-choice strong {
  display: block;
  font-family: var(--display);
  font-size: 1.05rem;
  margin-bottom: 5px;
}
.mp-choice span { color: var(--ink-muted); font-size: .92rem; line-height: 1.55; }

.mp-price {
  position: absolute;
  top: 22px;
  right: 24px;
  font-family: var(--mono);
  font-size: .82rem;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--slate-100);
  color: var(--slate-600);
  white-space: nowrap;
}
.mp-price-free { background: var(--emerald-50); color: var(--emerald-700); }

/* ---------------------------------------------------------------
   Kartenflaeche fuer Formulare und Bloecke
   --------------------------------------------------------------- */
.mp-panel {
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin-bottom: 22px;
}
.mp-panel > h2:first-child { margin-top: 0; }

/* Meldungen: Ergaenzung zu .alert der Website */
.alert-warn { background: var(--amber-50); border-color: #FDE68A; color: var(--amber); }
.alert-info { background: #EFF6FF; border-color: #BFDBFE; color: #1D4ED8; }

/* ---------------------------------------------------------------
   Schmale Displays
   --------------------------------------------------------------- */
@media (max-width: 900px) {
  .mp-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mp-filter > *:last-child { grid-column: 1 / -1; }
  .mp-filter .btn { width: 100%; }
}

@media (max-width: 640px) {
  .mp-list { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .mp-item { padding: 20px; }
  .mp-filter { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  .mp-panel { padding: 20px; }

  /* Preis unter den Text statt daneben, sonst wird es zu eng */
  .mp-choice { padding: 20px; }
  .mp-price { position: static; display: inline-block; margin-bottom: 12px; }
}

@media (max-width: 380px) {
  .mp-item h3 { font-size: 1.05rem; }
  .mp-meta { font-size: .85rem; }
}

@media (prefers-reduced-motion: reduce) {
  .mp-item, .mp-choice { transition: none; }
  .mp-item:hover { transform: none; }
}

/* ---------------------------------------------------------------
   Vorschaubetrieb — Hinweisband unter der Kopfzeile
   --------------------------------------------------------------- */
.mp-vorschau {
  background: var(--amber-50);
  border-bottom: 1px solid #FDE68A;
  color: var(--amber);
  font-size: .92rem;
  padding: 12px 0;
}
.mp-vorschau .shell { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.mp-vorschau strong { font-weight: 700; white-space: nowrap; }
.mp-vorschau span { color: #92400E; }

@media (max-width: 640px) {
  .mp-vorschau { font-size: .86rem; padding: 11px 0; }
  .mp-vorschau .shell { flex-direction: column; gap: 3px; }
}
