/* Besprechungs-Protokolle – Modul "meetings" */

.meetings {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 20px 64px;
  font-family: var(--font-sans);
  color: var(--text);
}

/* ---- Kopfzeile ---------------------------------------------------------- */
.mt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.mt-head__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}
.mt-newbtn { white-space: nowrap; }

/* ---- Liste -------------------------------------------------------------- */
.mt-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ---- Leerer Zustand ----------------------------------------------------- */
.mt-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 64px 24px;
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
}
.mt-empty__icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-text);
}
.mt-empty__icon svg { width: 28px; height: 28px; }
.mt-empty__text {
  margin: 0;
  font-size: 15px;
  color: var(--text-soft);
}

/* ---- Karte (Lese-Modus) ------------------------------------------------- */
.mt-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.mt-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.mt-card__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.mt-card__date {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.mt-card__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 650;
  line-height: 1.25;
  color: var(--text);
  overflow-wrap: anywhere;
}
.mt-card__title--empty {
  color: var(--text-faint);
  font-style: italic;
  font-weight: 500;
}
.mt-edit { flex: none; }

.mt-card__body {
  padding: 8px 20px 18px;
  display: flex;
  flex-direction: column;
}

/* ---- Abschnitt ---------------------------------------------------------- */
.mt-section { padding: 14px 0; border-bottom: 1px solid var(--border); }
.mt-section:last-child { border-bottom: none; }
.mt-section__label {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.mt-section__empty {
  margin: 0;
  color: var(--text-faint);
  font-size: 14px;
}

/* ---- Gerendertes Markdown ---------------------------------------------- */
.mt-md {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  overflow-wrap: anywhere;
}
.mt-md > :first-child { margin-top: 0; }
.mt-md > :last-child { margin-bottom: 0; }
.mt-md p { margin: 0 0 0.7em; }
.mt-md h1, .mt-md h2, .mt-md h3, .mt-md h4 {
  font-family: var(--font-display);
  font-weight: 650;
  line-height: 1.3;
  margin: 1.1em 0 0.45em;
  color: var(--text);
}
.mt-md h1 { font-size: 1.45em; }
.mt-md h2 { font-size: 1.28em; }
.mt-md h3 { font-size: 1.12em; }
.mt-md h4 { font-size: 1em; }
.mt-md ul, .mt-md ol { margin: 0 0 0.7em; padding-left: 1.5em; }
.mt-md li { margin: 0.2em 0; }
.mt-md li > ul, .mt-md li > ol { margin: 0.2em 0; }
.mt-md strong { font-weight: 700; color: var(--text); }
.mt-md em { font-style: italic; }
.mt-md a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; }
.mt-md a:hover { filter: brightness(1.1); }
.mt-md code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  background: var(--surface-3);
  padding: 0.12em 0.4em;
  border-radius: var(--radius-sm);
}
.mt-md pre {
  background: var(--surface-3);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 0 0 0.7em;
}
.mt-md pre code { background: none; padding: 0; }
.mt-md blockquote {
  margin: 0 0 0.7em;
  padding: 4px 14px;
  border-left: 3px solid var(--border-strong);
  color: var(--text-soft);
}
.mt-md hr { border: none; border-top: 1px solid var(--border); margin: 1.1em 0; }
.mt-md table { border-collapse: collapse; margin: 0 0 0.7em; width: 100%; }
.mt-md th, .mt-md td {
  border: 1px solid var(--border);
  padding: 6px 10px;
  text-align: left;
}
.mt-md th { background: var(--surface-2); font-weight: 650; }

/* ---- Editor ------------------------------------------------------------- */
.mt-editor {
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.mt-editor__head {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.mt-editor__datewrap,
.mt-editor__titlewrap {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.mt-editor__datewrap { flex: 0 0 auto; }
.mt-editor__titlewrap { flex: 1 1 240px; min-width: 0; }
.mt-editor__fieldlabel {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.mt-field__date { width: auto; }
.mt-field__title { width: 100%; }

/* ---- Markdown-Feld (Editor) -------------------------------------------- */
.mt-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mt-field__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.mt-field__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.mt-field__tabs {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}
.mt-tab {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-soft);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: calc(var(--radius-sm) - 1px);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.mt-tab:hover { color: var(--text); }
.mt-tab.is-active {
  background: var(--surface);
  color: var(--accent-text);
  box-shadow: var(--shadow-sm);
}
.mt-field__textarea {
  width: 100%;
  resize: vertical;
  min-height: 110px;
  font-family: var(--font-sans);
  line-height: 1.55;
}
.mt-field__textarea.is-hidden { display: none; }

.mt-field__preview {
  display: none;
  min-height: 110px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.mt-field__preview.is-active { display: block; }
.mt-field__preview:empty::before {
  content: 'Nichts zur Vorschau.';
  color: var(--text-faint);
  font-size: 14px;
}

/* ---- Editor-Aktionen ---------------------------------------------------- */
.mt-editor__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--border);
  margin-top: 2px;
  padding-top: 16px;
}
.mt-editor__spacer { flex: 1 1 auto; }

/* ---- Schmale Ansicht ---------------------------------------------------- */
@media (max-width: 560px) {
  .meetings { padding: 18px 14px 56px; }
  .mt-head { flex-direction: column; align-items: stretch; }
  .mt-head__title { font-size: 23px; }
  .mt-newbtn { width: 100%; }
  .mt-card__head { flex-direction: column; }
  .mt-edit { align-self: flex-start; }
}
