/**
 * Note-IT Minimal — Pinwand & überall wo .noteit-card (ohne Dock-Karten)
 * Schriften: Kalam + Caveat (layout.ejs)
 */

/* ══════════════════════════════════════════════════
   NOTE-IT MINIMAL — "Nichts mehr weglassen"
   ══════════════════════════════════════════════════ */

#noteit-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 420px;
  padding: 8px 0 16px;
}

/* ── POST-IT GRUNDFORM ─────────────────────────── */
.noteit-card {
  position: relative;
  background: #ffe45e;
  padding: 14px 16px 12px;
  margin-bottom: 10px;
  border-left: 3px solid transparent;
  border-radius: 0;
  box-shadow:
    2px 3px 0 rgba(0, 0, 0, 0.18),
    inset 0 -40px 40px -30px rgba(0, 0, 0, 0.04);
  transition:
    background 0.5s ease,
    box-shadow 0.5s ease,
    border-color 0.5s ease,
    transform 0.3s ease,
    opacity 0.3s ease;
  touch-action: pan-y;
  user-select: none;
  overflow: hidden;
}

#noteit-cards .noteit-card {
  margin-bottom: 0;
}

/* Leichte Rotation */
.noteit-card:nth-child(odd) {
  transform: rotate(-0.7deg);
}
.noteit-card:nth-child(even) {
  transform: rotate(0.5deg);
}
.noteit-card:nth-child(3n) {
  transform: rotate(-0.3deg);
}

/* Tape */
.noteit-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 8px;
  background: rgba(180, 175, 160, 0.3);
  z-index: 2;
}

/* Linierung */
.noteit-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    transparent,
    transparent 27px,
    rgba(0, 0, 0, 0.025) 27px,
    rgba(0, 0, 0, 0.025) 28px
  );
  pointer-events: none;
  z-index: 0;
}
.noteit-card > * {
  position: relative;
  z-index: 1;
}

/* ── HANDSCHRIFT ─────────────────────────────── */
.noteit-textarea {
  font-family: 'Kalam', cursive;
  font-size: 17px;
  line-height: 27px;
  color: #1a1400;
  width: 100%;
  min-height: 50px;
  border: none;
  background: transparent;
  resize: none;
  overflow: hidden;
  outline: none;
  padding: 0;
  touch-action: manipulation;
}

.noteit-location {
  font-family: 'Caveat', cursive;
  font-size: 12px;
  font-weight: 600;
  color: rgba(60, 50, 20, 0.4);
  margin-bottom: 2px;
}

.noteit-card-meta {
  font-family: 'Caveat', cursive;
  font-size: 11px;
  color: rgba(60, 50, 20, 0.35);
  margin-top: 4px;
}

/* ── PRIORITY FARBEN (kein Badge, nur Farbe) ─── */
.noteit-card.p0 {
  background: #ffe45e;
}

.noteit-card.p1 {
  background: #ffa726;
  border-left: 4px solid #bf360c;
}

.noteit-card.p2 {
  background: #ef5350;
  border-left: 4px solid #7f0000;
  box-shadow:
    2px 4px 0 rgba(0, 0, 0, 0.22),
    0 0 16px rgba(239, 83, 80, 0.2),
    inset 0 -40px 40px -30px rgba(0, 0, 0, 0.08);
}
.noteit-card.p2 .noteit-textarea {
  color: #fff;
}
.noteit-card.p2 .noteit-location,
.noteit-card.p2 .noteit-card-meta {
  color: rgba(255, 255, 255, 0.6);
}

/* Legacy: alte priority-Klassen auf Pinwand */
.noteit-card.priority-0 {
  background: #ffe45e;
}
.noteit-card.priority-1 {
  background: #ffa726;
  border-left: 4px solid #bf360c;
}
.noteit-card.priority-2 {
  background: #ef5350;
  border-left: 4px solid #7f0000;
}

/* ── SWIPE-LAYER (versteckt hinter der Card) ─── */
.noteit-swipe-bg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  z-index: 0;
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.15s;
}
.noteit-swipe-bg.visible {
  opacity: 1;
}

.noteit-swipe-left {
  background: #2563eb;
  color: white;
  justify-content: flex-end;
  padding-right: 16px;
}
.noteit-swipe-right {
  background: #16a34a;
  color: white;
  justify-content: flex-start;
  padding-left: 16px;
}

/* ── SWIPE CONTENT (die Card selbst) ─────────── */
.noteit-card-inner {
  position: relative;
  z-index: 2;
  background: inherit;
  transition: transform 0.1s linear;
}
.noteit-card-inner.snapping {
  transition: transform 0.3s ease;
}

/* ── GEWERK-CHIPS ─ */
.noteit-gewerk-tray {
  display: none;
  flex-wrap: wrap;
  gap: 5px;
  padding: 8px 0 0;
}
.noteit-gewerk-tray.open {
  display: flex;
}
.noteit-gewerk-chip {
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 11px;
  padding: 4px 10px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.15s;
  font-weight: 500;
  color: #1a1400;
}
.noteit-gewerk-chip:active,
.noteit-gewerk-chip.selected {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
}

/* ── STEMPEL (minimiert) ──── */
.noteit-stamp-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2563eb;
  display: inline-block;
  margin-right: 3px;
}
.noteit-stamp-row {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 4px;
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 9px;
  color: rgba(0, 0, 0, 0.35);
  font-weight: 500;
}

/* ── ERLEDIGT ANIMATION ──────────────────────── */
@keyframes noteitSlideOut {
  0% {
    transform: translateX(0);
    opacity: 1;
  }
  100% {
    transform: translateX(120%);
    opacity: 0;
  }
}
.noteit-card.dismissed {
  animation: noteitSlideOut 0.4s ease-in forwards;
  pointer-events: none;
}

/* ── NEUER ZETTEL ───────────── */
.noteit-add {
  text-align: center;
  padding: 12px;
  cursor: pointer;
  font-family: 'Caveat', cursive;
  font-size: 16px;
  color: rgba(0, 0, 0, 0.2);
  transition: color 0.15s;
  max-width: 420px;
}
.noteit-add:hover {
  color: rgba(0, 0, 0, 0.5);
}

/* ── ARCHIV ─────────── */
.noteit-archiv-summary {
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 11px;
  color: #888;
  text-align: center;
  padding: 8px;
  cursor: pointer;
  transition: color 0.15s;
  max-width: 420px;
}
.noteit-archiv-summary:hover {
  color: #333;
}

.noteit-archiv-panel {
  display: none;
  padding-top: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  max-width: 420px;
}
.noteit-archiv-panel.open {
  display: block;
}
.noteit-archiv-item {
  background: #f5f5f0;
  padding: 8px 12px;
  margin-bottom: 4px;
  opacity: 0.6;
  font-family: 'Kalam', cursive;
  font-size: 13px;
  color: #333;
  line-height: 20px;
}
.noteit-archiv-meta {
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 9px;
  color: #aaa;
  margin-bottom: 2px;
}

.noteit-norm-hint {
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 10px;
  color: #b45309;
  margin-top: 4px;
  line-height: 1.3;
}
