/* Voting and Multi-Definition UI Styles */


/* Definitions container and title */
.definitions-container {
  margin-bottom: 2rem;
}

.definitions-title {
  font-family: "Bebas Neue", sans-serif;
  font-size: 1.5rem;
  font-weight: bold;
  color: #2d3748;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e2e8f0;
  letter-spacing: 1px;
}

/* Dark mode for definitions title */
body.dark-mode .definitions-title {
  color: #e2e8f0;
  border-bottom-color: #4a5568;
}

/* Modal definitions also use Urban Dictionary style */
.term-modal .definitions-list {
  max-width: 100%;
  margin: 0;
}

/* Clean definition items - Urban Dictionary style */
.definition-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 0.8rem;
  padding: 0.6rem;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
  transition: box-shadow 0.2s ease;
}


.definition-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Content area takes up most space */
.definition-content {
  flex: 1;
  min-width: 0; /* Allow text to wrap properly */
}

/* Voting section on the right */
/* Bottom voting layout - Urban Dictionary style */
.definition-votes {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.1rem;
  margin-top: 0.2rem;
}

.definition-text {
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 0.3rem;
  color: #2d3748;
  font-weight: 400;
}

/* Emphasis styling for terms within voting UI definitions */
.definition-text strong {
  font-weight: bold;
  color: #2563eb;
  background: rgba(37, 99, 235, 0.1);
  padding: 0.1rem 0.2rem;
  border-radius: 3px;
}

/* Special emphasis for the main term in voting UI */
.definition-text .term-emphasis {
  font-weight: bold;
  color: #1d4ed8;
  background: rgba(29, 78, 216, 0.15);
  padding: 0.15rem 0.3rem;
  border-radius: 4px;
  font-size: 1.05em;
}

.definition-example {
  font-style: italic;
  color: #4a5568;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  padding-left: 0.8rem;
  border-left: 2px solid #93d0ff;
}

.definition-author {
  font-size: 0.8rem;
  color: #666;
  font-weight: 400;
  margin-bottom: 0.4rem;
  text-align: left;
  width: 100%;
  flex-shrink: 0;
  line-height: 1.3;
}


.vote-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  font-size: 0.9rem;
  border: 1px solid #ccc;
  background: transparent;
  cursor: pointer;
  border-radius: 0; /* Square buttons */
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vote-count {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.8rem;
  background: transparent;
  border: 1px solid #ccc;
  border-radius: 0; /* Square container */
}

.vote-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}

.vote-btn.vote-up {
  color: #28a745;
  border-color: #28a745;
}

.vote-btn.vote-up:hover {
  background: rgba(40, 167, 69, 0.1);
  border-color: #28a745;
}

.vote-btn.vote-down {
  color: #dc3545;
  border-color: #dc3545;
}

.vote-btn.vote-down:hover {
  background: rgba(220, 53, 69, 0.1);
  border-color: #dc3545;
}

/* Voted state styles */
.vote-btn.voted {
  font-weight: bold;
  transform: scale(1.05);
}

.vote-btn.vote-up.voted {
  background: #28a745;
  border-color: #28a745;
  color: white;
}

.vote-btn.vote-down.voted {
  background: #dc3545;
  border-color: #dc3545;
  color: white;
}

/* Share button styling */
.share-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  font-size: 0.9rem;
  border: 1px solid #ccc;
  background: transparent;
  cursor: pointer;
  border-radius: 0; /* Square button */
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6c757d;
}

.share-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
  border-color: #6c757d;
  color: #495057;
}

.net-score {
  font-weight: bold;
  color: #495057;
  font-size: 0.9rem;
}

/* Multiple definitions layout */
.definitions-multiple {
  max-height: 60vh;
  overflow-y: auto;
}

.definition-count {
  text-align: center;
  font-weight: bold;
  color: #6c757d;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #dee2e6;
}

.definition-item {
  margin-bottom: 1.5rem;
  padding: 1rem;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  background: #f8f9fa;
}

.definition-item.primary {
  background: #e7f3ff;
  border-color: #93d0ff;
}

.definition-item.secondary {
  background: #f8f9fa;
}

.definition-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.definition-rank {
  font-weight: bold;
  color: #495057;
  font-size: 0.9rem;
}

.definition-text {
  margin: 0 0 0.5rem 0;
  font-weight: 500;
  line-height: 1.5;
}

.definition-usage {
  margin: 0;
  font-style: italic;
  color: #6c757d;
  font-size: 0.9rem;
}

/* Single definition layout */
.definition-single {
  /* Inherits existing modal styles */
}

/* Dark mode support */
body.dark-mode .definition-votes {
  border-top-color: #444;
}

body.dark-mode .vote-btn {
  background: transparent;
  border-color: #4a5568;
  color: #e2e8f0;
}

body.dark-mode .vote-count {
  background: transparent;
  border-color: #4a5568;
  color: #e2e8f0;
}

body.dark-mode .vote-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}

body.dark-mode .vote-btn.vote-up {
  color: #48bb78;
  border-color: #48bb78;
}

body.dark-mode .vote-btn.vote-up:hover {
  background: rgba(72, 187, 120, 0.1);
  border-color: #48bb78;
}

body.dark-mode .vote-btn.vote-down {
  color: #fc8181;
  border-color: #fc8181;
}

body.dark-mode .vote-btn.vote-down:hover {
  background: rgba(252, 129, 129, 0.1);
  border-color: #fc8181;
}

/* Dark mode voted state styles */
body.dark-mode .vote-btn.vote-up.voted {
  background: #48bb78;
  border-color: #48bb78;
  color: white;
}

body.dark-mode .vote-btn.vote-down.voted {
  background: #fc8181;
  border-color: #fc8181;
  color: white;
}

/* Dark mode share button styling */
body.dark-mode .share-btn {
  background: transparent;
  border-color: #4a5568;
  color: #a0aec0;
}

body.dark-mode .share-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: #a0aec0;
  color: #e2e8f0;
}

body.dark-mode .net-score {
  color: #cbd5e0;
}

body.dark-mode .definition-count {
  color: #a0aec0;
  border-bottom-color: #4a5568;
}

body.dark-mode .definition-item {
  background: #2d3748;
  border-color: #4a5568;
  color: #e2e8f0;
}

body.dark-mode .definition-item.primary {
  background: #2a4365;
  border-color: #3182ce;
}

body.dark-mode .definition-rank {
  color: #cbd5e0;
}

body.dark-mode .definition-usage {
  color: #a0aec0;
}

/* Responsive design */
@media (max-width: 768px) {
  .definitions-list {
    max-width: 100%;
    padding: 0 1rem;
  }
  
  .term-modal .definitions-list {
    padding: 0;
  }
  
  .definition-item {
    gap: 0.5rem;
    padding: 1rem;
  }
  
  .definition-votes {
    flex-direction: row;
    justify-content: center;
    min-width: auto;
  }
  
  
  .definition-example {
    padding-left: 0.75rem;
    font-size: 0.9rem;
  }
}

/* Dark mode for Urban Dictionary-style definitions */
body.dark-mode .definition-item {
  background: #2d3748;
  border-color: #4a5568;
  color: #e2e8f0;
}

body.dark-mode .definition-text {
  color: #e2e8f0;
}

body.dark-mode .definition-example {
  color: #a0aec0;
  border-left-color: #63b3ed;
}

body.dark-mode .definition-author {
  color: #e2e8f0;
  border-top-color: #4a5568;
}

/* Dark mode emphasis styling for voting UI */
body.dark-mode .definition-text strong {
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.2);
}

body.dark-mode .definition-text .term-emphasis {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.25);
}

/* Optimistic update animation for instant feedback */
.vote-count {
  position: relative;
}

.vote-count.vote-updated {
  transform: scale(1.1);
  color: #22c55e !important;
  font-weight: bold;
  background: #d4edda !important;
  border-color: #22c55e !important;
  transition: all 0.2s ease;
}

.vote-count.vote-updated:after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  background: rgba(34, 197, 94, 0.1);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  animation: vote-pulse 0.3s ease-out;
  pointer-events: none;
}

@keyframes vote-pulse {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(2);
    opacity: 0;
  }
}

/* Dark mode optimistic update animation */
body.dark-mode .vote-count.vote-updated {
  color: #48bb78 !important;
  background: #2d5a3d !important;
  border-color: #48bb78 !important;
}

body.dark-mode .vote-count.vote-updated:after {
  background: rgba(72, 187, 120, 0.1);
}
