/* Happiness Meter Modal Styling */
#feedbackModal .modal-dialog {
  max-width: 500px;
  margin: 3rem auto;
}

#feedbackModal .modal-content {
  border: none;
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

#feedbackModal .modal-header {
  border: none;
  position: relative;
}

#feedbackModal .modal-title {
  font-weight: 600;
  font-size: 1.5rem;
  margin: 0;
  text-align: center;
  width: 100%;
}

#feedbackModal .close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
}

#feedbackModal .close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%) scale(1.1);
}

#feedbackModal .modal-body {
  padding: 3rem 2rem;
  background: white;
}

#feedbackModal .modal-body p {
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
  color: #495057;
  font-weight: 500;
}

/* Feedback Buttons Container */
.feedback-buttons-container {
  display: flex;
  justify-content: space-around;
  gap: 1rem;
  padding: 1rem 0;
}

/* Individual Feedback Buttons */
.feedback-btn {
  background: white;
  border: 3px solid transparent;
  border-radius: 20px;
  padding: 1.5rem 1rem;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  min-width: 120px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.feedback-btn:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.feedback-btn:active {
  transform: translateY(-2px) scale(1.02);
}

/* Smiley Icons */
.feedback-icon {
  font-size: 4rem !important;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: block;
  margin-bottom: 0.5rem;
}

.feedback-btn:hover .feedback-icon {
  transform: scale(1.2) rotate(5deg);
  animation: bounce 0.6s ease-in-out;
}

/* Bounce Animation */
@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: scale(1.2) rotate(5deg) translateY(0);
  }
  40% {
    transform: scale(1.2) rotate(5deg) translateY(-10px);
  }
  60% {
    transform: scale(1.2) rotate(5deg) translateY(-5px);
  }
}

/* Pulse Animation for Icons */
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.feedback-icon {
  animation: pulse 2s infinite ease-in-out;
}

/* Happy Button Styling */
#happyFeedback {
  background: linear-gradient(135deg, #e8f5e8 0%, #f0fff0 100%);
  border-color: #28a745;
}

#happyFeedback:hover {
  background: linear-gradient(135deg, #d4edda 0%, #e8f5e8 100%);
  border-color: #218838;
}

#happyFeedback .feedback-icon {
  color: #28a745 !important;
}

#happyFeedback .feedback-label {
  color: #28a745;
  font-weight: 600;
}

/* Neutral Button Styling */
#neutralFeedback {
  background: linear-gradient(135deg, #fff3cd 0%, #fefefe 100%);
  border-color: #ffc107;
}

#neutralFeedback:hover {
  background: linear-gradient(135deg, #ffeaa7 0%, #fff3cd 100%);
  border-color: #e0a800;
}

#neutralFeedback .feedback-icon {
  color: #ffc107 !important;
}

#neutralFeedback .feedback-label {
  color: #ffc107;
  font-weight: 600;
}

/* Unhappy Button Styling */
#unhappyFeedback {
  background: linear-gradient(135deg, #f8d7da 0%, #fff5f5 100%);
  border-color: #dc3545;
}

#unhappyFeedback:hover {
  background: linear-gradient(135deg, #f1b0b7 0%, #f8d7da 100%);
  border-color: #c82333;
}

#unhappyFeedback .feedback-icon {
  color: #dc3545 !important;
}

#unhappyFeedback .feedback-label {
  color: #dc3545;
  font-weight: 600;
}

/* Feedback Labels */
.feedback-label {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 0.5rem;
  transition: all 0.3s ease;
}

/* Selected State Animation */
.feedback-btn.selected {
  animation: selectedPulse 0.6s ease-out;
  transform: scale(1.1);
}

@keyframes selectedPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  }
  50% {
    transform: scale(1.15);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  }
  100% {
    transform: scale(1.1);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
  }
}

/* Success Message Animation */
#feedbackMessage {
  background: linear-gradient(135deg, #d4edda 0%, #e8f5e8 100%);
  border: none;
  border-radius: 0 0 20px 20px;
  padding: 2rem;
  animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

#feedbackMessage p {
  color: #28a745 !important;
  font-weight: 600;
  font-size: 1.1rem;
  margin: 0;
  text-align: center;
  animation: fadeIn 0.8s ease-out 0.3s both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 576px) {
  #feedbackModal .modal-dialog {
    margin: 1rem;
  }

  .feedback-buttons-container {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }

  .feedback-btn {
    min-width: 200px;
    padding: 1.5rem 2rem;
  }

  .feedback-icon {
    font-size: 3.5rem !important;
  }

  #feedbackModal .modal-body {
    padding: 2rem 1rem;
  }
}

/* Loading State Animation */
.feedback-btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

.feedback-btn.loading .feedback-icon {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Hover Effects for Modal */
#feedbackModal .modal-content {
  transition: all 0.3s ease;
}

#feedbackModal.show .modal-content {
  animation: modalAppear 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalAppear {
  from {
    transform: scale(0.8) translateY(-50px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

/* Confetti Effect for Success */
.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  background: #28a745;
  animation: confettiFall 3s linear infinite;
}

@keyframes confettiFall {
  0% {
    transform: translateY(-100vh) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* Additional Visual Enhancements */
.feedback-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transition: left 0.5s;
}

.feedback-btn:hover::before {
  left: 100%;
}
