/* ============================================================
 * Mathersoft_Flippingbook — Catalogi-paneel global CSS (v3.4.20)
 *
 * Wordt op ELKE pagina geladen via default.xml omdat het catalogi-paneel
 * (slide-in drawer met overzicht van alle leverancier-catalogi) via
 * catalogi.phtml in elke pagina wordt geinjecteerd.
 *
 * Eerder werd viewer.css global geladen (v3.4.18) maar die bevat regels
 * zoals #overlay { z-index: 80000 !important; } die de Hyva cart-drawer
 * (z-index: 51) onderdrukken op niet-flipbook pages.
 *
 * Deze file bevat alleen de drawer/sidebar regels nodig voor het catalogi-
 * paneel, met redelijke z-index (105) en zonder generic-selector conflicten.
 * ============================================================ */


/* =============================================================
 * FB_SEARCH_SIDEBAR (v2.8.3) — persistent search-results panel
 * Slide-in van links over de flipbook. Niet modaal, user kan blijven
 * scrollen door resultaten en klikken om naar pagina's te springen.
 * ============================================================= */
.fb-search-sidebar {
  /* Floating drawer match met cart-drawer (msp-drawer-outer) — mirror left */
  position: fixed;
  top: 16px;
  left: 16px;
  bottom: 16px;
  width: 320px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  background: #fff;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  border-radius: 12px;
  overflow: hidden;
  z-index: 105;   /* FB_ZINDEX_FINAL — boven mobile-drawer (95), onder fb-popup (110) */
  display: flex;
  flex-direction: column;
  transform: translateX(-120%);
  transition: transform 0.28s cubic-bezier(.4, 0, .2, 1);
  pointer-events: none;
  font-family: 'Inter', system-ui, sans-serif;
}
@media (max-width: 640px) {
  .fb-search-sidebar {
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw;
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 0;
  }
}
.fb-search-sidebar.fb-sidebar-open {
  transform: translateX(0);
  pointer-events: auto;
}
.fb-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 14px;
  background: transparent;
  flex-shrink: 0;
}
.fb-sidebar-header h2 {
  font-size: 1.25rem;
  font-weight: 500;
  color: #1A2E52;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.fb-sidebar-close {
  background: none;
  border: 0;
  cursor: pointer;
  color: #1A2E52;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity 0.12s;
}
.fb-sidebar-close:hover { opacity: 1; }
.fb-sidebar-query {
  padding: 8px 16px;
  font-size: 12px;
  color: #6b7280;
  border-bottom: 1px solid #f3f4f6;
  background: #f9fafb;
}
.fb-sidebar-query strong {
  color: #111827;
  font-weight: 600;
}
.fb-sidebar-list {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0;
}
.fb-sb-section-label {
  padding: 10px 16px 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  background: #f9fafb;
  border-top: 1px solid #f3f4f6;
  position: sticky;
  top: 0;
  z-index: 1;
}
.fb-sb-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
  transition: background 0.12s;
}
.fb-sb-row:hover { background: #fff7ed; }
.fb-sb-img {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  object-fit: contain;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}
.fb-sb-info { flex: 1 1 auto; min-width: 0; }
.fb-sb-sku {
  font-size: 11px;
  color: #6b7280;
  font-weight: 500;
  margin-bottom: 2px;
}
.fb-sb-pg {
  display: inline-block;
  background: #E8520A;
  color: #fff;
  font-size: 10px;
  padding: 1px 6px;

/* ============================================================
 * FB_CATALOGI_SIDEBAR specifieke styling
 * ============================================================ */

 * FB_CATALOGI_SIDEBAR (v3.4.2) — gedeelde stijl met fb-search-sidebar
 * Lijst van alle catalogi in een floating left-drawer.
 * ============================================================ */
.fb-catalogi-sidebar.fb-search-sidebar {
  /* erft alle position/size/transform/transition van .fb-search-sidebar */
  z-index: 9990; /* boven cart/wishlist drawers (9999) zou conflicten geven; lager dus blijft eronder */
}
.fb-catalogi-sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.18);
  z-index: 9988;
  border: 0;
  cursor: pointer;
  display: none;
  opacity: 0;
  transition: opacity 0.28s ease;
}
body.fb-catalogi-sidebar-open .fb-catalogi-sidebar-backdrop {
  display: block;
  opacity: 1;
}
.fb-catalogi-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  text-decoration: none;
  color: #1A2E52;
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.12s;
}
.fb-catalogi-item:hover {
  background: #fff7f2;
  color: #E8520A;
}
.fb-catalogi-cover {
  width: 56px;
  height: 76px;
  object-fit: cover;
  border-radius: 4px;
  background: #f3f4f6;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.fb-catalogi-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.fb-catalogi-title {
  font-size: 14px;
  font-weight: 600;
  color: #1A2E52;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fb-catalogi-count {
  font-size: 11px;
  color: #6b7280;
}
.fb-catalogi-chevron {
  color: #9ca3af;
  flex-shrink: 0;
  transition: transform 0.12s;
}
.fb-catalogi-item:hover .fb-catalogi-chevron {
  color: #E8520A;
  transform: translateX(2px);
}

/* ============================================================


/* ============================================================
 * FB_CATALOGI_OVERRIDES (v3.4.21) — sterke overrides om Tailwind preflight
 * of Hyva theme CSS te beat. Op niet-flipbook pages worden Magento/Hyva
 * styles op img/a elementen geladen die mijn cascade kunnen overschrijven.
 * ============================================================ */
#fbCatalogiSidebar .fb-catalogi-item {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 10px 16px !important;
  text-decoration: none !important;
  color: #1A2E52 !important;
  border-bottom: 1px solid #f3f4f6 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
#fbCatalogiSidebar .fb-catalogi-cover {
  width: 56px !important;
  height: 76px !important;
  object-fit: cover !important;
  border-radius: 4px !important;
  flex-shrink: 0 !important;
  max-width: 56px !important;
  max-height: 76px !important;
  min-width: 56px !important;
}
#fbCatalogiSidebar .fb-catalogi-meta {
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  min-width: 0 !important;
}
#fbCatalogiSidebar .fb-catalogi-title {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #1A2E52 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
#fbCatalogiSidebar .fb-catalogi-count {
  font-size: 11px !important;
  color: #6b7280 !important;
}
#fbCatalogiSidebar .fb-catalogi-chevron {
  flex-shrink: 0 !important;
  color: #9ca3af !important;
}

/* ============================================================
 * FB_CATALOGI_FAB (v3.4.3) — blauwe catalogi-knop links, BOVEN #fab-feedback ("mannetje")
 * Stijl matched fab-feedback exact: vierkant, plat tegen linkerrand,
 * blauwe border, wit-blauwe content. Geen ronde cirkel.
 * Position: tegen linkerrand, BOVEN #fab-feedback met ~6px gap.
 * ============================================================ */
.fab-catalogi-btn {
  position: fixed;
  left: 0;
  /* fab-feedback: top: calc(30% + 2rem + 6px) (mobile) → catalogi 2rem+6px erboven */
  top: calc(30% - 6px);
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-right:  2px solid #2563eb;
  border-top:    2px solid #2563eb;
  border-bottom: 2px solid #2563eb;
  border-left:   none;
  background:    #fff;
  color:         #2563eb;
  box-shadow:    2px 2px 6px rgba(0,0,0,.15);
  cursor:        pointer;
  transition:    background-color .2s, color .2s;
  border-radius: 0 !important;  /* override eerdere round */
}
.fab-catalogi-btn:hover,
.fab-catalogi-btn:focus-visible {
  background: #2563eb;
  color: #fff;
  outline: none;
}
.fab-catalogi-btn svg { display: block; width: 18px; height: 18px; }
@media (min-width: 768px) {
  .fab-catalogi-btn {
    width: 3rem;
    height: 3rem;
    /* fab-feedback desktop: top: calc(30% + 3rem + 6px) → catalogi: 3rem + 6px erboven */
    top: calc(30% - 6px);
  }
  .fab-catalogi-btn svg { width: 24px; height: 24px; }
}


/* ============================================================
 * SUPER_FORCE (v3.5.3) — Maximale zichtbaarheid garantie
 * Override TAILWIND + theme + Hyva utilities die mogelijk display:none zetten
 * ============================================================ */
.fab-catalogi-btn,
button.fab-catalogi-btn,
#fab-catalogi,
button#fab-catalogi {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* ============================================================
 * FB_CATALOGI_FAB_FORCE (v3.4.14) — Strong override om te voorkomen dat
 * de knop linksonder eindigt (gerapporteerd op PDP/category pages).
 * Forceer positie boven fab-feedback (smiley), zelfde rechter-as styling.
 * ============================================================ */
.fab-catalogi-btn,
button.fab-catalogi-btn,
#fab-catalogi {
  position: fixed !important;
  left: 0 !important;
  right: auto !important;
  bottom: auto !important;
  /* Plaats EXACT op zelfde top als #fab-feedback minus 1 button-height + gap */
  top: calc(30% - 6px) !important;
  z-index: 9 !important;
}
@media (min-width: 768px) {
  .fab-catalogi-btn,
  button.fab-catalogi-btn,
  #fab-catalogi {
    /* Op desktop: fab-feedback staat op top:calc(30% + 3rem + 6px) (mobile: +2rem)
       → catalogi 1 button erboven = top: 30% - 6px (voor mobiel) of 30% (desktop) */
    top: 30% !important;
  }
}
