/* Mood Meter Container */
.mood-meter_container {
  border-radius: 20px;
  transition: all 0.4s ease;
  padding: 20px;
  opacity: 0;
  transform: scale(0.95);
}

.mood-meter_container--animate-in {
  animation: moodMeterFadeIn 0.6s ease forwards;
}

@keyframes moodMeterFadeIn {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Canvas Wrapper */
.mood-meter_canvas-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  max-width: 400px;
}

/* Canvas */
.mood-meter_canvas {
  cursor: crosshair;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  background: white;
  transition: box-shadow 0.3s ease;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  touch-action: none;
}

.mood-meter_canvas:active {
  cursor: grabbing;
}

.mood-meter_canvas:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
}

/* Selected Point */
.mood-meter_selected-point {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transform: translate(-50%, -50%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 10;
}

.mood-meter_selected-point-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: inherit;
  animation: pointPulse 2s ease-in-out infinite;
}

@keyframes pointPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.3);
    opacity: 0.7;
  }
}

.mood-meter_point--pulse {
  animation: pointAppear 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes pointAppear {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.3);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

/* Axis Labels */
.mood-meter_axis-labels {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* Mood Label */
.mood-meter_container h5 {
  font-weight: 600;
  color: #333;
  font-size: 1.5rem;
  margin: 0;
  transition: color 0.3s ease;
}

/* Responsive Design */
@media (max-width: 576px) {
  .mood-meter_container {
    padding: 15px;
  }

  .mood-meter_canvas-wrapper {
    max-width: 100%;
  }

  .mood-meter_container h5 {
    font-size: 1.25rem;
  }

  .mood-meter_axis-labels small {
    font-size: 0.75rem;
  }
}

/* Touch interaction enhancement */
@media (hover: none) and (pointer: coarse) {
  .mood-meter_canvas {
    cursor: default;
  }

  .mood-meter_selected-point {
    width: 24px;
    height: 24px;
    border-width: 4px;
  }
}

/* Accessibility - High Contrast Mode */
@media (prefers-contrast: high) {
  .mood-meter_canvas {
    border: 2px solid #000;
  }

  .mood-meter_selected-point {
    border-color: #000;
    border-width: 4px;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .mood-meter_container,
  .mood-meter_canvas,
  .mood-meter_selected-point,
  .mood-meter_selected-point-inner {
    animation: none !important;
    transition: none !important;
  }

  .mood-meter_container--animate-in {
    opacity: 1;
    transform: scale(1);
  }
}

/* Loading State */
.mood-meter_container.is-loading {
  opacity: 0.6;
  pointer-events: none;
}

.mood-meter_container.is-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-top-color: rgba(102, 126, 234, 0.8);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Focus styles for accessibility */
.mood-meter_canvas:focus {
  outline: 3px solid rgba(102, 126, 234, 0.5);
  outline-offset: 4px;
}

/* Color transitions for mood changes */
.mood-meter_container h5 {
  animation: colorFade 0.5s ease;
}

@keyframes colorFade {
  0% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}
