/* Entry Card Common Styles */

/* Entry Input Placeholder */
.entry-input-placeholder {
  border: 2px solid transparent;
  transition: all 0.3s ease;
  cursor: pointer;
  background: linear-gradient(white, white) padding-box,
              linear-gradient(135deg, #198754, #20c997) border-box;
  border: 2px solid transparent;
}

.entry-input-placeholder:hover {
  border-color: #198754;
  box-shadow: 0 0.25rem 0.75rem rgba(25, 135, 84, 0.15);
  transform: translateY(-2px);
}

[data-theme="dark"] .entry-input-placeholder {
  background: linear-gradient(var(--card-bg), var(--card-bg)) padding-box,
              linear-gradient(135deg, #5eead4, #3b82f6) border-box;
}

[data-theme="dark"] .entry-input-placeholder:hover {
  border-color: #5eead4;
  box-shadow: 0 0.25rem 0.75rem rgba(94, 234, 212, 0.2);
}

.placeholder-avatar {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--bs-success);
  flex-shrink: 0;
}

[data-theme="dark"] .placeholder-avatar {
  color: #5eead4;
}

.placeholder-input {
  color: #6c757d;
  cursor: pointer;
  border: 1px solid #dee2e6;
  background-color: #f8f9fa;
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  transition: all 0.2s ease;
  user-select: none;
}

.placeholder-input:hover {
  background-color: #e9ecef;
  border-color: #198754;
}

[data-theme="dark"] .placeholder-input {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

[data-theme="dark"] .placeholder-input:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: #5eead4;
}

/* Entry Card Common Styles */

/* Entry list container */
.entry-list-container {
  padding: 0.75rem;
}

.entry-list-container .entry-card:last-child {
  margin-bottom: 0 !important;
}

/* Entry Preview Card */
.entry-preview {
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  cursor: pointer;
}

.entry-preview:hover {
  border-left-color: var(--user-primary-color, var(--bs-success, #198754));
  transform: translateX(3px);
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .entry-preview:hover {
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.3);
}

.entry-preview-content {
  line-height: 1.6em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #6c757d;
  font-size: 0.925rem;
}

.entry-preview-footer {
  background-color: rgba(0, 0, 0, 0.02);
  margin: 0 -1rem -1rem;
  padding: 0.5rem 1rem;
  border-radius: 0 0 0.375rem 0.375rem;
}

[data-theme="dark"] .entry-preview-footer {
  background-color: rgba(255, 255, 255, 0.03);
}

/* Entry card body padding */
.entry-preview .card-body {
  padding: 1rem !important;
}

.entry-card.entry-preview h6.card-title {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: inherit;
}

.entry-card.entry-preview h6.card-title i {
  font-size: 0.875rem;
}

/* Full mode entry card styles */
.entry-card .vote-buttons {
  min-width: 40px;
}

.entry-card .vote-btn {
  padding: 0.25rem 0.5rem;
  color: #6c757d;
  text-decoration: none;
}

.entry-card .vote-btn:hover {
  color: var(--bs-primary);
}

.entry-card .vote-btn.active {
  color: var(--bs-success);
}

.entry-card .vote-btn.downvote-btn.active {
  color: var(--bs-danger);
}

.entry-card .favorite-btn {
  padding: 0.25rem 0.5rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.entry-card .favorite-btn:hover {
  transform: scale(1.2);
}

/* Favorite animation */
@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.3); }
  50% { transform: scale(1.1); }
  75% { transform: scale(1.2); }
}

.entry-card .favorite-btn.favoriting {
  animation: heartBeat 0.6s ease;
}

.entry-card .favorite-btn.unfavoriting {
  animation: heartBeat 0.4s ease;
}

/* Favorite particles */
.favorite-particle {
  position: fixed;
  font-size: 1.2rem;
  pointer-events: none;
  animation: particleFloat 1s ease-out forwards;
  z-index: 9999;
}

@keyframes particleFloat {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(var(--tx), var(--ty)) scale(0.5);
  }
}

/* Media items in entries */
.entry-card .media-items .card {
  transition: transform 0.2s ease;
}

.entry-card .media-items .card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Markdown content styling */
.markdown-content {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.markdown-content a {
  color: var(--bs-primary);
  text-decoration: none;
}

.markdown-content a:hover {
  text-decoration: underline;
}

.markdown-content code {
  background-color: #f8f9fa;
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
}

[data-theme="dark"] .markdown-content code {
  background-color: #2d3748;
}

.markdown-content pre {
  background-color: #f8f9fa;
  padding: 1rem;
  border-radius: 0.375rem;
  overflow-x: auto;
}

[data-theme="dark"] .markdown-content pre {
  background-color: #2d3748;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .entry-preview .card-body {
    padding: 0.875rem !important;
  }
  
  .entry-card .vote-buttons {
    min-width: 35px;
  }
  
  .entry-card .vote-score {
    font-size: 0.875rem;
  }
}

