/* altcss/note-card.css */
note-card {
  display: inline-block;
  width: 100%;
  margin-bottom: 16px;
  break-inside: avoid;
  position: relative;
  z-index: 1;
}

@media (max-width: 768px) {
  note-card {
    margin-bottom: 12px;
  }
}

note-card .card {
  background: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  border: 2px solid var(--border-color);
}

note-card .card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-hover-shadow);
  border-color: var(--accent-color);
}

note-card .note-preview-container {
  width: 100%;
  min-height: 180px;
  max-height: 180px;
  overflow: hidden;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

note-card .note-content-preview {
  margin: 0;
  padding: 12px;
  font-family: 'Courier New', Consolas, Monaco, monospace;
  font-size: 11px;
  line-height: 1.4;
  color: var(--text-secondary);
  white-space: pre;
  overflow: hidden;
  height: 100%;
}

note-card .note-content-preview code {
  font-family: inherit;
  background: none;
}

note-card .note-info {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

note-card .note-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

note-card .note-badge {
  display: inline-block;
  background: #f39c12;
  color: white;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

note-card .note-language-icon {
  font-size: 18px;
  opacity: 0.8;
}

note-card .note-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

note-card .note-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: var(--text-tertiary);
}

note-card .note-language {
  background: var(--bg-primary);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 500;
}

note-card .note-date {
  opacity: 0.7;
}

/* Drag and drop styles */
note-card.drag-over .card {
  border: 3px solid var(--accent-color);
  box-shadow: 0 0 20px rgba(52, 152, 219, 0.4);
  transform: translateY(-4px) scale(1.02);
}

note-card.link-created .card {
  animation: linkCreated 1s ease-out;
}

@keyframes linkCreated {
  0% {
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
  }
  50% {
    box-shadow: 0 0 20px 10px rgba(46, 204, 113, 0.4);
    border-color: #2ecc71;
  }
  100% {
    box-shadow: var(--shadow-md);
  }
}