/* ============================================================
   ps_vertmenu  v2.2
   Desktop : burger → fixed left panel → hover flyout right
   Mobile  : burger → Plaisio slide drawer
   ============================================================ */

:root {
  --vm-accent:   #0054a6;
  --vm-border:   #e0e0e0;
  --vm-fo-bg:    #fff;
  --vm-fo-fg:    #444;
  --vm-fo-head:  #0054a6;
  --vm-fo-section:  #111;
  --vm-fo-sep:   #ebebeb;
  --vm-panel-w:  300px;
  --vm-drawer-w: min(85vw, 340px);
  --vm-speed:    .22s;
  --vm-z:        8000;
}

/* Desktop */
@media (min-width: 1200px) {
  :root {
    --vm-panel-w: 320px;
  }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1199px) {
  :root {
    --vm-panel-w: 280px;
  }
}

/* Reset */
.ps-vertmenu-wrapper *, .ps-vertmenu-wrapper *::before, .ps-vertmenu-wrapper *::after,
.ps-vertmenu-flyout *,  .ps-vertmenu-flyout *::before,  .ps-vertmenu-flyout *::after,
.ps-vm-mob-drawer *,    .ps-vm-mob-drawer *::before,     .ps-vm-mob-drawer *::after {
  box-sizing: border-box; margin: 0; padding: 0;
}

/* ================================================================
   WRAPPER
   ================================================================ */
.ps-vertmenu-wrapper {
  position: relative; display: inline-block;
  vertical-align: middle;
}

/* ================================================================
   TRIGGER
   ================================================================ */
.ps-vertmenu-trigger {
  -webkit-appearance: none; appearance: none;
  outline: none; border: none; background: transparent; cursor: pointer;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  font-family: inherit; font-size: .9rem; font-weight: 600; color: #111;
  border-radius: 4px;
  transition: background var(--vm-speed), color var(--vm-speed);
  user-select: none;
}
.ps-vertmenu-trigger:hover,
.ps-vertmenu-trigger[aria-expanded="true"] { background: #f0f0f0; }

/* Burger icon */
.ps-vertmenu-burger { display: flex; flex-direction: column; gap: 5px; width: 18px; flex-shrink: 0; }
.ps-vertmenu-burger span {
  display: block; height: 2px; background: #111; border-radius: 2px;
  transform-origin: center;
  transition: transform var(--vm-speed), opacity var(--vm-speed);
}
.ps-vertmenu-trigger[aria-expanded="true"] .ps-vertmenu-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ps-vertmenu-trigger[aria-expanded="true"] .ps-vertmenu-burger span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.ps-vertmenu-trigger[aria-expanded="true"] .ps-vertmenu-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.ps-vertmenu-trigger-label { white-space: nowrap; }

/* ================================================================
   OVERLAY
   ================================================================ */
.ps-vertmenu-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: calc(var(--vm-z) - 1);
  opacity: 0;
  transition: opacity var(--vm-speed);
}

/* ================================================================
   DESKTOP CONTAINER + PANEL + FLYOUT
   ================================================================ */

/* Single fixed container; JS sets top/left/maxHeight from trigger rect.
   Panel and flyout are flex children — whichever is taller drives the height,
   the other stretches to match via align-items:stretch. */
#ps-vertmenu-container {
  position: fixed;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  z-index: var(--vm-z);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity var(--vm-speed) ease, transform var(--vm-speed) ease;
  overflow: visible;
}
#ps-vertmenu-container.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Panel – left child, always visible when container is open.
   display:none prevents the panel from expanding the header before JS
   moves it into #ps-vertmenu-container. JS overrides this inline after
   the move so no theme CSS can win a specificity battle against it. */
.ps-vertmenu-panel {
  display: none;
  width: var(--vm-panel-w);
  flex-shrink: 0;
  background: #fff;
  overflow-y: auto;
  border: 1px solid #d8d8d8;
  border-top: none;
  border-radius: 0 0 0 6px;
  box-shadow: 2px 4px 16px rgba(0,0,0,.12);
}

/* When a flyout is open remove the right border and shadow so no line/gradient appears between panel and flyout */
#ps-vertmenu-container.has-flyout .ps-vertmenu-panel {
  box-shadow: none;
  border-right: none;
}
/* Remove hovered item background when flyout is open — it creates a gradient-like edge at the panel/flyout junction */
#ps-vertmenu-container.has-flyout .ps-vertmenu-item.hovered > .ps-vertmenu-link {
  background: transparent !important;
  box-shadow: none !important;
}

/* ================================================================
   PANEL LINKS
   ================================================================ */
.ps-vertmenu-list { list-style: none; padding: 4px 0; margin-bottom: 0.5rem;}
.ps-vertmenu-item {position: relative;margin: 5px;}

.ps-vertmenu-link {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 9px;
  color: #111; text-decoration: none;
  font-size: .975rem; font-weight: 600;
  border-bottom: 1px solid var(--vm-border);
  transition: background var(--vm-speed), color var(--vm-speed);
}
.ps-vertmenu-item:last-child .ps-vertmenu-link { border-bottom: none; }
.ps-vertmenu-link:hover, .has-flyout:hover{ background: #d8d8d8; color: #111; text-decoration: none; border-radius: 6px;}
.ps-vertmenu-item.hovered > .ps-vertmenu-link { background: #f0f0f0; color: #000; text-decoration: none; border-right: none; box-shadow: none; }

/* Icons and Category Images */
.ps-vertmenu-icon { 
  flex-shrink: 0; 
  font-size: 1.2rem;
  min-width: 28px;
  text-align: center;
}

.ps-vertmenu-cat-img {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 4px;
  display: block;
}

.ps-vertmenu-text { flex: 1; }
.ps-vertmenu-arrow {
  margin-left: auto; font-size: 1.1rem; opacity: .35; color: #555;
  transition: opacity var(--vm-speed), transform var(--vm-speed);
}
.ps-vertmenu-item.hovered > .ps-vertmenu-link .ps-vertmenu-arrow { opacity: 1; transform: translateX(3px); }

/* Flyout – right child, appended into container by JS when a row is hovered */
.ps-vertmenu-flyout {
  flex-shrink: 0;
  background: var(--vm-fo-bg);
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid #d8d8d8;
  border-left: none;
  border-top: none;
  border-radius: 0 0 6px 0;
  box-shadow: 4px 0 16px -4px rgba(0,0,0,.10), 0 4px 16px -4px rgba(0,0,0,.10);
  clip-path: inset(0 -20px -20px 0);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-4px);
  transition: opacity var(--vm-speed) ease, transform var(--vm-speed) ease;
  padding: 1.25rem;
}
.ps-vertmenu-flyout.visible { opacity: 1; pointer-events: auto; transform: translateX(0); }

/* Flyout inner — 3 equal columns grid, matching Plaisio layout */
.ps-vertmenu-flyout-inner {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-gap: 1.25rem;
  gap: 1.25rem;
  align-items: start;
}

/* Column */
.ps-vertmenu-column {
  padding: 0 1.25rem;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--vm-fo-sep);
}
.ps-vertmenu-column:first-child { border-left: none; padding-left: 0; }

.ps-vertmenu-col-title {
  font-size: .9rem; font-weight: 700; color: var(--vm-fo-head);
  margin: 0 0 12px; padding-bottom: 7px;
  border-bottom: 1px solid red;
}

/* Section inside column */
.ps-vertmenu-section { margin-bottom: 5px; }
.ps-vertmenu-section:last-child { margin-bottom: 10px; }
.ps-vertmenu-section-title {
  font-size: .9rem; font-weight: 700; color: var(--vm-fo-section);
  margin-bottom: 1px;
}

/* ── Entry types ── */

/* Label: bold heading inside a section */
.ps-vm-entry-label {
  font-size: .9rem; font-weight: 700; color: var(--vm-fo-head);
  margin: 8px 0 3px; padding-bottom: 7px;
  border-bottom: 1px solid red;
  display: block;
}
.ps-vm-entry-label:first-child { margin-top: 0; }

/* Label with link */
a.ps-vm-entry-label {
  text-decoration: none;
  transition: color var(--vm-speed);
}
a.ps-vm-entry-label:hover { color: var(--vm-accent); }

/* Link */
.ps-vm-entry-link {
  display: block; font-size: .8rem; color: var(--vm-fo-fg);
  padding: 3px 0; text-decoration: none;
  transition: color var(--vm-speed), padding-left var(--vm-speed);
}
.ps-vm-entry-link:hover { color: var(--vm-accent); }

/* HTML block */
.ps-vm-entry-html { font-size: .8rem; color: var(--vm-fo-fg); line-height: 1.5; }
.ps-vm-entry-html a { color: var(--vm-accent); }

/* Brands – 2 per row, images max 28px tall */
.ps-vm-brands-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 6px; margin: 4px 0;
}
.ps-vm-brand-item {
  display: flex; align-items: center; justify-content: center;
  padding: 5px 8px; border: 1px solid var(--vm-fo-sep);
  border-radius: 4px; text-decoration: none;
  min-height: 40px;
  transition: border-color var(--vm-speed), box-shadow var(--vm-speed);
}
.ps-vm-brand-item:hover { border-color: var(--vm-accent); box-shadow: 0 0 0 2px rgba(230,57,70,.12); }
.ps-vm-brand-item img {
  max-height: 48px; width: auto; max-width: 64px;
  object-fit: contain; display: block;
}
.ps-vm-brand-name { font-size: .75rem; color: var(--vm-fo-fg); text-align: center; }

/* ================================================================
   MOBILE DRAWER
   ================================================================ */
.ps-vm-mob-drawer {
  position: fixed; top: 0; left: 0;
  width: var(--vm-drawer-w); height: 100dvh;
  z-index: var(--vm-z); overflow: hidden; background: #fff;
  transform: translateX(-105%);
  transition: transform var(--vm-speed) ease;
}
.ps-vm-mob-drawer.open { transform: translateX(0); }

.ps-vm-panel {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  display: flex; flex-direction: column; background: #fff;
  transform: translateX(100%);
  transition: transform var(--vm-speed) ease;
  overflow-y: auto;
}
.ps-vm-panel--active    { transform: translateX(0); }
.ps-vm-panel--exit-left { transform: translateX(-30%); }

.ps-vm-panel-head {
  display: flex; align-items: center; gap: 10px;
  padding: 0 16px; min-height: 52px;
  background: #011b56; color: #fff; flex-shrink: 0;
}
.ps-vm-panel-head--root { justify-content: space-between; }
.ps-vm-panel-title { flex: 1; font-size: .9rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ps-vm-back {
  display: flex; align-items: center; gap: 6px;
  background: none; border: none; color: #fff;
  font-size: .875rem; font-weight: 600; cursor: pointer; padding: 0;
}
.ps-vm-back:hover { opacity: .8; }
.ps-vm-close {
  background: none; border: none; color: #fff;
  font-size: 1.1rem; cursor: pointer; padding: 4px; line-height: 1;
}
.ps-vm-chevron-right, .ps-vm-chevron-left { font-size: 1.2rem; line-height: 1; }

.ps-vm-view-all {
  display: block; padding: 11px 16px;
  color: #111; font-size: .83rem; font-weight: 600;
  text-decoration: none; border-bottom: 1px solid var(--vm-border);
  background: #f9f9f9;
}
.ps-vm-view-all:hover { background: #f0f0f0; }

.ps-vm-list { list-style: none; flex: 1; }
.ps-vm-item { border-bottom: 1px solid var(--vm-border); }
.ps-vm-item:last-child { border-bottom: none; }

/* Mobile row styling with category images */
.ps-vm-row {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 14px 16px;
  background: #fff; border: none;
  color: #111; font-size: .9rem; font-weight: 500;
  text-decoration: none; text-align: left; cursor: pointer;
  transition: background var(--vm-speed);
}
.ps-vm-row:hover { background: #f0f0f0; text-decoration: none; }
.ps-vm-row-label { flex: 1; }
.ps-vm-row-icon { 
  flex-shrink: 0; 
  font-size: 1.2rem;
  min-width: 28px;
  text-align: center;
}
.ps-vm-row .ps-vertmenu-cat-img {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.ps-vm-chevron-right { color: #aaa; margin-left: auto; }

/* Mobile heading levels */
.ps-vm-item--col-head {
  padding: 8px 16px 4px; font-size: .9rem; font-weight: 700; color: #111;
  background: #f0f0f0; cursor: default; border-top: 2px solid #011b56;
}
.ps-vm-item--sec-head {
  padding: 6px 16px; font-size: .75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; color: #888;
  background: #f5f5f5; cursor: default;
}
.ps-vm-item--label {
  padding: 8px 16px; font-size: .8rem; font-weight: 700; color: #333; cursor: default;
}
.ps-vm-item--html { padding: 10px 16px; font-size: .8rem; }
.ps-vm-html-block a { color: var(--vm-accent); }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (min-width: 768px) {
  .ps-vertmenu-mobile-only { display: none !important; }
  .ps-vertmenu-trigger-label { display: inline; }
}
@media (max-width: 767px) {
  .ps-vertmenu-desktop-only { display: none !important; }
  .ps-vertmenu-flyout       { display: none !important; }
  .ps-vertmenu-trigger-label { display: none; }
  .ps-vertmenu-trigger { padding: 10px 12px; }
}
/* Add these rules to contain HTML content within column width */

/* For desktop flyout columns */
.ps-vertmenu-column {
  padding: 0 1.25rem;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--vm-fo-sep);
  min-width: 0; /* Important: allows flex children to shrink below content size */
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

/* HTML content inside columns */
.ps-vm-entry-html {
  font-size: .8rem;
  color: var(--vm-fo-fg);
  line-height: 1.5;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
}

/* Images inside HTML content */
.ps-vm-entry-html img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Tables inside HTML content */
.ps-vm-entry-html table {
  max-width: 100%;
  display: block;
  overflow-x: auto;
  white-space: nowrap;
}

/* Iframes and videos */
.ps-vm-entry-html iframe,
.ps-vm-entry-html video {
  max-width: 100%;
  height: auto;
}

/* Any block elements inside HTML */
.ps-vm-entry-html div,
.ps-vm-entry-html p,
.ps-vm-entry-html ul,
.ps-vm-entry-html ol {
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* For mobile drawer */
.ps-vm-item--html {
  padding: 10px 16px;
  font-size: .8rem;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

.ps-vm-html-block {
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
}

.ps-vm-html-block img {
  max-width: 100%;
  height: auto;
}
body > .ps-vertmenu-flyout {
  position: fixed !important;
  top: -9999px !important;
  left: -9999px !important;
}