/* The standard side menu for the portal pages (js/side-menu.js): the page's own tab buttons, grouped down the left.
   Colours are the page's theme tokens; theme.css (loaded after this) gives the dark slate look. */
.vq-side {
  position: fixed; top: 0; left: 0; bottom: 0; width: 248px; z-index: 70;
  display: flex !important; flex-direction: column; flex-wrap: nowrap !important; align-items: stretch !important; gap: 2px;
  padding: 18px 12px 24px; margin: 0 !important; overflow-y: auto; overflow-x: hidden;
  background: var(--surface, #fff); border: 0 !important; border-right: 1px solid var(--border, #E3E7EB) !important;
  box-shadow: none; height: auto; scrollbar-width: thin;
}
body.vq-has-side { padding-left: 248px; }
.vq-side .vq-side-group { display: flex; flex-direction: column; gap: 2px; }
.vq-side .vq-side-group + .vq-side-group { margin-top: 14px; }
.vq-side .vq-side-h { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted, #6E7781); padding: 4px 10px 6px; }
.vq-side .vq-side-item {
  display: flex !important; align-items: center; gap: 11px; width: 100%; min-height: 40px; padding: 8px 10px !important; margin: 0 !important;
  border: 0 !important; border-radius: 9px !important; background: transparent !important; color: var(--text-mid, #424A53) !important;
  font-size: 13.5px !important; font-weight: 500 !important; text-align: left; text-decoration: none; white-space: normal; cursor: pointer;
  border-bottom: 0 !important; box-shadow: none !important; position: relative;
}
.vq-side .vq-side-item.hidden, .vq-side .vq-side-item[hidden] { display: none !important; }
.vq-side .vq-side-item svg { width: 18px !important; height: 18px !important; flex: none; stroke-width: 1.75; opacity: .9; }
.vq-side .vq-side-item:hover { background: var(--surface2, #F6F8FA) !important; color: var(--text, #1C2526) !important; }
.vq-side .vq-side-item.active { background: var(--accent-soft, rgba(11,122,117,.10)) !important; color: var(--accent, #0B7A75) !important; font-weight: 600 !important; }
.vq-side .vq-side-item.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent, #0B7A75); }
.vq-side .vq-side-out::after { content: "↗"; margin-left: auto; font-size: 12px; color: var(--text-muted, #6E7781); }
.vq-side [data-tooltip]::after, .vq-side [data-tooltip]::before, .vq-side [data-tip]::after, .vq-side [data-tip]::before { display: none !important; }
.vq-side .tab-badge, .vq-side [id$="-badge"] { margin-left: auto; }
.vq-side-toggle { display: none; }
.vq-side-backdrop { display: none; }

@media (max-width: 900px) {
  body.vq-has-side { padding-left: 0; }
  .vq-side { transform: translateX(-100%); transition: transform .2s ease; width: min(290px, 86vw); box-shadow: 0 0 40px rgba(0,0,0,.35); z-index: 1200; }
  body.vq-side-open .vq-side { transform: none; }
  .vq-side .vq-side-item { min-height: 44px; font-size: 14.5px !important; }
  .vq-side-toggle { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-right: 6px; flex: none;
    border: 1px solid var(--border, #E3E7EB); border-radius: 10px; background: var(--surface, #fff); color: var(--text, #1C2526); cursor: pointer; }
  body.vq-side-open .vq-side-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1150; }
}
/* Phones: the bottom bar (opts.bottom) — the most-used items and More (opens the menu) */
.vq-bottom { display: none; }
@media (max-width: 900px) {
  .vq-bottom { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1100; justify-content: space-around; align-items: stretch;
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom, 0px)); background: var(--surface, #fff); border-top: 1px solid var(--border, #E3E7EB);
    box-shadow: 0 -2px 12px rgba(0,0,0,.08); }
  .vq-bottom-item { position: relative; flex: 1 1 0; min-width: 0; min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    border: 0; border-radius: 10px; background: transparent; color: var(--text-muted, #6E7781); font: inherit; font-size: 11.5px; font-weight: 500; cursor: pointer; padding: 4px 2px; }
  .vq-bottom-item[hidden] { display: none; }
  .vq-bottom-item svg { width: 22px; height: 22px; flex: none; }
  .vq-bottom-lbl { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .vq-bottom-item.is-active { color: var(--accent, #0B7A75); font-weight: 600; background: var(--accent-soft, rgba(11,122,117,.10)); }
  .vq-bottom-item:focus-visible { outline: 3px solid var(--accent, #0B7A75); outline-offset: -3px; }
  .vq-bottom-badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
    background: var(--danger, #B42318); color: var(--on-fill, #fff); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
  body.vq-has-bottom { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  /* keep the floating buttons and the capture send bar above the bottom bar */
  body.vq-has-bottom .fab { bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important; }
  body.vq-has-bottom .vqa-btn { bottom: calc(136px + env(safe-area-inset-bottom, 0px)) !important; }
  body.vq-has-bottom #submit-btn-wrap { bottom: calc(60px + env(safe-area-inset-bottom, 0px)) !important; }
  body.vq-has-bottom #toast-container, body.vq-has-bottom .ds-toasts { bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important; }
}
@media print { .vq-bottom { display: none !important; } body.vq-has-bottom { padding-bottom: 0; } }
@media (prefers-reduced-motion: reduce) { .vq-side { transition: none; } }
@media print { .vq-side, .vq-side-toggle, .vq-side-backdrop { display: none !important; } body.vq-has-side { padding-left: 0; } }
