/* 
  Жуй-Малыш (ChewTracker) - Modern Pediatric UI Stylesheet 
*/

:root {
  --primary: #f59e0b;
  --primary-dark: #d97706;
  --primary-light: #fef3c7;
  --secondary: #10b981;
  --accent-purple: #8b5cf6;
  --accent-blue: #0284c7;
  --card-bg: #ffffff;
  --body-bg: #f8fafc;
  --text-main: #1e293b;
  --text-muted: #64748b;
}

html, body {
  overflow-x: hidden;
  max-width: 100vw;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Nunito', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #fdfbf7;
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

/* Touch scrolling optimization */
.touch-scroll {
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

/* Safe area for iPhone home indicator */
.pb-safe {
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

/* Custom scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Card hover micro-animations */
.hover-lift {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
}

/* Texture badge pills */
.badge-puree {
  background-color: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}
.badge-soft_pieces {
  background-color: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}
.badge-solid {
  background-color: #fce7f3;
  color: #9d174d;
  border: 1px solid #fbcfe8;
}
.badge-finger_food {
  background-color: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

/* Chewing status indicator circles */
.status-self {
  background-color: #10b981;
  color: white;
}
.status-with_help {
  background-color: #f59e0b;
  color: white;
}
.status-refused {
  background-color: #ef4444;
  color: white;
}

/* Interactive Jaw / Teeth Map */
.tooth-slot {
  width: 28px;
  height: 32px;
  border: 2px solid #cbd5e1;
  border-radius: 6px 6px 12px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  background-color: #f8fafc;
}
.tooth-slot.active {
  background: linear-gradient(135deg, #ffffff, #e0f2fe);
  border-color: #0284c7;
  color: #0284c7;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
  transform: scale(1.08);
}

/* Chew Game Interactive Mascot */
@keyframes chewMascot {
  0%, 100% {
    transform: scale(1) translateY(0);
  }
  50% {
    transform: scale(1.06, 0.94) translateY(4px);
  }
}
.anim-chewing {
  animation: chewMascot 0.45s ease-in-out infinite;
}

/* Smart Speaker Sound Waves */
@keyframes soundWave {
  0%, 100% { height: 8px; }
  50% { height: 32px; }
}
.wave-bar {
  width: 4px;
  background: linear-gradient(to top, #8b5cf6, #ec4899);
  border-radius: 4px;
  animation: soundWave 1.2s ease-in-out infinite;
}
.wave-bar:nth-child(2) { animation-delay: 0.15s; }
.wave-bar:nth-child(3) { animation-delay: 0.3s; }
.wave-bar:nth-child(4) { animation-delay: 0.45s; }
.wave-bar:nth-child(5) { animation-delay: 0.6s; }

/* Certificate / Diploma Styles */
.diploma-border {
  border: 12px double #f59e0b;
  background: radial-gradient(circle at center, #ffffff 0%, #fffbeb 100%);
  position: relative;
  box-shadow: 0 20px 30px rgba(217, 119, 6, 0.15);
}
.diploma-seal {
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, #f59e0b, #d97706);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.4);
}

/* Doctor Clinical Report Print Styles */
@media print {
  body * {
    visibility: hidden;
  }
  #doctorModal, #doctorModal * {
    visibility: visible;
  }
  #doctorModal {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    background: white !important;
  }
  .no-print {
    display: none !important;
  }
}
