/* ============================================================
   DAFTER MAGED — Notes Page
   ============================================================ */

/* ── Grid ── */
.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-4);
}

/* ── Note Card ── */
.note-card {
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  min-height: 180px;
  display: flex; flex-direction: column; gap: var(--space-3);
  cursor: pointer;
  transition: all var(--transition-base);
  border: 1.5px solid transparent;
  position: relative;
  overflow: hidden;
}
.note-card:hover {
  transform: translateY(-4px) rotate(0.5deg);
  box-shadow: var(--shadow-lg);
  border-color: rgba(255,255,255,.3);
}
.note-card::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(255,255,255,.07);
  opacity: 0;
  transition: opacity var(--transition-fast);
}
.note-card:hover::before { opacity: 1; }

/* Note colors */
.note-yellow { background: #FEF9C3; color: #713F12; }
.note-blue   { background: #DBEAFE; color: #1E3A8A; }
.note-green  { background: #DCFCE7; color: #14532D; }
.note-pink   { background: #FCE7F3; color: #831843; }
.note-purple { background: #EDE9FE; color: #4C1D95; }
.note-orange { background: #FED7AA; color: #7C2D12; }
.note-gray   { background: var(--color-surface-2); color: var(--color-text); border-color: var(--color-border); }

[data-theme="dark"] .note-yellow { background: #422006; color: #FDE68A; }
[data-theme="dark"] .note-blue   { background: #172554; color: #BFDBFE; }
[data-theme="dark"] .note-green  { background: #052E16; color: #BBF7D0; }
[data-theme="dark"] .note-pink   { background: #500724; color: #FBCFE8; }
[data-theme="dark"] .note-purple { background: #2E1065; color: #DDD6FE; }
[data-theme="dark"] .note-orange { background: #431407; color: #FED7AA; }
[data-theme="dark"] .note-gray   { background: var(--color-surface-2); color: var(--color-text); }

.note-title {
  font-size: var(--text-base);
  font-weight: var(--font-weight-bold);
  line-height: 1.3;
  word-break: break-word;
}
.note-body {
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  flex: 1;
  opacity: .85;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  white-space: pre-wrap;
}
.note-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto;
  font-size: var(--text-xs); opacity: .6;
}
.note-actions {
  display: flex; gap: var(--space-1);
  opacity: 0; transition: opacity var(--transition-fast);
}
.note-card:hover .note-actions { opacity: 1; }
.note-action {
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border: none;
  background: rgba(0,0,0,.1);
  color: currentColor;
  transition: background var(--transition-fast);
}
.note-action:hover { background: rgba(0,0,0,.2); }

/* ── Note Editor Modal ── */
.note-editor-body {
  display: flex; flex-direction: column; gap: var(--space-4);
}
.note-title-input {
  width: 100%;
  font-size: var(--text-xl);
  font-weight: var(--font-weight-bold);
  background: none; border: none;
  color: var(--color-text);
  padding: 0;
}
.note-title-input::placeholder { color: var(--color-text-subtle); }
.note-title-input:focus { outline: none; }

.note-content-input {
  width: 100%;
  min-height: 200px;
  max-height: 50vh;
  resize: vertical;
  background: none; border: none;
  color: var(--color-text);
  font-size: var(--text-base);
  line-height: var(--leading-loose);
  padding: 0;
  font-family: var(--font-family);
}
.note-content-input::placeholder { color: var(--color-text-subtle); }
.note-content-input:focus { outline: none; }

/* Color picker row in modal */
.note-color-row {
  display: flex; gap: var(--space-2); flex-wrap: wrap;
  padding: var(--space-3) 0;
  border-top: 1px solid var(--color-border-light);
}
.note-color-btn {
  width: 28px; height: 28px; border-radius: 50%;
  cursor: pointer; border: 2px solid transparent;
  transition: all var(--transition-fast);
}
.note-color-btn:hover     { transform: scale(1.15); }
.note-color-btn.selected  { border-color: var(--color-text); transform: scale(1.1); }

/* ── Empty / Search ── */
.notes-empty {
  grid-column: 1 / -1;
  padding: var(--space-16) var(--space-8);
  display: flex; flex-direction: column;
  align-items: center; gap: var(--space-4); text-align: center;
}
.notes-search-row {
  margin-bottom: var(--space-5);
}

@media (max-width: 640px) {
  .notes-grid { grid-template-columns: 1fr 1fr; gap: var(--space-3); }
  .note-card  { min-height: 140px; }
}
@media (max-width: 400px) {
  .notes-grid { grid-template-columns: 1fr; }
}
