/* Notes V2 Styling - Console Ready */

.notes-v2 {
  height: 100%;
  display: flex;
  flex-direction: column;
  color: var(--text);
  overflow: hidden;
  background: var(--bg);
  font-family: 'Poppins', sans-serif;
}

.notes-v2-header {
  padding: 24px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--strans);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  z-index: 10;
}

.notes-v2-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
}

.notes-v2-body {
  flex: 1;
  overflow-y: auto;
  padding: 40px;
}

.notes-v2-section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 48px 0 24px;
  opacity: 0.9;
  letter-spacing: -0.01em;
}

/* Notebook Cards (Skeuomorphic & Premium) */
.notebook-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 40px;
}

.notebook-card {
  position: relative;
  width: 170px;
  height: 230px;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.2, 1, 0.3, 1), box-shadow 0.4s ease;
  perspective: 1200px;
}

.notebook-card:hover {
  transform: translateY(-12px) rotateY(-8deg) scale(1.02);
}

.notebook-cover {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--card-bg, #333) 0%, color-mix(in srgb, var(--card-bg, #333), #000 15%) 100%);
  border-radius: 6px 24px 24px 6px;
  box-shadow:
    -6px 0 0 rgba(0,0,0,0.3),
    8px 12px 32px rgba(0,0,0,0.5),
    inset 2px 2px 0 rgba(255,255,255,0.15);
  display: flex;
  flex-direction: column;
  padding: 28px;
  overflow: hidden;
}

.notebook-cover::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 4px;
  background: rgba(0,0,0,0.2);
  box-shadow: 1px 0 0 rgba(255,255,255,0.08);
}

.notebook-label {
  background: rgba(255,255,255,0.95);
  padding: 10px;
  border-radius: 4px;
  color: #111;
  font-weight: 800;
  font-size: 13px;
  text-align: center;
  margin-top: 48px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.notebook-meta {
  margin-top: auto;
  color: rgba(255,255,255,0.8);
  font-size: 12px;
  font-weight: 600;
}

.notebook-menu-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0,0,0,0.3);
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 0.3s;
  color: #fff;
  border: none;
  cursor: pointer;
}

.notebook-card:hover .notebook-menu-btn {
  opacity: 1;
}

/* Note Grids & Autofill */
.notes-grid {
  display: grid;
  gap: 20px;
}

.notes-grid.mode-grid {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.notes-grid.mode-list {
  grid-template-columns: 1fr;
}

.notes-grid.mode-autofill {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  grid-auto-rows: min-content;
}

.note-v2-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.note-v2-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background: var(--primary);
  opacity: 0;
  transition: opacity 0.3s;
}

.note-v2-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.2);
}

.note-v2-card:hover::before {
  opacity: 1;
}

.note-v2-title {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.note-v2-preview {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Sidebar & Console UI */
.notes-sidebar-mini {
  width: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: 32px 0;
  border-left: 1px solid var(--line);
  background: var(--side);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

.notes-sidebar-item {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
}

.notes-sidebar-item:hover {
  background: var(--strans);
  color: var(--text);
  transform: scale(1.05);
}

.notes-sidebar-item.active {
  background: var(--primary-faded);
  color: var(--primary);
  border-color: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.2);
}

.notes-sidebar-item i {
  font-size: 22px;
}

.notes-sidebar-expanded {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  height: 100%;
  overflow-y: auto;
}

.sidebar-section-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* Shared Empty State Animation */
.shared-empty {
  padding: 80px 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  background: var(--strans);
  border-radius: 32px;
  border: 1px dashed var(--line);
}

.shared-empty-visual {
  width: 160px;
  height: 160px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* Editor Adjustments */
.note-editor-v2 {
  max-width: 900px;
  margin: 0 auto;
  min-height: 70vh;
}

.note-title-input {
  background: transparent;
  border: none;
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  width: 100%;
  outline: none;
  margin-bottom: 24px;
}

.note-title-input::placeholder {
  color: var(--text-muted);
  opacity: 0.3;
}

.note-attachments-stage {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  padding-top: 40px;
  position: relative;
  min-height: 400px;
}

/* Animations */
.notes-view {
  animation: notes-in 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes notes-in {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
