/* Meme Detail Modal Styles */
.modal-large {
  max-width: 900px;
  width: 90%;
}

/* Meme Detail Container */
.meme-detail-container {
  display: flex;
  flex-direction: row;
  gap: 2rem;
}

/* Loading state */
.meme-detail-container.loading {
  position: relative;
  min-height: 300px;
}

.meme-detail-container.loading::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.meme-detail-container.loading::before {
  content: "\f110";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  font-size: 2rem;
  color: var(--primary-color);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 11;
  animation: fa-spin 2s infinite linear;
}

/* Meme Image Section */
.meme-detail-image {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.meme-detail-image img {
  width: 100%;
  max-height: 500px;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  background-color: #f5f5f5;
}

/* Meme Actions */
.meme-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.meme-vote {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  padding: 0.5rem;
  background-color: var(--bg-light);
  border-radius: var(--radius-sm);
}

.vote-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: none;
  background: none;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1rem;
  color: var(--text-color);
  border-radius: var(--radius-sm);
}

.vote-btn:hover {
  background-color: var(--bg-dark);
}

.vote-btn i {
  color: var(--text-lighter);
}

.vote-btn:hover i.fa-thumbs-up {
  color: var(--primary-color);
}

.vote-btn:hover i.fa-thumbs-down {
  color: var(--danger-color);
}

.meme-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: space-between;
}

.meme-buttons button {
  flex: 1;
  min-width: calc(50% - 0.5rem);
}

/* Meme Info Section */
.meme-detail-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 400px;
}

.meme-creator {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background-color: var(--bg-light);
  border-radius: var(--radius-sm);
}

.meme-creator img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.meme-creator p:first-of-type {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.meme-creator p:last-of-type {
  font-size: 0.875rem;
  color: var(--text-lighter);
  margin-bottom: 0;
}

/* Tags */
.meme-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: var(--bg-light);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--text-light);
  cursor: pointer;
  transition: var(--transition);
}

.tag:hover {
  background-color: var(--primary-light);
  color: white;
}

.no-tags {
  font-size: 0.875rem;
  color: var(--text-lighter);
  font-style: italic;
}

/* License Info */
.meme-license {
  padding: 1rem;
  background-color: var(--bg-light);
  border-radius: var(--radius-sm);
}

.meme-license h4 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.license-badge,
.original-content-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding: 0.5rem;
  background-color: var(--bg-color);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
}

.license-badge i {
  color: var(--accent-color);
}

.original-content-badge i {
  color: var(--success-color);
}

.meme-license p {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}

.usage-declaration {
  margin-top: 1rem;
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
}

.usage-declaration button {
  margin-bottom: 0.5rem;
}

.usage-declaration p {
  font-size: 0.75rem;
  color: var(--text-lighter);
}

/* Comments Section */
.comments-section {
  margin-top: 1.5rem;
}

.comments-section h4 {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.comment-form {
  margin-bottom: 1.5rem;
}

.comment-form textarea {
  width: 100%;
  min-height: 80px;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.875rem;
  resize: vertical;
  margin-bottom: 0.5rem;
  transition: var(--transition);
}

.comment-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(95, 77, 224, 0.2);
}

.comment-form button {
  float: right;
}

/* Comments List */
.comments-list {
  margin-top: 1rem;
}

.comment {
  padding: 1rem;
  background-color: var(--bg-light);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.comment.new-comment {
  animation: highlight-comment 2s;
}

@keyframes highlight-comment {

  0%,
  100% {
    background-color: var(--bg-light);
  }

  50% {
    background-color: rgba(95, 77, 224, 0.1);
  }
}

.comment-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.comment-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.comment-user img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.comment-user span {
  font-weight: 500;
  font-size: 0.875rem;
}

.comment-date {
  font-size: 0.75rem;
  color: var(--text-lighter);
}

.comment-content {
  margin-bottom: 0.5rem;
}

.comment-content p {
  font-size: 0.875rem;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.comment-actions {
  display: flex;
  gap: 0.75rem;
}

.comment-actions button {
  font-size: 0.75rem;
}

/* Comment Replies */
.comment-replies {
  margin-top: 0.75rem;
  margin-left: 1.5rem;
  border-left: 2px solid var(--border-color);
  padding-left: 1rem;
}

.comment.reply {
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  margin-bottom: 0.75rem;
}

/* Reply Form */
.reply-form {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

.reply-form textarea {
  width: 100%;
  min-height: 60px;
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.875rem;
  resize: vertical;
  margin-bottom: 0.5rem;
}

.reply-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(95, 77, 224, 0.2);
}

.reply-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.no-comments {
  padding: 1.5rem;
  text-align: center;
  color: var(--text-lighter);
  background-color: var(--bg-light);
  border-radius: var(--radius-sm);
}

.comments-error {
  padding: 1rem;
  color: var(--danger-color);
  background-color: rgba(220, 53, 69, 0.1);
  border-radius: var(--radius-sm);
  text-align: center;
}

/* Responsive styles */
@media (max-width: 768px) {
  .meme-detail-container {
    flex-direction: column;
  }

  .meme-detail-info {
    max-width: 100%;
  }

  .meme-detail-image img {
    max-height: 400px;
  }

  .meme-buttons button {
    min-width: auto;
    flex: 1;
  }
}

@media (max-width: 576px) {
  .meme-detail-image img {
    max-height: 300px;
  }

  .meme-vote {
    flex-direction: row;
    justify-content: space-around;
  }

  .vote-btn {
    padding: 0.5rem;
    flex-direction: column;
  }

  .meme-buttons {
    flex-direction: column;
  }

  .meme-buttons button {
    width: 100%;
  }

  .comment-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .comment-date {
    margin-top: 0.25rem;
    margin-left: 34px;
  }
}