/* =============================================================================
   BINYAMIN TRADERS — COMPONENT STYLES
   -----------------------------------------------------------------------------
   Hand-written CSS for behaviour the React version expressed through conditional
   className logic: active navigation states, tab panels, the FAQ accordion, the
   search overlay, the image lightbox and the intro loader animation.

   This file is NOT generated. Edit it directly — no build step required.
   Design tokens come from :root in style.css.
   ============================================================================= */

/* -----------------------------------------------------------------------------
   Accessibility helpers
   -------------------------------------------------------------------------- */
.bt-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--bt-primary);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
  border-radius: 0 0 0.5rem 0;
}
.bt-skip-link:focus {
  left: 0;
}

/* Honeypot field: hidden from people, reachable by bots. Not display:none, as
   some bots skip those; off-screen positioning catches far more. */
.bt-hp {
  position: absolute !important;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* -----------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
#header-bar.is-scrolled {
  background-color: rgb(255 255 255 / 0.98);
  backdrop-filter: blur(12px);
  border-color: #e2e8f0;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  padding-top: 0.625rem;
  padding-bottom: 0.625rem;
}
@media (min-width: 640px) {
  #header-bar.is-scrolled { padding-top: 0.75rem; padding-bottom: 0.75rem; }
}

/* The blue-to-red active tab indicator only shows on the active tab. */
.bt-nav-indicator {
  opacity: 0;
  transition: opacity 0.15s ease;
}
.bt-nav-tab.is-active .bt-nav-indicator { opacity: 1; }

.bt-nav-mobile .bt-nav-dot { opacity: 0; }
.bt-nav-mobile.is-active .bt-nav-dot { opacity: 1; }

/* Hero scroll cue grows on hover, matching the React hover:h-8 transition. */
.bt-scroll-cue:hover .bt-scroll-line { height: 2rem; }

/* -----------------------------------------------------------------------------
   Calculator + facility tabs
   -------------------------------------------------------------------------- */
.bt-calc-tab.is-active {
  background-color: var(--bt-primary);
  color: #fff;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}
.bt-facility-tab.is-active {
  border-bottom-color: var(--bt-primary);
  color: var(--bt-primary);
  background-color: #fff;
  font-weight: 700;
}

/* -----------------------------------------------------------------------------
   FAQ accordion  (native <details>, styled to match the React version)
   -------------------------------------------------------------------------- */
.bt-faq > summary { list-style: none; }
.bt-faq > summary::-webkit-details-marker { display: none; }
.bt-faq[open] {
  border-color: rgb(11 92 158 / 0.4);
  box-shadow: 0 0 0 1px rgb(11 92 158 / 0.2);
}
.bt-faq[open] .bt-faq-chevron {
  transform: rotate(180deg);
  color: var(--bt-primary);
  background-color: #eff6ff;
}

/* -----------------------------------------------------------------------------
   Catalogue
   -------------------------------------------------------------------------- */
.bt-product-card[hidden],
.bt-product-row[hidden] { display: none !important; }

.bt-view-btn.is-active {
  background-color: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
  font-weight: 600;
}
.bt-cat-pill.is-active {
  background-color: var(--bt-primary);
  color: #fff;
  font-weight: 700;
}

/* -----------------------------------------------------------------------------
   RFQ requirement-type cards
   -------------------------------------------------------------------------- */
.bt-rfq-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.bt-rfq-check { opacity: 0; transition: opacity 0.15s ease; }
.bt-rfq-option:has(.bt-rfq-radio:checked) {
  border-color: var(--bt-primary);
  background-color: rgb(239 246 255 / 0.5);
}
.bt-rfq-option:has(.bt-rfq-radio:checked) .bt-rfq-check { opacity: 1; }
.bt-rfq-option:has(.bt-rfq-radio:focus-visible) {
  outline: 2px solid var(--bt-primary);
  outline-offset: 2px;
}

.bt-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem;
  background: #fff;
  border: 1px solid var(--bt-border);
  border-radius: 0.5rem;
  font-size: 0.75rem;
  box-shadow: 0 1px 1px 0 rgb(0 0 0 / 0.03);
}

[data-dropzone].is-dragover {
  border-color: #60a5fa;
  background-color: #eff6ff;
}

/* -----------------------------------------------------------------------------
   Search overlay  (replaces SearchModal.tsx)
   -------------------------------------------------------------------------- */
.bt-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 4rem 1rem 1rem;
  background: rgb(15 23 42 / 0.6);
  backdrop-filter: blur(4px);
  animation: bt-fade-in 0.15s ease;
}
@media (min-width: 640px) { .bt-overlay { padding-top: 6rem; } }
.bt-overlay[hidden] { display: none; }

.bt-overlay-panel {
  background: #fff;
  border: 1px solid var(--bt-border);
  border-radius: 1rem;
  width: 100%;
  max-width: 42rem;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.35);
  display: flex;
  flex-direction: column;
  color: var(--bt-text);
  animation: bt-rise 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.bt-search-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: 0.75rem;
  transition: background-color 0.15s ease;
}
.bt-search-result:hover,
.bt-search-result.is-highlighted { background-color: var(--bt-surface); }

body.bt-no-scroll { overflow: hidden; }

/* -----------------------------------------------------------------------------
   Product gallery lightbox
   -------------------------------------------------------------------------- */
.bt-thumb.is-active {
  border-color: var(--bt-primary);
  transform: scale(0.95);
  opacity: 1;
}

.bt-lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: rgb(7 13 24 / 0.92);
  animation: bt-fade-in 0.15s ease;
}
.bt-lightbox[hidden] { display: none; }
.bt-lightbox img {
  max-width: min(96vw, 1400px);
  max-height: 88vh;
  object-fit: contain;
  border-radius: 0.5rem;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.6);
}
.bt-lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  padding: 0.625rem;
  border-radius: 9999px;
  color: #fff;
  background: rgb(255 255 255 / 0.1);
  border: 1px solid rgb(255 255 255 / 0.2);
  transition: background-color 0.15s ease;
}
.bt-lightbox-close:hover { background: rgb(255 255 255 / 0.2); }

/* -----------------------------------------------------------------------------
   Intro loader  (replaces LogoLoader.tsx + the `motion` library)
   -----------------------------------------------------------------------------
   The React loader pulled in Framer Motion (~35 KB gzipped) purely for this one
   overlay. Reproduced here with CSS keyframes at zero JavaScript cost; the stage
   delays match the original transition delays so the build-up reads identically.
   -------------------------------------------------------------------------- */
#bt-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bt-ink);
  color: #fff;
  overflow: hidden;
  user-select: none;
}
#bt-loader[hidden] { display: none; }
#bt-loader.is-leaving {
  animation: bt-loader-out 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  /* The node lingers for the length of the fade before it is removed. Without
     this it would keep swallowing clicks on the header underneath it for half a
     second after the visitor has already dismissed it. */
  pointer-events: none;
}

.bt-loader-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 620px;
  height: 620px;
  transform: translate(-50%, -50%);
  background: linear-gradient(to top right, rgb(11 92 158 / 0.25), rgb(200 35 44 / 0.2), transparent);
  border-radius: 9999px;
  filter: blur(64px);
  opacity: 0.7;
  pointer-events: none;
}
.bt-loader-grid {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image: radial-gradient(circle at 1px 1px, #ffffff 1px, transparent 0);
  background-size: 24px 24px;
  pointer-events: none;
}

.bt-loader-stage {
  position: relative;
  width: 15rem;
  height: 15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: bt-loader-stage-in 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@media (min-width: 640px) {
  .bt-loader-stage { width: 18rem; height: 18rem; }
}

.bt-loader-ring {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  border: 1px dashed rgb(11 92 158 / 0.3);
  animation: bt-spin 30s linear infinite;
  pointer-events: none;
}
.bt-loader-ring-outer {
  position: absolute;
  inset: -0.625rem;
  border-radius: 9999px;
  border: 1px dotted rgb(200 35 44 / 0.25);
  animation: bt-spin-reverse 40s linear infinite;
  pointer-events: none;
}
.bt-loader-halo {
  position: absolute;
  inset: 1.5rem;
  border-radius: 9999px;
  background: linear-gradient(to bottom right, rgb(11 92 158 / 0.35), rgb(200 35 44 / 0.35));
  filter: blur(24px);
  animation: bt-halo 2.5s ease-in-out infinite alternate;
  pointer-events: none;
}

/* Staged build-up of the brand mark, mirroring the original motion delays. */
.bt-loader-stage svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 16px 40px rgb(0 0 0 / 0.65)); }
.bt-loader-stage .bt-logo-gear-blue   { animation: bt-gear-in-right 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both; }
.bt-loader-stage .bt-logo-gear-red    { animation: bt-gear-in-left  0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both; }
.bt-loader-stage .bt-logo-blade-blue,
.bt-loader-stage .bt-logo-blade-red   { animation: bt-fade-in 0.6s ease 0.8s both; }
.bt-loader-stage .bt-logo-medallion   { animation: bt-pop 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.9s both; transform-origin: 250px 250px; }
.bt-loader-stage .bt-logo-word-top    { animation: bt-fade-in 0.5s ease 1.2s both; }
.bt-loader-stage .bt-logo-word-bottom { animation: bt-fade-in 0.5s ease 1.35s both; }
.bt-loader-stage .bt-logo-machine     { animation: bt-fade-in 0.5s ease 1.5s both; }
.bt-loader-stage .bt-logo-platen-moving { animation: bt-clamp 1.2s ease-in-out 1.7s both; }
.bt-loader-stage .bt-logo-pellets-blue   { animation: bt-pellet-in 0.4s ease 1.9s both; transform-origin: 190px 280px; }
.bt-loader-stage .bt-logo-pellets-red    { animation: bt-pellet-in 0.4s ease 2.1s both; transform-origin: 225px 280px; }
.bt-loader-stage .bt-logo-pellets-yellow { animation: bt-pellet-in 0.4s ease 2.3s both; transform-origin: 260px 280px; }
.bt-loader-stage .bt-logo-pellets-green  { animation: bt-pellet-in 0.4s ease 2.5s both; transform-origin: 295px 280px; }

.bt-loader-wordmark { animation: bt-rise 0.7s ease 1.5s both; }

.bt-loader-bar {
  height: 0.375rem;
  width: 100%;
  background: rgb(255 255 255 / 0.1);
  border-radius: 9999px;
  overflow: hidden;
  padding: 1px;
  border: 1px solid rgb(255 255 255 / 0.1);
}
.bt-loader-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 9999px;
  background: linear-gradient(to right, #0B5C9E, #3B82F6, #C8232C);
  transition: width 0.1s ease-out;
}

/* -----------------------------------------------------------------------------
   Keyframes
   -------------------------------------------------------------------------- */
@keyframes bt-fade-in   { from { opacity: 0; } to { opacity: 1; } }
@keyframes bt-rise      { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes bt-pop       { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: scale(1); } }
@keyframes bt-spin         { to { transform: rotate(360deg); } }
@keyframes bt-spin-reverse { to { transform: rotate(-360deg); } }
@keyframes bt-halo {
  from { opacity: 0.35; transform: scale(0.95); }
  to   { opacity: 0.7;  transform: scale(1.05); }
}
@keyframes bt-gear-in-right {
  from { opacity: 0; transform: translateX(40px) rotate(45deg); }
  to   { opacity: 1; transform: none; }
}
@keyframes bt-gear-in-left {
  from { opacity: 0; transform: translateX(-40px) rotate(-45deg); }
  to   { opacity: 1; transform: none; }
}
@keyframes bt-pellet-in {
  from { opacity: 0; transform: scale(0); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes bt-clamp {
  0%   { transform: translateX(-14px); }
  45%  { transform: translateX(0); }
  100% { transform: translateX(0); }
}
@keyframes bt-loader-out {
  to { opacity: 0; transform: scale(1.02); visibility: hidden; }
}

/* The loader is decorative; skip it entirely for reduced-motion visitors. */
@media (prefers-reduced-motion: reduce) {
  #bt-loader { display: none !important; }
}
