/* 75% Vegan Recipe Comments Widget */
/* Inherits PaperMod theme variables for seamless integration */

.rv-widget {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border, #e0e0e0);
}

.rv-title {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: var(--primary, #4a7c59);
}

/* Recipe Reactions */
.rv-recipe-reactions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  padding: 0.8rem;
  background: var(--entry, #f5f5f5);
  border-radius: 8px;
}

.rv-reactions-label {
  font-size: 0.9rem;
  color: var(--secondary, #666);
  margin-right: 0.5rem;
}

.rv-reaction-btn {
  background: var(--theme, #fff);
  border: 1px solid var(--border, #ddd);
  border-radius: 20px;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.rv-reaction-btn:hover {
  transform: scale(1.1);
  border-color: var(--primary, #4a7c59);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.rv-reaction-count {
  font-size: 0.8rem;
  color: var(--secondary, #666);
}

/* Rating Summary */
.rv-rating-summary {
  margin-bottom: 1.5rem;
}

.rv-avg-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.rv-avg-stars {
  color: #f5a623;
  font-size: 1.3rem;
}

.rv-avg-value {
  font-size: 1.2rem;
  font-weight: bold;
}

.rv-avg-count {
  font-size: 0.9rem;
  color: var(--secondary, #666);
}

.rv-no-ratings {
  color: var(--secondary, #666);
  font-style: italic;
  font-size: 0.9rem;
}

/* Comments List */
.rv-comments-list {
  margin-bottom: 2rem;
}

.rv-comment {
  padding: 1rem;
  margin-bottom: 0.8rem;
  background: var(--entry, #f8f8f8);
  border-radius: 8px;
  border-left: 3px solid transparent;
  transition: border-color 0.2s;
}

.rv-comment:hover {
  border-left-color: var(--primary, #4a7c59);
}

.rv-admin-liked {
  border-left-color: #4a7c59 !important;
  background: linear-gradient(135deg, var(--entry, #f8f8f8), rgba(74, 124, 89, 0.05));
}

.rv-comment-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
}

.rv-comment-name {
  color: var(--content, #333);
}

.rv-liked-badge {
  font-size: 0.9rem;
  title: "Liked by 75% Vegan";
}

.rv-comment-rating {
  color: #f5a623;
  font-size: 0.9rem;
}

.rv-comment-time {
  font-size: 0.8rem;
  color: var(--secondary, #999);
  margin-left: auto;
}

.rv-comment-text {
  margin: 0.4rem 0;
  line-height: 1.5;
  color: var(--content, #333);
}

.rv-comment-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.rv-comment-react {
  background: none;
  border: 1px solid var(--border, #e0e0e0);
  border-radius: 15px;
  padding: 0.2rem 0.6rem;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.rv-comment-react:hover {
  background: var(--entry, #f0f0f0);
  transform: scale(1.05);
}

/* Forms */
.rv-form-wrapper {
  background: var(--entry, #f8f8f8);
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.rv-form-wrapper h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.rv-form-row {
  margin-bottom: 0.8rem;
}

.rv-input, .rv-textarea {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border, #ddd);
  border-radius: 6px;
  background: var(--theme, #fff);
  color: var(--content, #333);
  font-family: inherit;
  font-size: 0.95rem;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.rv-input:focus, .rv-textarea:focus {
  outline: none;
  border-color: var(--primary, #4a7c59);
  box-shadow: 0 0 0 2px rgba(74, 124, 89, 0.1);
}

.rv-textarea {
  resize: vertical;
  min-height: 80px;
}

.rv-rating-input {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.rv-rating-input label {
  font-size: 0.9rem;
  color: var(--secondary, #666);
}

.rv-stars {
  display: inline-flex;
  gap: 2px;
}

.rv-star {
  font-size: 1.5rem;
  color: #ddd;
  user-select: none;
  transition: color 0.15s;
}

.rv-star-filled {
  color: #f5a623;
}

.rv-star:hover {
  color: #f5a623;
}

.rv-form-actions {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.rv-btn {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}

.rv-btn-primary {
  background: #4a7c59;
  color: white;
}

.rv-btn-primary:hover {
  background: #3d6a4b;
  transform: translateY(-1px);
}

.rv-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.rv-btn-secondary {
  background: transparent;
  color: var(--primary, #4a7c59);
  border: 1px solid var(--primary, #4a7c59);
}

.rv-btn-secondary:hover {
  background: rgba(74, 124, 89, 0.05);
}

.rv-form-msg {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  min-height: 1.2rem;
}

.rv-success { color: #4a7c59; }
.rv-error { color: #d32f2f; }

.rv-hint {
  font-size: 0.85rem;
  color: var(--secondary, #666);
  margin-bottom: 1rem;
}

.rv-no-comments {
  color: var(--secondary, #666);
  font-style: italic;
  text-align: center;
  padding: 2rem 0;
}

.rv-loading {
  text-align: center;
  color: var(--secondary, #666);
}

/* Dark mode support (PaperMod) */
.dark .rv-reaction-btn {
  background: var(--entry, #2a2a2a);
  border-color: var(--border, #444);
}

.dark .rv-comment-react {
  border-color: var(--border, #444);
}

.dark .rv-comment-react:hover {
  background: var(--entry, #333);
}

/* Responsive */
@media (max-width: 600px) {
  .rv-recipe-reactions {
    justify-content: center;
  }
  
  .rv-form-actions {
    flex-direction: column;
  }
  
  .rv-btn {
    width: 100%;
    text-align: center;
  }
  
  .rv-comment-time {
    margin-left: 0;
    width: 100%;
    font-size: 0.75rem;
  }
}
