/**
 * Motorwise Tool Pages — Vehicle Report scaffold chrome
 *
 * Shared styling for static tool pages rebuilt onto the new design direction
 * (see docs/tools-overhaul/MPG-RECIPE.md): a single page of white section cards
 * on a #ECEEF1 ground, restrained iconography, single brand-blue accent.
 *
 * Nav model (per recipe): a mobile-only bottom nav toggles the page's tab
 * panels (e.g. Checker | Guide); on desktop every panel is shown in one scroll.
 * Most styling is via Tailwind CDN utilities; this file holds what they can't.
 */

/* ============================================================================
   Base ground (matches the FAQ / Vehicle Report scaffold)
   ============================================================================ */
body {
  background: #eceef1;
}

/* Leave room for the fixed mobile bottom nav. */
@media (max-width: 1023px) {
  body {
    padding-bottom: 64px;
  }
}

/* Section scroll offset so headings clear the fixed 56px header on deep-links. */
.tool-section {
  scroll-margin-top: 96px;
}

/* ============================================================================
   Tab panels — mobile shows the active panel only; desktop shows them all
   ============================================================================ */
.tool-tab {
  display: none;
}
.tool-tab.active {
  display: block;
}
@media (min-width: 1024px) {
  .tool-tab {
    display: block !important;
  }
}

/* ============================================================================
   Mobile bottom navigation
   ============================================================================ */
.tool-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: #ffffff;
  border-top: 1px solid #e8ebee;
  box-shadow: 0 -2px 10px rgba(16, 24, 40, 0.05);
  z-index: 40;
  display: flex;
}
@media (min-width: 1024px) {
  .tool-bottom-nav {
    display: none;
  }
}

.tool-bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #9aa3ad;
  cursor: pointer;
  transition: color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.tool-bottom-nav-item.active {
  color: #0066FF;
}
.tool-bottom-nav-item .nav-icon-bg {
  width: 64px;
  height: 32px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}
.tool-bottom-nav-item.active .nav-icon-bg {
  background-color: #eef4ff; /* soft brand tint */
}
.tool-bottom-nav-item i {
  font-size: 24px;
}
.tool-bottom-nav-item span {
  font-size: 12px;
  font-weight: 600;
}

/* ============================================================================
   Focus-visible states for keyboard navigation (brand ring)
   ============================================================================ */
button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #0066FF;
  outline-offset: 2px;
}

/* ============================================================================
   Result reveal — gentle slide-up when an age result appears
   ============================================================================ */
@keyframes toolResultReveal {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.tool-result-reveal {
  animation: toolResultReveal 0.28s ease-out;
}

/* Direction-aware slide for mobile tab switches */
@keyframes toolSlideInRight { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toolSlideInLeft  { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: translateX(0); } }
.tool-slide-in-right { animation: toolSlideInRight 0.25s ease-out; }
.tool-slide-in-left  { animation: toolSlideInLeft 0.25s ease-out; }

/* ============================================================================
   Prefers reduced motion
   ============================================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
