/* ==========================================================================
   Ablage-Modul: gemeinsamer Arbeitsplatz fuer Notizen und Dateien.
   Die vertraulichen Bereiche unterscheiden sich zusaetzlich zur Beschriftung
   durch eigene Formen; der gemeinsame Bereich traegt einen ruhigen Klartext-
   Hinweis, damit Privatheit nicht nur ueber Farbe vermittelt wird.
   ========================================================================== */

#view-ablage { display: flex; gap: 0; height: 100%; min-height: 0; }

.ablage-einzelansicht { flex: 1; min-width: 0; min-height: 0; }

.ablage-seite {
  width: 220px; flex: none; display: flex; flex-direction: column; min-height: 0;
  border-right: 1px solid var(--border); padding: 10px; overflow-y: auto;
}
.ablage-baum {
  flex: 1; min-height: 0; margin: 0 4px; padding: 6px 4px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); overflow-y: auto;
}
.ablage-inhalt { flex: 1; min-width: 0; min-height: 0; overflow-y: auto; }
.ablage-leer, .ablage-laden { padding: 20px; }

.ablage-zweig--notizen .pb-baum__icon,
.ablage-zweig--privat .pb-baum__icon,
.ablage-zweig--gemeinsam .pb-baum__icon { width: 18px; height: 18px; }
.ablage-zweig--notizen .pb-baum__icon { color: var(--accent); }
.ablage-zweig--privat .pb-baum__icon { color: var(--text-faint); }
.ablage-zweig--gemeinsam .pb-baum__icon { color: var(--accent-2); }
.ablage-zweig-titel {
  display: flex; flex-direction: column; align-items: flex-start;
  white-space: normal; overflow: visible; text-overflow: clip;
}
.ablage-zweig-hinweis {
  margin-top: 2px; color: var(--text-faint); font-size: 11px; font-weight: 400;
  line-height: 1.25; white-space: nowrap;
}

/* Markdown-Editor der Notizen: bewusst eigene Klassen statt wiki__*. Die
   Ablage bleibt damit auch ohne Wiki-Modul vollstaendig bedienbar. */
.ablage__tabs { display: flex; gap: 4px; margin: 10px 0; }
.ablage__textarea {
  min-height: 340px; resize: vertical; line-height: 1.5; font-size: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.ablage__textarea.is-hidden { display: none; }
.ablage__preview {
  display: none; min-height: 340px; border: 1px solid var(--border);
  border-radius: 8px; padding: 12px;
}
.ablage__preview.is-active { display: block; }

@media (max-width: 640px) {
  #view-ablage { flex-direction: column; }
  .ablage-seite {
    width: auto; max-height: 40vh; border-right: 0; border-bottom: 1px solid var(--border);
  }
  .ablage-inhalt { flex: 1; }
  .ablage__textarea, .ablage__preview { min-height: 240px; }
}

@media print {
  .ablage__textarea, .ablage__tabs { display: none !important; }
}
