/*
 * 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.
 */

/* Typography: Inter as primary font */
body {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  letter-spacing: -0.025em;
}

/* Turbo progress bar */
.turbo-progress-bar {
  height: 3px;
  background-color: #6366f1;
}

/* Safe area for bottom nav on notched devices */
.safe-area-bottom {
  padding-bottom: env(safe-area-inset-bottom, 0);
}

/* Sex radio button selection styles */
.sex-radio-male:has(input:checked) {
  border-color: #3b82f6;
  background-color: #eff6ff;
  color: #1d4ed8;
}

.sex-radio-female:has(input:checked) {
  border-color: #ec4899;
  background-color: #fdf2f8;
  color: #be185d;
}

/* Hide scrollbar but allow scrolling */
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* Turbo navigation loading state */
html.turbo-loading body {
  cursor: progress;
}

/* Landing page: fade-in animation for SVG tree nodes */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.landing-tree .animate-fade-in {
  opacity: 0;
  animation: fade-in 0.5s ease-out forwards;
}

@media (prefers-reduced-motion: reduce) {
  .turbo-progress-bar {
    transition: none;
  }
  .landing-tree .animate-fade-in {
    animation: none;
    opacity: 1;
  }
}
