/**
 * Like/Dislike Buttons Styling
 * Positioned above the review FAB button
 */

/* Container for Like/Dislike buttons */
.like-dislike-buttons {
  position: fixed;
  bottom: 11rem;  /* 176px - positioned well above review FAB (96px) */
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 1002;  /* Above review FAB (1001) */
}

/* Individual button base styles */
.like-dislike-buttons__button {
  width: 60px;
  height: 60px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: visible;
}

/* Like button - default state */
.like-dislike-buttons__like {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  color: #ffffff;
  border: 2px solid #3498db;
  opacity: 0.6;
}

.like-dislike-buttons__like:hover {
  opacity: 1;
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 6px 20px rgba(52, 152, 219, 0.5);
}

/* Like button - active state */
.like-dislike-buttons__like.is-active {
  opacity: 1;
  box-shadow: 0 6px 20px rgba(52, 152, 219, 0.6);
}

.like-dislike-buttons__like.is-active:hover {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  border-color: #e74c3c;
  box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

/* Dislike button - default state */
.like-dislike-buttons__dislike {
  background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
  color: #ffffff;
  border: 2px solid #e67e22;
  opacity: 0.6;
}

.like-dislike-buttons__dislike:hover {
  opacity: 1;
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 6px 20px rgba(230, 126, 34, 0.5);
}

/* Dislike button - active state */
.like-dislike-buttons__dislike.is-active {
  opacity: 1;
  box-shadow: 0 6px 20px rgba(230, 126, 34, 0.6);
}

.like-dislike-buttons__dislike.is-active:hover {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  border-color: #e74c3c;
  box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

/* Button icon */
.like-dislike-buttons__icon {
  font-size: 1.5rem;
  line-height: 1;
  display: inline-block;
  transition: transform 0.3s ease;
}

/* Animation on click */
.like-dislike-buttons__button.is-animating .like-dislike-buttons__icon {
  animation: likeDislikePulse 0.3s ease;
}

@keyframes likeDislikePulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.3) rotate(10deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}

/* Active button pulse animation */
.like-dislike-buttons__button.is-active {
  animation: activePulse 2s ease-in-out infinite;
}

@keyframes activePulse {
  0%, 100% {
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.5);
  }
  50% {
    box-shadow: 0 6px 25px rgba(52, 152, 219, 0.7);
  }
}

.like-dislike-buttons__dislike.is-active {
  animation: activeDislikePulse 2s ease-in-out infinite;
}

@keyframes activeDislikePulse {
  0%, 100% {
    box-shadow: 0 6px 20px rgba(230, 126, 34, 0.5);
  }
  50% {
    box-shadow: 0 6px 25px rgba(230, 126, 34, 0.7);
  }
}

/* Tooltip on hover */
.like-dislike-buttons__button::before {
  content: attr(data-tooltip);
  position: absolute;
  right: 70px;
  background: #2c3e50;
  color: #ffffff;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  white-space: nowrap;
  font-size: 0.85rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.like-dislike-buttons__button::after {
  content: "";
  position: absolute;
  right: 62px;
  width: 0;
  height: 0;
  border-left: 6px solid #2c3e50;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.like-dislike-buttons__button:hover::before,
.like-dislike-buttons__button:hover::after {
  opacity: 1;
}

/* Floating icon animation */
.like-dislike-float-icon {
  position: fixed;
  font-size: 2rem;
  pointer-events: none;
  z-index: 10000;
  animation: floatUp 1s ease-out forwards;
  transform: translateX(-50%);
}

@keyframes floatUp {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-100px) scale(1.5);
  }
}

/* Toast Notification */
.like-dislike-notification {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #2c3e50;
  color: #ffffff;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  z-index: 10001;
  font-size: 0.95rem;
  font-weight: 500;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  max-width: 90%;
  text-align: center;
}

.like-dislike-notification.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Notification variants */
.like-dislike-notification--success {
  background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
}

.like-dislike-notification--info {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.like-dislike-notification--neutral {
  background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
}

/* Ripple effect on click */
.like-dislike-buttons__button::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  opacity: 0;
}

.like-dislike-buttons__button.is-animating::after {
  animation: ripple 0.6s ease-out;
}

@keyframes ripple {
  0% {
    width: 0;
    height: 0;
    opacity: 0.5;
  }
  100% {
    width: 120px;
    height: 120px;
    opacity: 0;
  }
}

/* Button disabled state */
.like-dislike-buttons__button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
  .like-dislike-buttons {
    bottom: 9.5rem;  /* 152px - adjusted for mobile */
    right: 1.5rem;
  }

  .like-dislike-buttons__button {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }

  .like-dislike-buttons__button::before,
  .like-dislike-buttons__button::after {
    display: none;  /* Hide tooltips on mobile */
  }

  .like-dislike-notification {
    bottom: 1.5rem;
    font-size: 0.9rem;
    padding: 0.875rem 1.25rem;
  }
}

@media (max-width: 480px) {
  .like-dislike-buttons {
    bottom: 9rem;  /* 144px */
    right: 1rem;
    gap: 0.5rem;
  }

  .like-dislike-buttons__button {
    width: 50px;
    height: 50px;
    font-size: 1.125rem;
  }

  .like-dislike-notification {
    bottom: 1rem;
    font-size: 0.85rem;
    padding: 0.75rem 1rem;
  }
}

/* Print styles - hide buttons */
@media print {
  .like-dislike-buttons {
    display: none;
  }
}

/* ============================================
   INLINE ARTICLE FEEDBACK (New Style)
   ============================================ */

/* Article Feedback Container */
.article-feedback {
  margin: 3rem 0;
  padding: 0 1rem;
}

.article-feedback__container {
  max-width: 800px;
  margin: 0 auto;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 2px solid #e9ecef;
  text-align: center;
}

/* Header Section */
.article-feedback__header {
  margin-bottom: 2rem;
}

.article-feedback__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.article-feedback__title::before {
  content: "💭";
  font-size: 1.75rem;
}

.article-feedback__subtitle {
  font-size: 0.95rem;
  color: #7f8c8d;
  margin: 0;
}

/* Buttons Container */
.article-feedback__buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Individual Button */
.article-feedback__button {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  border: 2px solid transparent;
  border-radius: 50px;
  background: white;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  font-size: 1rem;
  font-weight: 600;
  position: relative;
  overflow: visible;
}

.article-feedback__button:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Like Button Colors */
.article-feedback__button--like {
  color: #27ae60;
  border-color: #27ae60;
}

.article-feedback__button--like:hover {
  background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
  color: white;
  border-color: #27ae60;
}

.article-feedback__button--like.is-active {
  background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
  color: white;
  box-shadow: 0 8px 24px rgba(39, 174, 96, 0.4);
  animation: activePulseInline 2s ease-in-out infinite;
}

/* Dislike Button Colors */
.article-feedback__button--dislike {
  color: #e67e22;
  border-color: #e67e22;
}

.article-feedback__button--dislike:hover {
  background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
  color: white;
  border-color: #e67e22;
}

.article-feedback__button--dislike.is-active {
  background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
  color: white;
  box-shadow: 0 8px 24px rgba(230, 126, 34, 0.4);
  animation: activeDislikePulseInline 2s ease-in-out infinite;
}

/* Button Icon */
.article-feedback__icon {
  font-size: 1.5rem;
  line-height: 1;
  display: inline-block;
  transition: transform 0.3s ease;
}

.article-feedback__button.is-animating .article-feedback__icon {
  animation: likeDislikePulse 0.3s ease;
}

/* Button Label */
.article-feedback__label {
  font-weight: 600;
  white-space: nowrap;
}

/* Counter Badge */
.article-feedback__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 0.5rem;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 700;
  transition: all 0.3s ease;
}

.article-feedback__button--like:hover .article-feedback__count,
.article-feedback__button--like.is-active .article-feedback__count {
  background: rgba(255, 255, 255, 0.3);
}

.article-feedback__button--dislike:hover .article-feedback__count,
.article-feedback__button--dislike.is-active .article-feedback__count {
  background: rgba(255, 255, 255, 0.3);
}

/* Thank You Message */
.article-feedback__thank-you {
  margin-top: 1.5rem;
  padding: 1rem;
  background: white;
  border-radius: 12px;
  color: #27ae60;
  font-weight: 600;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  animation: slideDown 0.3s ease;
}

.article-feedback__thank-you.is-visible {
  display: flex;
}

.article-feedback__thank-you i {
  font-size: 1.25rem;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Pulse animations for inline buttons */
@keyframes activePulseInline {
  0%, 100% {
    box-shadow: 0 8px 24px rgba(39, 174, 96, 0.4);
  }
  50% {
    box-shadow: 0 8px 32px rgba(39, 174, 96, 0.6);
  }
}

@keyframes activeDislikePulseInline {
  0%, 100% {
    box-shadow: 0 8px 24px rgba(230, 126, 34, 0.4);
  }
  50% {
    box-shadow: 0 8px 32px rgba(230, 126, 34, 0.6);
  }
}

/* Disabled state */
.article-feedback__button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Responsive Design for Inline Feedback */
@media (max-width: 768px) {
  .article-feedback__container {
    padding: 2rem 1.5rem;
  }

  .article-feedback__title {
    font-size: 1.25rem;
  }

  .article-feedback__subtitle {
    font-size: 0.9rem;
  }

  .article-feedback__buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .article-feedback__button {
    justify-content: center;
    padding: 1rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .article-feedback__container {
    padding: 1.5rem 1rem;
    border-radius: 16px;
  }

  .article-feedback__title {
    font-size: 1.125rem;
  }

  .article-feedback__title::before {
    font-size: 1.5rem;
  }

  .article-feedback__subtitle {
    font-size: 0.85rem;
  }

  .article-feedback__button {
    font-size: 0.95rem;
    padding: 0.875rem 1.25rem;
  }

  .article-feedback__icon {
    font-size: 1.25rem;
  }

  .article-feedback__count {
    min-width: 28px;
    height: 28px;
    font-size: 0.85rem;
  }
}

/* Print styles */
@media print {
  .article-feedback {
    display: none;
  }
}
