/* ==========================================================================
   LessBox – Custom Styles
   Ergänzt Tailwind (via CDN) um eigene Styles, die sich mit Utility-Klassen
   nicht sauber abbilden lassen (Range-Slider, Accordion, Reduced-Motion).
   ========================================================================== */

/* Smooth scrolling + Offset für die sticky Navbar */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  -webkit-font-smoothing: antialiased;
}

/* --------------------------------------------------------------------------
   Range-Slider (Ersparnis-Rechner)
   -------------------------------------------------------------------------- */
input[type="range"].lb-range {
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  border-radius: 9999px;
  background: #d1fae5; /* emerald-100 */
  outline: none;
}

input[type="range"].lb-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 9999px;
  background: #f97316; /* orange-500 */
  border: 4px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: transform 0.15s ease;
}

input[type="range"].lb-range::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

input[type="range"].lb-range::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border-radius: 9999px;
  background: #f97316;
  border: 4px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

input[type="range"].lb-range:focus-visible::-webkit-slider-thumb {
  outline: 3px solid #065f46; /* emerald-800 */
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   FAQ-Accordion (animierte Höhe via CSS grid)
   -------------------------------------------------------------------------- */
.lb-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
}

.lb-answer.open {
  grid-template-rows: 1fr;
}

.lb-answer > div {
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   Keyframe-Animationen (Hero)
   -------------------------------------------------------------------------- */
@keyframes lb-fade-up {
  0% {
    opacity: 0;
    transform: translateY(16px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes lb-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.animate-fade-up {
  animation: lb-fade-up 0.6s ease-out both;
}

.animate-float {
  animation: lb-float 4s ease-in-out infinite;
}

/* --------------------------------------------------------------------------
   Reduced Motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
