/* ============================================================
   topdevphone — Notes app
   Card list + borderless editor. Colours come from the shared
   tokens only, so both the dark and the light theme hold up.
   ============================================================ */

/* ---------- search ---------- */
.nt-searchbar {
  position: relative;
  flex: 0 0 auto;
  margin: 0 14px 10px;
}
.nt-searchbar .nt-search-ic {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  display: flex; color: var(--text-tertiary); font-size: 15px; pointer-events: none;
}
.nt-search {
  width: 100%; padding: 10px 12px 10px 36px;
  border: 0; border-radius: 11px; outline: none;
  background: var(--bg-secondary); color: var(--text-primary);
  font-size: 14px; font-family: var(--font);
}
.nt-search::placeholder { color: var(--text-tertiary); }
.nt-search::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }

/* ---------- list ---------- */
.nt-scroll { padding-bottom: 110px; }
.nt-count-line {
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.4px;
  color: var(--text-tertiary); margin: 0 4px 8px;
}
.nt-cards { display: flex; flex-direction: column; gap: 8px; }

.nt-card {
  display: block; width: 100%; text-align: left;
  background: var(--bg-secondary); color: var(--text-primary);
  border-radius: var(--radius-card); padding: 12px 14px;
  transition: transform 0.12s ease, filter 0.12s ease;
}
.nt-card:active { transform: scale(0.985); filter: brightness(1.12); }
[data-theme='light'] .nt-card:active { filter: brightness(0.96); }
.nt-card-title {
  font-size: 15px; font-weight: 700; line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nt-card-preview {
  margin-top: 3px; font-size: 12.5px; line-height: 1.35;
  color: var(--text-secondary);
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.nt-card-time {
  margin-top: 6px; font-size: 11px; font-weight: 600;
  letter-spacing: 0.3px; color: var(--text-tertiary);
}

.nt-empty-sub { margin-top: 6px; font-size: 12px; color: var(--text-tertiary); }

.nt-fail { text-align: center; padding: 54px 26px; color: var(--text-secondary); }
.nt-fail .ic { width: 42px; height: 42px; display: block; margin: 0 auto 12px; opacity: 0.45; }
.nt-fail p { font-size: 13.5px; line-height: 1.45; margin-bottom: 16px; }
.nt-fail .btn-primary { max-width: 200px; margin: 0 auto; }

/* ---------- new-note FAB ---------- */
.nt-fab {
  position: absolute; right: 18px; bottom: 30px; z-index: 12;
  width: 54px; height: 54px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, #ffd60a, #e0a800);
  color: #17170c; font-size: 24px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  transition: transform 0.14s ease;
}
.nt-fab .ic { width: 26px; height: 26px; }
.nt-fab:active { transform: scale(0.9); }

/* ---------- editor ---------- */
.nt-ed-head { gap: 8px; }
.nt-ed-head .ah-back { flex: 0 0 auto; }
.nt-ed-head .nt-danger { color: var(--accent-red); }

.nt-status {
  flex: 1; text-align: center; min-width: 0;
  font-size: 12px; font-weight: 600; letter-spacing: 0.3px;
  color: var(--text-tertiary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color 0.2s ease, opacity 0.2s ease;
}
.nt-status-saving { opacity: 0.75; }
.nt-status-saved { color: var(--accent-green); }
.nt-status-error { color: var(--accent-red); }

.nt-editor {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  padding: 0 16px 16px;
}
.nt-title-input {
  width: 100%; flex: 0 0 auto;
  border: 0; outline: none; background: transparent;
  color: var(--text-primary);
  font-family: var(--font); font-size: 22px; font-weight: 800;
  padding: 2px 0 8px;
}
.nt-title-input::placeholder { color: var(--text-tertiary); font-weight: 700; }

.nt-body-input {
  flex: 1; min-height: 0; width: 100%;
  border: 0; outline: none; resize: none; background: transparent;
  color: var(--text-primary);
  font-family: var(--font); font-size: 15px; line-height: 1.5;
  padding: 8px 0 4px;
  border-top: 1px solid var(--separator);
}
.nt-body-input::placeholder { color: var(--text-tertiary); }
.nt-body-input::-webkit-scrollbar { width: 0; }

.nt-meta {
  flex: 0 0 auto; display: flex; justify-content: space-between; gap: 10px;
  padding-top: 8px; font-size: 11px; color: var(--text-tertiary);
}
