/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Turbo progress bar — match theme */
.turbo-progress-bar {
  background-color: #6366f1;
  height: 2px;
}

/* === PCP Questionnaire Interactive Animations === */

/* Step flow: fade + slide up when a new sub-section appears */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Tag chip pop-in animation */
.tag-chip {
  animation: tagPop 0.2s ease-out;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

@keyframes tagPop {
  0% {
    opacity: 0;
    transform: scale(0.6);
  }
  70% {
    transform: scale(1.05);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Celebration checkmark bounce */
@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
  70% {
    transform: scale(0.95);
  }
  100% {
    transform: scale(1);
  }
}

/* Checkmark draw animation */
@keyframes drawCheck {
  to {
    stroke-dashoffset: 0;
  }
}

/* Confetti particles */
@keyframes confetti {
  0% {
    opacity: 1;
    transform: translateY(0) translateX(0) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translateY(-200px) translateX(var(--x, 0px)) rotate(var(--r, 360deg));
  }
}

/* Turbo frame content transition */
turbo-frame#questionnaire_content > div {
  animation: fadeSlideUp 0.25s ease-out;
}

/* Communication chart responsive grid */
.comm-chart-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}
@media (min-width: 640px) {
  .comm-chart-grid {
    grid-template-columns: 1fr 1fr 1fr 1fr 40px;
  }
}

/* iPhone-style time wheel picker */
.time-wheel-container {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 30%, black 70%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, black 30%, black 70%, transparent 100%);
}
.time-wheel-highlight {
  position: absolute;
  top: 50%;
  left: 8px;
  right: 8px;
  height: 40px;
  transform: translateY(-50%);
  background: rgba(99, 102, 241, 0.15);
  border-radius: 10px;
  border: 1px solid rgba(99, 102, 241, 0.3);
  pointer-events: none;
  z-index: 1;
}
.time-wheel {
  position: relative;
  z-index: 2;
}

/* Suggestion chip hover effect */
.suggestion-chip {
  transition: all 0.15s ease;
}
.suggestion-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(100, 80, 160, 0.1);
}
