/* ---------- Notizen (wie die iPhone-App, in Schwarz-Weiß) ---------- */

.nt-panel {
  flex-direction: row;
}

.nt-side {
  flex: none;
  display: flex;
  flex-direction: column;
  width: 340px;
  min-height: 0;
  border-right: 1px solid var(--border);
}

.nt-side-head {
  display: flex;
  gap: 8px;
  padding: 14px 14px 10px;
}

.nt-side-head input {
  flex: 1;
  min-width: 0;
  height: 32px;
  padding: 0 12px;
  font: inherit;
  font-size: 13px;
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  user-select: text;
}

.nt-side-head input:focus {
  border-color: var(--border-strong);
}

.nt-filter {
  margin: 0 14px 8px;
  align-self: flex-start;
}

.nt-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0 8px 8px;
}

.nt-group {
  margin: 14px 8px 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.nt-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  padding: 9px 10px;
  text-align: left;
  border-radius: var(--radius-sm);
  transition: background 0.12s var(--ease);
}

.nt-item + .nt-item {
  box-shadow: inset 0 1px 0 var(--border);
}

.nt-item:hover {
  background: var(--bg-elevated);
}

.nt-item.is-active,
.nt-item.is-active + .nt-item {
  box-shadow: none;
}

.nt-item.is-active {
  background: var(--bg-hover);
}

.nt-item-title {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
}

.nt-item-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nt-item-sub {
  display: flex;
  gap: 8px;
  min-width: 0;
  font-size: 12px;
  color: var(--text-muted);
}

.nt-item-date {
  flex: none;
  color: var(--text-secondary);
}

.nt-item-prev {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Fragezeichen bzw. Haken vor Fragen */
.nt-q {
  flex: none;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  font-size: 11px;
  font-weight: 700;
  color: var(--warning);
  border: 1px solid var(--warning);
  border-radius: 50%;
}

.nt-q.is-done {
  color: var(--success);
  border-color: var(--success);
}

.nt-none {
  margin: 24px 8px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

.nt-count {
  flex: none;
  padding: 8px 14px 10px;
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  border-top: 1px solid var(--border);
}

/* ---------- Editor ---------- */

.nt-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.nt-empty {
  flex: 1;
}

.nt-editor {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.nt-editor[hidden] {
  display: none;
}

.nt-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
}

.nt-bar .is-off {
  opacity: 0.35;
  pointer-events: none;
}

.nt-done {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}

.nt-done[hidden] {
  display: none;
}

.nt-done input {
  width: 16px;
  height: 16px;
  accent-color: var(--success);
}

.nt-status {
  flex: 1;
  font-size: 12px;
  color: var(--text-muted);
  text-align: right;
}

.nt-status.is-error {
  color: var(--danger);
}

.nt-date {
  padding: 16px 40px 0;
  font-size: 12px;
  color: var(--text-muted);
}

.nt-text {
  flex: 1;
  min-height: 0;
  width: 100%;
  padding: 14px 40px 32px;
  font: inherit;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-primary);
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  user-select: text;
}

.nt-text::placeholder {
  color: var(--text-muted);
}

.nt-text[readonly] {
  color: var(--text-secondary);
}

/* Schmal (Web-Version am Handy): Liste oben, Editor darunter */
@media (max-width: 760px) {
  .nt-panel {
    flex-direction: column;
  }

  .nt-side {
    width: auto;
    max-height: 42vh;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .nt-bar {
    flex-wrap: wrap;
    padding: 10px 14px;
  }

  .nt-text {
    padding: 12px 16px 24px;
    font-size: 16px;
  }
}

/* ---------- Bilder in Notizen ---------- */

.nt-item {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.nt-item-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nt-item-thumb {
  flex: none;
  width: 42px;
  height: 42px;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.nt-images {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 40px 0;
}

.nt-images[hidden] {
  display: none;
}

.nt-img {
  position: relative;
  margin: 0;
}

.nt-img img {
  display: block;
  max-width: min(420px, 100%);
  max-height: 260px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: zoom-in;
}

.nt-img-rm {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  font-size: 15px;
  line-height: 1;
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.12s var(--ease);
}

.nt-img:hover .nt-img-rm,
.nt-img-rm:focus-visible {
  opacity: 1;
}

/* Beim Hineinziehen: Rahmen um den Editor */
.view-notes.is-drop .nt-main {
  outline: 2px dashed var(--border-strong);
  outline-offset: -8px;
}

.nt-lightbox {
  max-width: 94vw;
  max-height: 94vh;
  padding: 0;
  background: transparent;
  border: none;
}

.nt-lightbox::backdrop {
  background: rgba(0, 0, 0, 0.85);
}

.nt-lightbox img {
  display: block;
  max-width: 94vw;
  max-height: 94vh;
  border-radius: var(--radius-sm);
  cursor: zoom-out;
}

@media (max-width: 760px) {
  .nt-images {
    padding: 12px 16px 0;
  }
}
