/*
 * 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.
 * Never use this file,
 * use app/assets/tailwind/application.css instead.
 */

/* ==========================================================================
   Mobile Input Drawer — slides up from bottom on narrow screens
   ========================================================================== */

/* Drawer panel: hidden off-screen by default on mobile, inline on desktop */
.factory-drawer {
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  will-change: transform;
}

.factory-drawer.drawer-open {
  transform: translateY(0);
}

@media (min-width: 768px) {
  .factory-drawer {
    transform: none;
    position: relative;
    z-index: auto;
    inset: auto;
    transition: none;
    will-change: auto;
  }
}

/* Drawer overlay backdrop */
.factory-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 39;
  background-color: oklch(0% 0 0 / 0.4);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

/* Drag handle pill — visual affordance for mobile drawer */
.drawer-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background-color: oklch(var(--bc) / 0.2);
  margin: 0 auto;
}

/* Onboarding Wizard Card Styles - Theme-aware */
.card-option {
  transition: all 0.2s ease-in-out;
}

.card-option:hover {
  border-color: oklch(from var(--color-primary) l c h / 0.5);
  box-shadow: 0 10px 15px -3px oklch(0% 0 0 / 0.1), 0 4px 6px -2px oklch(0% 0 0 / 0.05);
  transform: translateY(-2px);
}

.card-option.selected {
  border-color: var(--color-primary) !important;
  background-color: oklch(from var(--color-primary) 95% 0.03 h) !important;
}

html[data-theme="dark"] .card-option.selected {
  background-color: oklch(from var(--color-primary) 25% 0.04 h) !important;
}

.card-option.selected:hover {
  border-color: var(--color-primary) !important;
  box-shadow: 0 20px 25px -5px oklch(from var(--color-primary) l c h / 0.15), 0 10px 10px -5px oklch(from var(--color-primary) l c h / 0.08);
}

.card-option.selected .checkmark {
  display: flex !important;
}

.card-option.selected h3 {
  color: var(--color-primary) !important;
}

/* Multi-select Card Styles - Theme-aware */
.multi-card-option {
  transition: all 0.2s ease-in-out;
}

.multi-card-option:hover {
  border-color: oklch(from var(--color-primary) l c h / 0.5);
  box-shadow: 0 4px 6px -1px oklch(0% 0 0 / 0.1), 0 2px 4px -1px oklch(0% 0 0 / 0.06);
  transform: translateY(-2px);
}

.multi-card-option.selected {
  border-color: var(--color-primary) !important;
  background-color: oklch(from var(--color-primary) 92% 0.04 h) !important;
}

html[data-theme="dark"] .multi-card-option.selected {
  background-color: oklch(from var(--color-primary) 28% 0.05 h) !important;
}

.multi-card-option.selected:hover {
  box-shadow: 0 10px 15px -3px oklch(from var(--color-primary) l c h / 0.2), 0 4px 6px -2px oklch(from var(--color-primary) l c h / 0.1);
}

.multi-card-option.selected .multi-checkbox {
  display: flex !important;
}

.multi-card-option.selected h3 {
  color: var(--color-primary) !important;
}

.multi-card-option.selected svg {
  color: var(--color-primary) !important;
}

/* Checkbox hidden by default */
.multi-checkbox {
  display: none;
  z-index: 10;
}

/* Show checkbox when card is selected */
.multi-card-option.selected .multi-checkbox {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Transcript Audio Sync Highlight */
.transcript-active {
  background-color: rgb(254, 249, 195) !important; /* Yellow highlight */
  border-left: 4px solid rgb(234, 179, 8);
  padding-left: 12px !important;
  margin-left: -16px;
}

/* Dark mode support - use data-theme to match app theme state */
html[data-theme="dark"] .transcript-active {
  background-color: rgba(234, 179, 8, 0.15) !important;
  border-left-color: rgb(234, 179, 8);
}

/* Story Madlib Highlight Styling */
.bg-yellow-200 {
  background-color: rgb(254, 240, 138);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  display: inline-block;
}

html[data-theme="dark"] .bg-yellow-200 {
  background-color: rgba(254, 240, 138, 0.3);
  color: rgb(254, 240, 138);
}

/* Assessment Badge Animations */
@keyframes badge-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 var(--color-primary);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 0 3px oklch(from var(--color-primary) l c h / 0.25);
  }
}

@keyframes badge-update {
  0% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.badge-animate-update {
  animation: badge-update 0.35s ease-out;
  will-change: transform, opacity;
}

.badge-pulse {
  animation: badge-pulse 0.6s ease-in-out 1;
  will-change: transform, box-shadow;
}

/* Assessment Badge Focus State (for keyboard navigation) */
.assessment-badge-focused {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Empty state badge - visible dashed style */
.badge-empty-state {
  transition: all 0.2s ease-out;
}

.badge-empty-state:hover {
  transform: scale(1.05);
}
