/* ============================================================
   메모장 — 우측 갤럭시 엣지 위젯 8번째 (panel.css)
   ============================================================
   톤: 갤럭시 단색 (Sky/Indigo) — 실장님 명시
   특징: 포스트잇 느낌 카드 + 자동 저장 + 핀 + 빈 카드 시작
   ============================================================ */

.notepad-section {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 12px;
  padding: 14px 14px 18px;
  box-sizing: border-box;
}

/* ─── 헤더 (프로젝트 표시 + 새 메모 버튼) ─── */
.np-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: linear-gradient(135deg, #f0f9ff 0%, #eef2ff 100%);
  border: 1px solid #c7d2fe;
  border-radius: 14px;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.np-scope {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.np-scope-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}
.np-scope-value {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.np-new-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: linear-gradient(135deg, #0284c7 0%, #4f46e5 100%);
  color: #fff;
  border: 0;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.np-new-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(79, 70, 229, 0.35);
}
.np-new-btn:active { transform: translateY(0); }
.np-new-btn svg { stroke: #fff; }

/* ─── 메모 목록 ─── */
.np-list {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding: 2px 2px 6px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
.np-list::-webkit-scrollbar { width: 6px; }
.np-list::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

/* ─── 메모 카드 (포스트잇) ─── */
.np-card {
  position: relative;
  background: linear-gradient(180deg, #fafbff 0%, #f1f5f9 100%);
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 10px 12px 10px 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.np-card:hover {
  border-color: #818cf8;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.12);
}
.np-card.is-pinned {
  background: linear-gradient(180deg, #eef2ff 0%, #e0e7ff 100%);
  border-color: #818cf8;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.18);
}

.np-card-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
}
.np-card-meta {
  font-size: 10px;
  color: #94a3b8;
  font-weight: 600;
}
.np-card-meta.is-saving { color: #4f46e5; }
.np-card-meta.is-saved { color: #16a34a; }

.np-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.np-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #64748b;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.np-icon-btn:hover {
  background: rgba(79, 70, 229, 0.08);
  border-color: #c7d2fe;
  color: #4f46e5;
}
.np-icon-btn.is-active {
  background: rgba(79, 70, 229, 0.12);
  border-color: #818cf8;
  color: #4f46e5;
}
.np-icon-btn.is-danger:hover {
  background: rgba(239, 68, 68, 0.08);
  border-color: #fecaca;
  color: #dc2626;
}

.np-textarea {
  width: 100%;
  min-height: 80px;
  max-height: 240px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.55;
  color: #0f172a;
  resize: vertical;
  box-sizing: border-box;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.np-textarea:focus {
  outline: none;
  border-color: #818cf8;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.18);
}
.np-textarea::placeholder { color: #94a3b8; }

/* ─── 빈 상태 ─── */
.np-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px 20px;
  color: #94a3b8;
  text-align: center;
}
.np-empty-icon {
  width: 44px;
  height: 44px;
  color: #c7d2fe;
}
.np-empty-text { font-size: 13px; font-weight: 600; color: #64748b; }
.np-empty-sub { font-size: 11px; color: #94a3b8; }

/* ─── 로딩·토스트 ─── */
.np-loading {
  padding: 40px 20px;
  text-align: center;
  color: #64748b;
  font-size: 12px;
}

.np-toast {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  padding: 8px 14px;
  background: #1e293b;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  border-radius: 100px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.np-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}
