/* ── NOTES ── */
.note {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border-md);
  border-bottom-color: rgba(0,0,0,0.35);
  border-radius: 13px;
  z-index: 10; cursor: grab;
  display: flex; flex-direction: column;
  box-shadow:
    0 1px 0 rgba(0,0,0,0.4),
    0 4px 18px rgba(0,0,0,0.45),
    0 1px 4px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.09);
  transition: box-shadow 0.18s, border-color 0.18s, opacity 0.22s, transform 0.15s;
  min-width: 140px; min-height: 80px;
  user-select: none;
}
.note:hover {
  border-color: var(--border-hi);
  border-bottom-color: rgba(0,0,0,0.45);
  box-shadow:
    0 1px 0 rgba(0,0,0,0.45),
    0 10px 32px rgba(0,0,0,0.6),
    0 3px 8px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.12);
  z-index: 20;
  transform: translateY(-2px);
}
.note.dragging {
  cursor: grabbing; z-index: 40;
  box-shadow:
    0 2px 0 rgba(0,0,0,0.5),
    0 20px 54px rgba(0,0,0,0.7),
    0 6px 16px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.13);
  transform: translateY(-5px) scale(1.015);
}
.note.selected {
  border-color: var(--accent-border);
  border-bottom-color: rgba(123,104,238,0.5);
  box-shadow:
    0 1px 0 rgba(0,0,0,0.45),
    0 0 0 2px var(--accent-soft),
    0 8px 28px rgba(0,0,0,0.55),
    inset 0 1px 0 rgba(255,255,255,0.11);
  z-index: 25;
}
.note.blocked { opacity: 0.32; transform: none !important; }
.note.completed .note-body { text-decoration: line-through; color: var(--text-dim); }

/* Light-mode shadow overrides (no dark inset on white cards) */
html.light .note {
  border-bottom-color: rgba(0,0,0,0.13);
  box-shadow:
    0 1px 0 rgba(0,0,0,0.1),
    0 4px 16px rgba(0,0,0,0.10),
    0 1px 3px rgba(0,0,0,0.07),
    inset 0 1px 0 rgba(255,255,255,0.7);
}
html.light .note:hover {
  border-bottom-color: rgba(0,0,0,0.18);
  box-shadow:
    0 1px 0 rgba(0,0,0,0.12),
    0 10px 28px rgba(0,0,0,0.13),
    0 2px 6px rgba(0,0,0,0.08),
    inset 0 1px 0 rgba(255,255,255,0.8);
}
html.light .note.dragging {
  border-bottom-color: rgba(0,0,0,0.2);
  box-shadow:
    0 2px 0 rgba(0,0,0,0.14),
    0 20px 48px rgba(0,0,0,0.18),
    0 6px 14px rgba(0,0,0,0.10),
    inset 0 1px 0 rgba(255,255,255,0.85);
}

/* full-note colour fill */
.note-fill {
  position: absolute; inset: 0;
  border-radius: 13px;
  opacity: 0.11;
  z-index: -1;
  pointer-events: none;
  transition: background 0.2s, opacity 0.2s;
}
.note:hover .note-fill { opacity: 0.17; }
.note.selected .note-fill { opacity: 0.21; }
.note.blocked .note-fill { opacity: 0.04; }

/* accent stripe */
.note-accent {
  height: 5px; border-radius: 13px 13px 0 0;
  flex-shrink: 0; transition: background 0.2s;
}

/* inner content — subtle top-to-bottom gradient for depth */
.note-inner {
  padding: 7px 10px 10px; flex: 1;
  display: flex; flex-direction: column; gap: 0;
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,0.025) 0%, transparent 55%);
  border-radius: 0 0 13px 13px;
}
html.light .note-inner { background: linear-gradient(180deg, rgba(255,255,255,0.6) 0%, transparent 55%); }

/* topbar row: just the burger, right-aligned */
.note-topbar {
  display: flex; align-items: center; justify-content: flex-end;
  margin-bottom: 4px; position: relative;
}

.burger-btn {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 2.5px;
  width: 22px; height: 22px; border-radius: 5px;
  background: none; border: none;
  opacity: 0; transition: opacity 0.14s, background 0.12s;
  padding: 4px; flex-shrink: 0;
}
.note:hover .burger-btn { opacity: 1; }
.burger-btn:hover { background: var(--surface3); opacity: 1 !important; }
.burger-bar { width: 11px; height: 1.4px; background: var(--text-muted); border-radius: 2px; }

/* textarea — Space Grotesk for a modern feel */
.note-body {
  font-family: var(--font-note); font-size: 13px; font-weight: 400; line-height: 1.65;
  color: var(--text); background: none; border: none; outline: none;
  resize: none; flex: 1; min-height: 36px; width: 100%;
  cursor: text; caret-color: var(--accent);
  user-select: text;
  letter-spacing: 0.01em;
}
.note-body::placeholder { color: var(--text-dim); font-style: italic; font-weight: 300; }
.note-body::-webkit-scrollbar { width: 3px; }
.note-body::-webkit-scrollbar-thumb { background: var(--surface4); border-radius: 2px; }

/* resize handle */
.resize-handle {
  position: absolute; right: 0; bottom: 0;
  width: 18px; height: 18px; cursor: se-resize;
  display: flex; align-items: flex-end; justify-content: flex-end;
  padding: 3px; opacity: 0; transition: opacity 0.14s;
  border-radius: 0 0 13px 0;
}
.note:hover .resize-handle { opacity: 0.35; }
.resize-handle:hover { opacity: 0.85 !important; }
.resize-handle svg { width: 8px; height: 8px; color: var(--text-muted); }
