/* ── NOTES — DIGITALKIT ── */

.note-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 1rem;
  align-items: flex-start;
}
.note-toolbar textarea {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  font-family: 'Noto Sans Thai', sans-serif;
  font-size: 13px;
  padding: 13px 15px;
  outline: none;
  resize: vertical;
  min-height: 88px;
  transition: border-color .2s, box-shadow .2s, background .2s;
  line-height: 1.7;
}
.note-toolbar textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-s);
  background: var(--surface2);
}
.note-toolbar textarea::placeholder { color: var(--dim2); }

/* Color picker */
.note-color-pick {
  display: flex;
  gap: 7px;
  margin-bottom: 1rem;
}
.note-color-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  border: 2.5px solid transparent;
  transition: transform .15s, box-shadow .15s;
}
.note-color-dot:hover { transform: scale(1.25); }
.note-color-dot.active {
  transform: scale(1.2);
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px currentColor;
}

/* Sort row */
.note-sort-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}
.note-sort-btn {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--dim2);
  background: none;
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 99px;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.note-sort-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Grid */
.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 10px;
  margin-top: .5rem;
}

/* Card */
.note-card {
  border-radius: 16px;
  padding: 16px;
  position: relative;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  border: 1px solid;
  transition: transform .2s cubic-bezier(.22, 1, .36, 1), box-shadow .2s;
}
.note-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
}

.note-card-text {
  font-size: 13px;
  line-height: 1.7;
  flex: 1;
  white-space: pre-wrap;
  word-break: break-word;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
}
.note-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}
.note-card-date {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  opacity: .45;
  font-weight: 500;
  letter-spacing: .3px;
}
.note-del {
  background: none;
  border: none;
  opacity: 0;
  cursor: pointer;
  font-size: 13px;
  transition: opacity .2s;
  padding: 0;
  line-height: 1;
}
.note-card:hover .note-del { opacity: .7; }
.note-del:hover { opacity: 1 !important; }

/* Responsive */
@media (max-width: 640px) {
  .notes-grid {
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  }
}