/* ═══════════════════════════════════════════════════════════════
   Anchor HQ — Notes Section (The Journal)
   Stardew Valley parchment & ink theme with quill-style inputs,
   sticky notes, and status badges.
   ═══════════════════════════════════════════════════════════════ */

/* ── Note Form Container ─────────────────────────────────────── */
.note-form-container {
  margin-bottom: 24px;
  padding: 16px;
  background: 
    linear-gradient(135deg, var(--parchment, #f4eed6) 0%, var(--parchment-warm, #ede4c9) 100%);
  border: 3px solid var(--wood, #6b4423);
  border-radius: var(--radius, 8px);
  box-shadow: 
    3px 3px 0 var(--wood-dark, #3a2415),
    inset 0 0 12px rgba(107, 68, 35, 0.08);
  position: relative;
}

.note-form-container::before {
  content: '✒️';
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 18px;
  opacity: 0.6;
}

.note-form {
  display: flex;
  gap: 12px;
  align-items: center;
}

.note-input {
  flex: 1;
  background: var(--bg-soft, #f8f5f0);
  border: 2px solid var(--wood-light, #8b6f47);
  border-radius: 4px;
  padding: 8px 12px;
  font-family: 'Pixelify Sans', monospace;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text, #2a1f14);
  box-shadow: inset 2px 2px 4px rgba(107, 68, 35, 0.1);
  transition: all 0.2s ease;
}

.note-input:focus {
  outline: none;
  border-color: var(--primary, #6366f1);
  box-shadow: 
    inset 2px 2px 4px rgba(107, 68, 35, 0.1),
    0 0 0 2px rgba(99, 102, 241, 0.2);
}

.note-input::placeholder {
  color: var(--muted, #8b6f47);
  font-style: italic;
}

.note-submit-btn {
  background: var(--wood, #6b4423);
  color: var(--parchment, #f4eed6);
  border: 2px solid var(--wood-dark, #3a2415);
  border-radius: 4px;
  padding: 8px 16px;
  font-family: 'Pixelify Sans', monospace;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 2px 2px 0 var(--wood-dark, #3a2415);
}

.note-submit-btn:hover {
  background: var(--wood-light, #8b6f47);
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--wood-dark, #3a2415);
}

.note-submit-btn:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--wood-dark, #3a2415);
}

/* ── Notes Container ─────────────────────────────────────────── */
.notes-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 768px) {
  .notes-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.notes-section {
  background: var(--bg, #faf8f3);
  border: 3px solid var(--wood-light, #8b6f47);
  border-radius: var(--radius, 8px);
  overflow: hidden;
  box-shadow: 2px 2px 0 var(--wood-dark, #3a2415);
}

.notes-section h3 {
  background: 
    linear-gradient(135deg, var(--wood, #6b4423) 0%, var(--wood-dark, #3a2415) 100%);
  color: var(--parchment, #f4eed6);
  margin: 0;
  padding: 12px 16px;
  font-family: 'Pixelify Sans', monospace;
  font-size: 14px;
  font-weight: 600;
  border-bottom: 2px solid var(--wood-dark, #3a2415);
}

.notes-list {
  padding: 12px;
  max-height: 400px;
  overflow-y: auto;
}

/* ── Note Items ─────────────────────────────────────────────── */
.note-item {
  background: var(--bg-soft, #f8f5f0);
  border: 2px solid var(--wood-light, #8b6f47);
  border-radius: 6px;
  margin-bottom: 12px;
  padding: 12px;
  position: relative;
  transition: all 0.2s ease;
  box-shadow: 1px 1px 2px rgba(107, 68, 35, 0.1);
}

.note-item:last-child {
  margin-bottom: 0;
}

.note-item:hover {
  border-color: var(--primary, #6366f1);
  box-shadow: 2px 2px 4px rgba(99, 102, 241, 0.1);
}

/* User notes styling */
.user-note {
  background: 
    linear-gradient(135deg, var(--parchment, #f4eed6) 0%, var(--parchment-warm, #ede4c9) 100%);
  border-color: var(--wood, #6b4423);
}

.user-note::before {
  content: '📝';
  position: absolute;
  top: 8px;
  right: 32px;
  font-size: 12px;
  opacity: 0.7;
}

/* Auto notes styling */
.auto-note {
  background: 
    linear-gradient(135deg, var(--bg-soft, #f8f5f0) 0%, var(--bg, #faf8f3) 100%);
  border-color: var(--wood-light, #8b6f47);
}

.auto-note::before {
  content: '🤖';
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 12px;
  opacity: 0.7;
}

/* ── Note Content ─────────────────────────────────────────────── */
.note-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.note-title {
  font-family: 'Pixelify Sans', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #2a1f14);
  line-height: 1.3;
}

.note-text {
  font-family: 'Inter', system-ui;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-soft, #4a453e);
  word-wrap: break-word;
}

.note-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.note-status {
  font-family: 'Pixelify Sans', monospace;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.note-status.pending {
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary, #3b82f6);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.note-status.seen {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning, #f59e0b);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.note-status.processed {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success, #10b981);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.note-time, .note-source {
  font-family: 'Inter', system-ui;
  font-size: 11px;
  color: var(--muted, #8b6f47);
  font-style: italic;
}

/* ── Note Tags ─────────────────────────────────────────────────── */
.note-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.note-tag {
  background: var(--wood-light, #8b6f47);
  color: var(--parchment, #f4eed6);
  font-family: 'Pixelify Sans', monospace;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 2px;
  border: 1px solid var(--wood-dark, #3a2415);
}

/* ── Note Actions ─────────────────────────────────────────────── */
.note-status-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--bg, #faf8f3);
  border: 1px solid var(--wood-light, #8b6f47);
  border-radius: 3px;
  width: 20px;
  height: 20px;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.note-status-btn:hover {
  background: var(--wood-light, #8b6f47);
  color: var(--parchment, #f4eed6);
  transform: rotate(90deg);
}

/* ── Empty States ─────────────────────────────────────────────── */
.notes-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--muted, #8b6f47);
  font-style: italic;
  font-size: 13px;
  line-height: 1.5;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 640px) {
  .note-form {
    flex-direction: column;
    gap: 8px;
  }

  .note-submit-btn {
    width: 100%;
  }

  .notes-list {
    max-height: 300px;
  }
}