/* App-side (uten tema) */
html.bdp-app-page, body.bdp-app-page{height:100%;}
body.bdp-app-page{margin:0; overflow:hidden; background:#f3f4f6; padding-top:var(--bdp-adminbar, 0px); box-sizing:border-box;}
body.bdp-app-page .bdp-app{
  width:100%;
  height:calc(100vh - var(--bdp-adminbar, 0px));
  border-radius:0;
  box-shadow:none;
}
body.bdp-app-page .bdp-body{display:flex; flex:1; min-height:0;}
body.bdp-app-page .bdp-content{overflow:auto; min-height:0;; min-height:0; overflow:auto}
body.bdp-app-page .bdp-sidebar{overflow:auto; min-height:0;; min-height:0; overflow:auto}

/* when fullscreen is active, keep the page from scrolling behind the app */
/* admin bar offset */
.bdp-app{display:flex; flex-direction:column; font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif; border:1px solid #e5e7eb; border-radius:12px; overflow:hidden; background:#fff; min-height:520px;}

/* Unified tile sizing (Bygget/Forespørsel/Tilbud sendt/Kø/Handlekurv/Refresh) */
.bdp-app{
  --bdp-tile-w: 76px;
  --bdp-tile-h: 64px;
  --bdp-tile-py: 6px;
  --bdp-tile-px: 8px;
}

.bdp-topbar{
  /* Force vertical centering in the portal header row (some themes override flex alignment). */
  display:flex !important;
  align-items:center !important;
  justify-content:space-between;
  padding:10px 16px !important;
  border-bottom:1px solid #e5e7eb;
  background:#fafafa;
  box-sizing:border-box;
  min-height:86px !important;

  position:relative !important;
  z-index:10000;
  overflow:visible;
}
.bdp-topbar-right{
  display:flex !important;
  /* Keep everything (Kø + tiles + tools) on ONE row and aligned to the top edge */
  align-items:flex-start !important;
  justify-content:flex-end;
  gap:12px;
  flex-wrap:nowrap;
  height:100%;
  /* give a little extra breathing room from the right edge */
  padding-right:2px;
}

/* When the BDPL tools wrapper is docked into the portal topbar, it must behave as a normal flex child
   (the BDPL productlister stylesheet defines this class for absolute positioning in theme headers). */
.bdp-topbar-right > .bdpl-header-tools{
  position:static !important;
  top:auto !important;
  right:auto !important;
  transform:none !important;
  display:flex !important;
  align-items:flex-start !important;
  justify-content:flex-end;
  gap:12px;
  height:100%;
  margin:0;
}
/* When BDPL's VAT/cart controls are docked into the topbar, keep them aligned and tidy */
.bdp-topbar-right .bdpl-toolbar{
  display:flex;
  align-items:flex-start;
  justify-content:flex-end;
  gap:12px;
  flex-wrap:nowrap;
  margin:0;
}

/* Ensure docked groups never create a second row inside the topbar */
.bdp-topbar-right .bdpl-toolbar,
.bdp-topbar-right > .bdpl-header-tools{
  white-space:nowrap;
}
.bdp-topbar-right .bdpl-vat-toggle--inline{margin:0;}
.bdp-topbar-right .bdpl-vat-toggle__label{margin-right:6px;}
.bdp-topbar-right .bdpl-vat-toggle__mode{margin-left:6px;}
.bdp-topbar-right .bdpl-vat-toggle__tabtext{margin-left:10px;}
.bdp-topbar-right .bdpl-icon-btn{margin:0;}

/* Make Handlekurv + Refresh match header tiles (same size as Kø / status buttons) */
.bdpl-header-tools .bdpl-icon-btn,
.bdpl-header-tools .bdpl-cart-top,
.bdpl-header-tools .bdpl-cart-top a,
.bdpl-header-tools .bdpl-cart-top button,
.bdpl-header-tools .bdpl-refresh,
.bdpl-header-tools .bdpl-refresh-btn,
.bdpl-header-tools .dashboard-refresh,
.bdpl-header-tools .bd-dashboard-refresh,

.bdpl-refreshdock .bdpl-icon-btn,
.bdpl-refreshdock .bdpl-cart-top,
.bdpl-refreshdock .bdpl-cart-top a,
.bdpl-refreshdock .bdpl-cart-top button,
.bdpl-refreshdock .bdpl-refresh,
.bdpl-refreshdock .bdpl-refresh-btn,
.bdpl-refreshdock .dashboard-refresh,
.bdpl-refreshdock .bd-dashboard-refresh,

/* If BDPL buttons are injected directly into the portal topbar (no wrapper classes) */
.bdp-topbar-right .bdpl-icon-btn,
.bdp-topbar-right .bdpl-cart-top,
.bdp-topbar-right .bdpl-cart-top a,
.bdp-topbar-right .bdpl-cart-top button,
.bdp-topbar-right .bdpl-refresh,
.bdp-topbar-right .bdpl-refresh-btn,
.bdp-topbar-right .dashboard-refresh,
.bdp-topbar-right .bd-dashboard-refresh,

.bdpl-header-tools button[title*="refresh" i],
.bdpl-header-tools button[aria-label*="refresh" i],
.bdpl-header-tools a[title*="refresh" i],
.bdpl-header-tools a[aria-label*="refresh" i],
.bdpl-refreshdock button[title*="refresh" i],
.bdpl-refreshdock button[aria-label*="refresh" i],
.bdpl-refreshdock a[title*="refresh" i],
.bdpl-refreshdock a[aria-label*="refresh" i],
.bdp-topbar-right button[title*="refresh" i],
.bdp-topbar-right button[aria-label*="refresh" i],
.bdp-topbar-right a[title*="refresh" i],
.bdp-topbar-right a[aria-label*="refresh" i]
{
  width:var(--bdp-tile-w) !important;
  min-width:var(--bdp-tile-w) !important;
  height:var(--bdp-tile-h) !important;
  min-height:var(--bdp-tile-h) !important;
  padding:var(--bdp-tile-py) var(--bdp-tile-px) !important;
  border:1px solid rgba(0,0,0,0.08) !important;
  background:var(--bdp-accent, #3a8f8b) !important;
  border-radius:12px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:4px;
  text-decoration:none !important;
  line-height:1;
  box-sizing:border-box !important;
}

/* Ensure cart/refresh wrappers don't add extra spacing that changes perceived size */
.bdp-topbar-right .bdpl-cart-top,
.bdpl-header-tools .bdpl-cart-top,
.bdpl-refreshdock .bdpl-cart-top{
  margin:0 !important;
  padding:0 !important;
}

/* Normalize inner icon size so Refresh doesn't look smaller than Handlekurv */
.bdp-topbar-right .bdpl-icon-btn svg,
.bdp-topbar-right .bdpl-icon-btn img,
.bdp-topbar-right .bdpl-cart-top svg,
.bdp-topbar-right .bdpl-cart-top img,
.bdpl-header-tools .bdpl-icon-btn svg,
.bdpl-header-tools .bdpl-icon-btn img,
.bdpl-header-tools .bdpl-cart-top svg,
.bdpl-header-tools .bdpl-cart-top img,
.bdpl-refreshdock .bdpl-icon-btn svg,
.bdpl-refreshdock .bdpl-icon-btn img,
.bdpl-refreshdock .bdpl-cart-top svg,
.bdpl-refreshdock .bdpl-cart-top img{
  width:24px !important;
  height:24px !important;
  max-width:24px !important;
  max-height:24px !important;
}

/* Keep header tiles perfectly flush */
.bdp-topbar-right,
.bdp-topbar-right > .bdpl-header-tools,
.bdp-topbar-right .bdpl-toolbar,
.bdp-topbar-right .bdpl-refreshdock{
  flex-wrap:nowrap !important;
}

/* Ensure header tiles measure exactly the same size (border-box). */
.bdp-status-btn,
.bdp-queue-logo,
.bdp-topbar-right .bdpl-header-tools .bdpl-icon-btn,
.bdp-topbar-right .bdpl-header-tools .bdpl-cart-top,
.bdp-topbar-right .bdpl-header-tools .bdpl-refresh,
.bdp-topbar-right .bdpl-header-tools .bdpl-refresh-btn,
.bdp-topbar-right .bdpl-header-tools .dashboard-refresh,
.bdp-topbar-right .bdpl-header-tools .bd-dashboard-refresh,
.bdp-topbar-right .bdpl-refreshdock .bdpl-icon-btn,
.bdp-topbar-right .bdpl-refreshdock .bdpl-cart-top,
.bdp-topbar-right .bdpl-refreshdock .bdpl-refresh,
.bdp-topbar-right .bdpl-refreshdock .bdpl-refresh-btn,
.bdp-topbar-right .bdpl-refreshdock .dashboard-refresh,
.bdp-topbar-right .bdpl-refreshdock .bd-dashboard-refresh,
.bdp-topbar-right button[title*="refresh" i],
.bdp-topbar-right button[aria-label*="refresh" i],
.bdp-topbar-right a[title*="refresh" i],
.bdp-topbar-right a[aria-label*="refresh" i]{
  box-sizing:border-box !important;
}



/* BDNB refresh button (class-based) must also match the header tiles */
.bdp-topbar-right .bdnb-refreshbtn,
.bdpl-header-tools .bdnb-refreshbtn,
.bdpl-refreshdock .bdnb-refreshbtn{
  width:var(--bdp-tile-w) !important;
  min-width:var(--bdp-tile-w) !important;
  height:var(--bdp-tile-h) !important;
  min-height:var(--bdp-tile-h) !important;
  padding:0 !important; /* icon-only */
  border:1px solid rgba(0,0,0,0.12) !important;
  background:#fff !important;
  border-radius:12px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  box-sizing:border-box !important;
  margin:0 !important;
}

/* Normalize refresh icon size so it matches cart icon visually */
.bdp-topbar-right .bdnb-refreshbtn svg,
.bdpl-header-tools .bdnb-refreshbtn svg,
.bdpl-refreshdock .bdnb-refreshbtn svg{
  width:24px !important;
  height:24px !important;
  max-width:24px !important;
  max-height:24px !important;
}

/* Ensure icon-only refresh buttons scale correctly */
.bdpl-header-tools button[title*="refresh" i] svg,
.bdpl-header-tools button[aria-label*="refresh" i] svg,
.bdpl-header-tools a[title*="refresh" i] svg,
.bdpl-header-tools a[aria-label*="refresh" i] svg{
  width:22px !important;
  height:22px !important;
}


.bdp-topbar-right .bdpl-header-tools .bdpl-icon-btn:hover,
.bdp-topbar-right .bdpl-header-tools .bdpl-cart-top:hover,
.bdp-topbar-right .bdpl-header-tools .bdpl-refresh:hover,
.bdp-topbar-right .bdpl-header-tools .bdpl-refresh-btn:hover,
.bdp-topbar-right .bdpl-header-tools .dashboard-refresh:hover,
.bdp-topbar-right .bdpl-header-tools .bd-dashboard-refresh:hover,
.bdp-topbar-right .bdpl-refreshdock .bdpl-icon-btn:hover,
.bdp-topbar-right .bdpl-refreshdock .bdpl-cart-top:hover,
.bdp-topbar-right .bdpl-refreshdock .bdpl-refresh:hover,
.bdp-topbar-right .bdpl-refreshdock .bdpl-refresh-btn:hover,
.bdp-topbar-right .bdpl-refreshdock .dashboard-refresh:hover,
.bdp-topbar-right .bdpl-refreshdock .bd-dashboard-refresh:hover{
  filter:brightness(.92);
}

/* Ensure any SVG/icons inside become white like the other tiles */
.bdp-topbar-right .bdpl-header-tools .bdpl-icon-btn svg,
.bdp-topbar-right .bdpl-header-tools .bdpl-cart-top svg,
.bdp-topbar-right .bdpl-header-tools .bdpl-refresh svg,
.bdp-topbar-right .bdpl-header-tools .bdpl-refresh-btn svg,
.bdp-topbar-right .bdpl-header-tools .dashboard-refresh svg,
.bdp-topbar-right .bdpl-header-tools .bd-dashboard-refresh svg,
.bdp-topbar-right .bdpl-refreshdock .bdpl-icon-btn svg,
.bdp-topbar-right .bdpl-refreshdock .bdpl-cart-top svg,
.bdp-topbar-right .bdpl-refreshdock .bdpl-refresh svg,
.bdp-topbar-right .bdpl-refreshdock .bdpl-refresh-btn svg,
.bdp-topbar-right .bdpl-refreshdock .dashboard-refresh svg,
.bdp-topbar-right .bdpl-refreshdock .bd-dashboard-refresh svg{
  fill:#fff;
  color:#fff;
}
.bdp-brand{font-weight:700; letter-spacing:.2px;}
.bdp-body{display:flex; min-height:520px;}

/* Unified tile sizing (Bygget/Forespørsel/Tilbud sendt/Kø/Handlekurv/Refresh) */
.bdp-app{
  --bdp-tile-w: 76px;
  --bdp-tile-h: 64px;
  --bdp-tile-py: 6px;
  --bdp-tile-px: 8px;
}

.bdp-sidebar{width:260px; border-right:1px solid #e5e7eb; background:#fcfcfc; padding:10px;}
.bdp-content{flex:1; padding:18px 20px;}
.bdp-footer{padding:10px 16px; border-top:1px solid #e5e7eb; background:#fafafa; font-size:13px; color:#6b7280;}

.bdp-nav-list,.bdp-nav-sublist{list-style:none; margin:0; padding:0;}
.bdp-nav-item{margin:2px 0;}
.bdp-nav-link{display:flex; align-items:center; justify-content:space-between; padding:10px 10px; border-radius:10px; text-decoration:none; color:#111827;}
.bdp-nav-link:hover{background:#f3f4f6;}
.bdp-nav-item.is-current > .bdp-nav-link{background:#e5e7eb; font-weight:600;}
.bdp-nav-item.has-children > .bdp-nav-sublist{display:none;}
.bdp-nav-item.has-children.is-open > .bdp-nav-sublist{display:block;}
.bdp-nav-caret{margin-left:auto; font-size:12px; opacity:.7; transition:transform .15s ease;}
.bdp-nav-item.has-children.is-open > .bdp-nav-link .bdp-nav-caret{transform:rotate(180deg);}

.bdp-nav-sublist{margin:2px 0 6px 12px; padding-left:8px; border-left:2px solid #e5e7eb;}
.bdp-nav-sublist .bdp-nav-link{padding:8px 10px; font-size:14px;}

.bdp-no-access{padding:14px 16px; border:1px solid #fecaca; background:#fff1f2; border-radius:12px;}

@media (max-width: 900px){
  .bdp-body{flex-direction:column;}
  .bdp-sidebar{width:auto; border-right:0; border-bottom:1px solid #e5e7eb;}
}

/* Mobile: allow the topbar to wrap nicely without pushing controls into a new "content header" row */
@media (max-width: 680px){
  .bdp-topbar{flex-wrap:wrap; gap:8px;}
  .bdp-topbar-left{min-width:120px;}
  .bdp-topbar-right{width:100%; justify-content:flex-end; row-gap:8px;}
}
/* Header status buttons (Produktlister) */
.bdp-topbar-left{
  display:flex;
  align-items:center;
  gap:14px;
  min-width:0;
}

/* Accent color for dashboard tiles (defaults; JS will try to match theme button.alt) */
:root{
  --bdp-accent: #3a8f8b;
}
.bdp-status-actions{
  /* Keep status tiles the same size as the other header tiles */
  --bdp-tile-h: 64px;
  display:flex;
  align-items:stretch;
  gap:8px;
  /* positioned dynamically to align with Periode-filter (bdpl-date-preset) */
  position:absolute !important;
  left:var(--bdp-status-left, 0px);
  top:50%;
  transform:translateY(-50%);
  margin:0;
  z-index:10001;
}

.bdp-status-ddwrap{
  position:relative;
}
/* Square status tiles in header */
.bdp-status-btn{
  box-sizing:border-box;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  width:var(--bdp-tile-w);
  height:var(--bdp-tile-h);
  padding:var(--bdp-tile-py) var(--bdp-tile-px);
  border:1px solid rgba(0,0,0,0.08);
  background:var(--bdp-accent, #3a8f8b);
  border-radius:12px;
  cursor:pointer;
  font-weight:700;
  line-height:1;
  color:#fff !important;
}
.bdp-status-btn__count{color:#fff !important;}
.bdp-status-btn__title{color:#fff !important;}
.bdp-status-btn:hover{
  filter:brightness(.92);
}
.bdp-status-btn[aria-expanded="true"]{
  filter:brightness(.92);
}

.bdp-status-btn__count{
  display:block;
  font-size:18px;
  font-weight:800;
  margin:0 0 4px 0;
}
.bdp-status-btn__title{
  display:block;
  font-size:11px;
  font-weight:600;
  line-height:1.1;
  text-align:center;
  white-space:normal;
}

/* Optional preview lines inside status tiles */
.bdp-status-btn__customer{
  display:block;
  margin-top:4px;
  font-size:11px;
  font-weight:600;
  line-height:1.1;
  text-align:center;
  color:#fff !important;
  white-space:nowrap;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
}
.bdp-status-btn__value{
  display:block;
  margin-top:2px;
  font-size:12px;
  font-weight:800;
  line-height:1.1;
  text-align:center;
  color:#ff3b30 !important; /* rød uthevet pris */
  white-space:nowrap;
}
/* Keep same accent when open (do not switch to gray) */
.bdp-status-menu{
  position:absolute;
  top:calc(100% + 6px);
  left:0;
  width:260px;
  max-height:320px;
  overflow:auto;
  border:1px solid #d1d5db;
  background:#fff !important;
  border-radius:12px;
  box-shadow:0 10px 25px rgba(0,0,0,0.08);
  padding:6px;
  z-index:9999;}
.bdp-status-link{
  display:block;
  padding:8px 10px;
  border-radius:0;
  color:#111827;
  text-decoration:none;
  border:1px solid transparent;
}

/* Dropdown row layout: number + name on first line, price on the right (red) */
.bdp-status-link__line{
  display:flex;
  gap:8px;
  align-items:baseline;
  flex-wrap:wrap;
}
.bdp-status-link__no{
  font-weight:700;
}
.bdp-status-link__name{
  color:#374151;
  font-weight:600;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  max-width:160px;
}
.bdp-status-link__value{
  display:block;
  margin-top:2px;
  font-weight:800;
  color:#ff3b30; /* rød uthevet pris */
}
.bdp-status-link:hover{
  background:#f3f4f6;
  border-color:#e5e7eb;
}
.bdp-status-empty,
.bdp-status-more{
  padding:8px 10px;
  color:#6b7280;
  font-size:13px;
}
/* Ensure status dropdowns are not hidden/stacked behind content */
/* removed overflow:visible (broke filters) */
.bdp-app{ overflow:hidden; }
.bdp-status-actions, .bdp-status-ddwrap{ position:relative; z-index:10001; }
.bdp-status-menu{ z-index:10002; }


/* ------------------------------------------------------------------
   Kø-logo + modal
------------------------------------------------------------------ */
.bdp-topbar-left{display:flex; align-items:center; gap:10px;}
.bdp-queue-logo{
  box-sizing:border-box;
  /* Match status tiles (Bygget / Forespørsel / Tilbud sendt) */
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  width:var(--bdp-tile-w);
  height:var(--bdp-tile-h);
  padding:var(--bdp-tile-py) var(--bdp-tile-px);
  border:1px solid rgba(0,0,0,0.08);
  background:var(--bdp-accent, #3a8f8b);
  border-radius:12px;
  cursor:pointer;
  font-weight:700;
  line-height:1;
  color:#fff !important;
}
.bdp-queue-logo:hover{filter:brightness(.92);}

/* The count is rendered inline (no floating badge) */
.bdp-queue-logo__count{color:#fff !important;}
.bdp-queue-logo__title{color:#fff !important;}

/* modal */
body.bdp-modal-open{overflow:hidden;}
.bdp-modal{
  position:fixed;
  inset:0;
  z-index:99999;
  display:none;
}
.bdp-modal.is-open{display:block;}
.bdp-modal__backdrop{
  position:absolute;
  inset:0;
  background:rgba(15,23,42,0.45);
}
.bdp-modal__panel{
  position:absolute;
  top:60px;
  left:50%;
  transform:translateX(-50%);
  /* Wider modal to fit the queue table columns */
  width:min(1280px, calc(100vw - 24px));
  max-height:calc(100vh - 120px);
  background:#fff;
  border-radius:14px;
  box-shadow:0 20px 60px rgba(0,0,0,0.25);
  display:flex;
  flex-direction:column;
  overflow:hidden;
}

/* Queue panel table: allow horizontal scroll and keep action buttons inline */
.bdp-queue-list{overflow-x:auto;}
.bdp-queue-list .bdp-table{min-width:1100px;}

/* Queue sub-tabs inside the queue panel */
.bdp-queue-subtabs{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  padding:10px 12px;
  border-bottom:1px solid #e5e7eb;
  background:#f8fafc;
}
.bdp-queue-subtab{
  border:1px solid #e5e7eb;
  background:#fff;
  /* Ensure readable text color on inactive (white) tabs */
  color:#111827;
  border-radius:999px;
  padding:8px 12px;
  cursor:pointer;
  font-size:13px;
  line-height:1;
}
.bdp-queue-subtab.is-active{
  border-color:#111827;
  background:#111827;
  color:#fff;
}

/* Queue row states */
.bdp-queue-row.is-called td{
  background:#fffbeb;
}
.bdp-queue-row.is-skipped td{
  background:#f8fafc;
}
.bdp-queue-row.is-served td{background:#f0fdf4;}
.bdp-queue-row.is-vanished td{background:#fef2f2;}
.bdp-actions{white-space:nowrap; display:flex; gap:8px; align-items:center; flex-wrap:nowrap;}
.bdp-actions .bdp-btn{white-space:nowrap;}
.bdp-modal__header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 16px;
  border-bottom:1px solid #e5e7eb;
}
.bdp-modal__title{font-size:16px; font-weight:700;}
.bdp-modal__close{
  border:0;
  background:transparent;
  font-size:26px;
  line-height:1;
  cursor:pointer;
  padding:0 6px;
}
.bdp-modal__tabs{
  display:flex;
  gap:6px;
  padding:10px 12px;
  border-bottom:1px solid #e5e7eb;
  background:#f8fafc;
}
.bdp-modal__tab{
  border:1px solid #e5e7eb;
  background:#fff;
  border-radius:999px;
  padding:8px 12px;
  cursor:pointer;
  font-weight:600;
  font-size:13px;
  color:#0f172a;
}
.bdp-modal__tab.is-active{background:#0f172a; color:#fff; border-color:#0f172a;}
.bdp-modal__body{padding:14px 16px; overflow:auto;}
.bdp-modal__section{display:none;}
.bdp-modal__section.is-active{display:block;}
.bdp-modal__block{
  border:1px solid #e5e7eb;
  border-radius:12px;
  padding:12px 12px;
  background:#fff;
  margin-bottom:12px;
}
.bdp-modal__block h3{margin:0 0 10px; font-size:14px;}

.bdp-form-row label{display:block; font-weight:600; margin-bottom:6px;}
.bdp-form-inline{display:flex; gap:8px; align-items:center;}
.bdp-input{
  width:120px;
  border:1px solid #e5e7eb;
  border-radius:10px;
  padding:10px 10px;
  font-size:14px;
}
.bdp-btn{
  border:1px solid #0f172a;
  background:#0f172a;
  color:#fff;
  border-radius:10px;
  padding:10px 12px;
  cursor:pointer;
  font-weight:700;
  font-size:13px;
}

/* Button spinner (used in Queue modal) */
.bdp-btn.is-loading{
  position:relative;
  opacity:0.8;
  pointer-events:none;
}
.bdp-btn.is-loading::after{
  content:"";
  display:inline-block;
  width:12px;
  height:12px;
  border:2px solid currentColor;
  border-top-color:transparent;
  border-radius:999px;
  margin-left:8px;
  vertical-align:-2px;
  animation:bdpSpin 0.8s linear infinite;
}
@keyframes bdpSpin{from{transform:rotate(0deg);}to{transform:rotate(360deg);}}
.bdp-btn--small{padding:6px 10px; border-radius:10px; font-size:12px;}
.bdp-btn--ghost{background:#fff; color:#0f172a;}
.bdp-btn--danger{border-color:#dc2626; background:#dc2626;}
.bdp-help{color:#475569; font-size:13px; margin-top:6px;}
.bdp-subtle{color:#64748b; font-size:12px; margin-top:2px;}

.bdp-metrics{display:flex; gap:12px; margin-bottom:10px;}
.bdp-metric{border:1px solid #e5e7eb; border-radius:12px; padding:10px 12px; min-width:120px; background:#f8fafc;}
.bdp-metric__label{font-size:12px; color:#64748b;}
.bdp-metric__value{font-size:22px; font-weight:800; color:#0f172a;}

.bdp-table-wrap{overflow:auto;}
.bdp-table{width:100%; border-collapse:collapse; font-size:13px;}
.bdp-table th, .bdp-table td{border-bottom:1px solid #e5e7eb; padding:8px 8px; text-align:left;}
.bdp-table--compact th, .bdp-table--compact td{padding:6px 8px;}
.bdp-actions{white-space:nowrap;}

.bdp-pill{
  display:inline-block;
  padding:4px 8px;
  border-radius:999px;
  font-size:12px;
  border:1px solid #e5e7eb;
  background:#f8fafc;
}
.bdp-pill--pending{background:#fffbeb; border-color:#fde68a;}
.bdp-pill--called{background:#eff6ff; border-color:#bfdbfe;}
.bdp-pill--served{background:#ecfdf5; border-color:#bbf7d0;}
.bdp-pill--skipped{background:#f1f5f9; border-color:#cbd5e1;}
.bdp-pill--vanished{background:#fef2f2; border-color:#fecaca;}

.bdp-skeleton{color:#64748b; font-size:13px;}


/* Suite profile card in left menu */
.bdp-nav-list .bdsuite-profile-card { padding: 12px 12px 8px 12px; }
.bdsuite-profile-inner{
  display:flex;
  align-items:center;
  gap:10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 12px;
  padding: 10px;
}
.bdsuite-profile-avatar img{
  width:42px; height:42px;
  border-radius:999px;
  object-fit:cover;
  display:block;
}
.bdsuite-profile-avatar-placeholder{
  width:42px; height:42px;
  border-radius:999px;
  display:block;
  background: rgba(255,255,255,0.20);
}
.bdsuite-profile-meta{ flex:1; min-width:0; }
.bdsuite-profile-title{
  font-size:12px;
  opacity:.8;
  line-height:1.2;
}
.bdsuite-profile-name{
  font-size:13px;
  font-weight:600;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.bdsuite-profile-actions{ flex:0 0 auto; }
.bdsuite-profile-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.18);
  text-decoration:none;
  font-size: 12px;
  font-weight: 600;
}
.bdsuite-profile-btn:hover{ filter: brightness(1.05); }



/* --- fixed2659: Ensure header tiles (status/Kø/Handlekurv/Refresh) are identical size + flush --- */
.bdp-topbar-right .bdpl-cart-top,
.bdp-topbar-right .bdpl-refreshdock,
.bdp-topbar-right .bdpl-header-tools .bdpl-cart-top,
.bdp-topbar-right .bdpl-header-tools .bdpl-refreshdock{
  margin:0 !important;
  padding:0 !important;
}

.bdp-topbar-right .bdpl-header-tools{
  flex-wrap:nowrap !important;
}

.bdp-topbar-right .bdpl-header-tools .bdpl-icon-btn,
.bdp-topbar-right .bdpl-header-tools .bdpl-cart-top,
.bdp-topbar-right .bdpl-header-tools .bdpl-refresh,
.bdp-topbar-right .bdpl-header-tools .bdpl-refresh-btn,
.bdp-topbar-right .bdpl-refreshdock .bdpl-icon-btn,
.bdp-topbar-right .bdpl-refreshdock .bdpl-refresh,
.bdp-topbar-right .bdpl-refreshdock .bdpl-refresh-btn{
  margin:0 !important;
}

/* Normalize icon sizing so Refresh isn't visually smaller than Handlekurv */
.bdp-topbar-right .bdpl-header-tools .bdpl-icon-btn svg,
.bdp-topbar-right .bdpl-refreshdock .bdpl-icon-btn svg,
.bdp-topbar-right .bdpl-header-tools .bdpl-icon-btn .bdpl-icon,
.bdp-topbar-right .bdpl-refreshdock .bdpl-icon-btn .bdpl-icon{
  width:22px !important;
  height:22px !important;
  stroke:#fff !important;
  fill:none !important;
}

/* Some cart icons use font/icon element */
.bdp-topbar-right .bdpl-header-tools .bdpl-icon-btn i,
.bdp-topbar-right .bdpl-refreshdock .bdpl-icon-btn i{
  font-size:22px !important;
  line-height:1 !important;
  color:#fff !important;
}



/* Smart KO: toast notification under queue button */
.bdp-queue-toast{
  display:flex;
  align-items:center;
  gap:8px;
  max-width:360px;
  margin-top:6px;
  padding:10px 12px;
  font-size:12px;
  line-height:1.3;
  background:#fff5f5;
  border:1px solid #ffb3b3;
  border-radius:10px;
  box-shadow:0 4px 18px rgba(0,0,0,.08);
  color:#d00000; /* knall rød tekst */
  font-weight:700;
}
.bdp-queue-toast-icon{
  width:18px;height:18px;
  border-radius:999px;
  background:#d00000;
  color:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  line-height:1;
  flex:0 0 18px;
}
.bdp-queue-toast-text{display:inline-block;}
.bdp-queue-toast.is-hide{opacity:0;transform:translateY(-4px);transition:opacity .3s ease,transform .3s ease;}
/* Mute toggle on queue button (top-left, red round icon) */
.bdp-queue-mute{
  position:absolute;
  top:-6px;
  left:-6px;
  border:none;
  background:#d00000;
  color:#fff;
  border-radius:999px;
  width:18px !important;
  height:18px !important;
  min-width:18px !important;
  min-height:18px !important;
  padding:0 !important;
  box-sizing:border-box;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  font-size:12px;
  line-height:1;
  box-shadow:0 4px 14px rgba(0,0,0,.18);
}
.bdp-queue-mute:hover{transform:translateY(-1px);}
.bdp-queue-mute:active{transform:translateY(0);}
/* Persistent alert indicator on queue button when pending > 0 */
.bdp-queue-logo{position:relative;}
.bdp-queue-alert{
  position:absolute;
  top:-6px;
  right:-6px;
  width:18px;
  height:18px;
  border-radius:999px;
  background:#d00000;
  color:#fff;
  display:none;
  align-items:center;
  justify-content:center;
  font-size:12px;
  line-height:1;
  box-shadow:0 4px 14px rgba(0,0,0,.18);
}
.bdp-queue-alert.is-on{display:flex;}


/* Header status notifications (Produktlister buttons) */
.bdp-status-btn{position:relative;}
.bdp-status-alert{
  position:absolute;
  top:-6px;
  right:-6px;
  width:18px;
  height:18px;
  border-radius:999px;
  background:#d00000;
  color:#fff;
  display:none;
  align-items:center;
  justify-content:center;
  font-size:12px;
  line-height:1;
  box-shadow:0 4px 14px rgba(0,0,0,.12);
}
.bdp-status-alert.is-on{display:flex;}
.bdp-status-mute{
  padding:0;
  min-width:18px;
  box-sizing:border-box;
  position:absolute;
  top:-6px;
  left:-6px;
  width:18px;
  height:18px;
  border-radius:999px;
  border:none;
  background:#d00000;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  line-height:1;
  cursor:pointer;
  box-shadow:0 4px 14px rgba(0,0,0,.18);
}
.bdp-status-mute:hover{transform:translateY(-1px);}
.bdp-status-mute:active{transform:translateY(0);}

/* Icon inside small round buttons */
.bdp-ic{width:12px;height:12px;display:block;}


.bdp-status-toast{
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:8px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid #ffd0d0;
  background:#fff5f5;
  color:#d00000;
  font-weight:600;
  max-width:420px;
  box-shadow:0 8px 20px rgba(0,0,0,.10);
}
.bdp-status-toast-icon{
  width:18px;
  height:18px;
  border-radius:999px;
  background:#d00000;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  line-height:1;
}
.bdp-status-toast.is-hide{opacity:0;transform:translateY(6px);transition:opacity .3s ease,transform .3s ease;}

/* Kundetilfredshet button (legacy styles – score-knappen bruker nå samme stil som Kø-knappen) */
.bdp-sat-btn:not(.bdp-queue-logo){
  display:inline-flex;
  align-items:center;
  gap:10px;
  border:0;
  border-radius:999px;
  padding:8px 12px;
  cursor:pointer;
  background:rgba(255,255,255,.12);
  color:#fff;
}
.bdp-sat-btn:not(.bdp-queue-logo):hover{filter:brightness(.95);}
.bdp-sat-btn__score{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:44px;
  height:28px;
  padding:0 10px;
  border-radius:999px;
  background:rgba(255,255,255,.2);
  font-weight:800;
}
.bdp-sat-btn__title{font-weight:700;opacity:.95;}

/* Queue number (shown left of name in queue panel) */
.bdp-queue-no{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:28px;
  height:22px;
  padding:0 6px;
  border-radius:999px;
  background:rgba(0,0,0,.06);
  font-weight:800;
  font-size:12px;
  margin-right:8px;
}


.bdp-queue-tabtools{display:flex;justify-content:flex-end;margin:8px 0;}

/* Ensure Kundetilfredshet (Score) modal is always on top of queue modal */
#bdp-sat-modal{ position:fixed; z-index:10050; }
#bdp-sat-modal.is-open{ z-index:10050; }

/* Kundetilfredshet: filter + chart row */
.bdp-sat-toprow{display:flex; align-items:flex-end; justify-content:space-between; gap:12px; flex-wrap:wrap;}

.bdp-sat-chart-filters{display:flex; gap:8px; align-items:flex-end; flex-wrap:wrap; margin-bottom:6px;}
.bdp-sat-chart-filters .bdp-form-row label{font-size:11px; opacity:.8;}
.bdp-sat-chart-wrap{min-width:220px; max-width:320px; flex:1 1 240px;}
.bdp-sat-chart-title{font-weight:700; font-size:12px; margin-bottom:6px; opacity:.85;}
.bdp-sat-chart{display:flex; flex-direction:column; gap:6px; padding:8px; border:1px solid rgba(0,0,0,.08); border-radius:10px; background:#fff; overflow:hidden;}
/* Horizontal bars (liggende søyler) */
.bdp-sat-hrow{display:grid; grid-template-columns:52px 1fr 34px; align-items:center; gap:8px;}
.bdp-sat-hlabel{font-size:11px; opacity:.75; white-space:nowrap;}
.bdp-sat-hbar{height:10px; border-radius:999px; background:rgba(0,0,0,.08); overflow:hidden; position:relative;}
.bdp-sat-hfill{height:100%; border-radius:999px; background:rgba(0,0,0,.20);}
.bdp-sat-hfill[data-zero="1"]{background:rgba(0,0,0,.10);}
.bdp-sat-hval{font-size:11px; opacity:.80; text-align:right;}
.bdp-sat-line{display:block;}
@media (max-width:560px){
  .bdp-sat-chart-wrap{min-width:100%;}
  .bdp-sat-hrow{grid-template-columns:46px 1fr 30px;}
}


/* Auto refresh state for topbar refresh button */
.bdp-topbar .bdp-auto-reload-active{
  background: #c0392b !important;
  border-color: #c0392b !important;
}
.bdp-topbar .bdp-auto-reload-active .bdpl-icon,
.bdp-topbar .bdp-auto-reload-active svg{
  color: #fff !important;
  stroke: #fff !important;
}

/* SMS modal (80% of viewport) */
.bdp-modal--sms .bdp-modal__dialog--sms{
  width: 80vw;
  height: 80vh;
  max-width: 1200px;
  max-height: 900px;
  display: flex;
  flex-direction: column;
}
.bdp-modal--sms .bdp-modal__body--sms{
  flex: 1 1 auto;
  overflow: auto;
  padding: 0;
}
/* Slight spacing between Kø and Sms buttons */
.bdp-sms-logo{ margin-left: 10px; }


/* SMS modal (80% viewport, solid white backdrop, make SMS dashboard fill modal) */
.bdp-modal--sms .bdp-modal__backdrop{
  background:#fff;
}
.bdp-modal--sms .bdp-modal__panel{
  top:10vh;
  width:80vw;
  max-height:80vh;
  height:80vh;
  background:#fff;
}
.bdp-modal--sms .bdp-modal__header--sms{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 14px;
  border-bottom:1px solid rgba(0,0,0,0.08);
  background:#fff;
}
.bdp-modal--sms .bdp-modal__title{
  font-weight:700;
}
.bdp-modal--sms .bdp-modal__body--sms{
  flex:1;
  overflow:auto;
  background:#fff;
  padding:0;
}


/* BDSUITE FIX: don't globally hide select2 containers.
   Some installs rely on native <select> fallback after destroy(). */


/* --- BDSUITE SELECT2 SAFETY (frontend) --- */
.bdp-app .select2-container{max-width:100% !important; width:100% !important;}
.bdp-app .select2-dropdown{z-index:999999 !important;}


/* Keep Produktlister fully inside the dashboard content column */
.bdp-content--bdpl{
  min-width:0;
  overflow:auto;
}
.bdp-content-shell--bdpl{
  width:100%;
  max-width:100%;
  min-width:0;
  overflow:visible;
}
.bdp-content-shell--bdpl > .bdp-content-shell__inner{
  width:100%;
  max-width:100%;
  min-width:0;
}
.bdp-content-shell--bdpl .bdpl,
.bdp-content-shell--bdpl .bdpl-edit,
.bdp-content-shell--bdpl .bdpl-edit__form,
.bdp-content-shell--bdpl .bdpl-panel,
.bdp-content-shell--bdpl .bdpl-steps{
  max-width:100%;
  min-width:0;
}

/* Produktlister edit view must stay inside the dashboard content flow.
   Some theme/plugin CSS can make direct children behave like floated/escaped blocks,
   which leaves the title inside the wrapper while steps/form drop below it. */
.bdp-content--bdpl .bdpl-edit--dashboard{
  display:block;
  width:100%;
  max-width:100%;
  min-width:0;
  overflow:visible;
}
.bdp-content--bdpl .bdpl-edit--dashboard > .bdpl-edit__header,
.bdp-content--bdpl .bdpl-edit--dashboard > .bdpl-edit__body{
  display:block;
  width:100%;
  max-width:100%;
  min-width:0;
  float:none;
  clear:both;
  margin-left:0;
  margin-right:0;
}
.bdp-content--bdpl .bdpl-edit--dashboard > .bdpl-edit__body > .bdpl-edit__toolbar,
.bdp-content--bdpl .bdpl-edit--dashboard > .bdpl-edit__body > .bdpl-steps,
.bdp-content--bdpl .bdpl-edit--dashboard > .bdpl-edit__body > .bdpl-edit__form{
  display:block;
  width:100%;
  max-width:100%;
  min-width:0;
  float:none;
  clear:both;
  margin-left:0;
  margin-right:0;
}
.bdp-content--bdpl .bdpl-edit--dashboard > .bdpl-edit__body{
  margin-top:12px;
}
.bdp-content--bdpl .bdpl-edit--dashboard > .bdpl-edit__body > .bdpl-steps{
  margin-top:12px;
}
.bdp-content--bdpl .bdpl-edit--dashboard > .bdpl-edit__body > .bdpl-edit__form{
  position:relative;
  margin-top:0;
}
.bdp-content--bdpl .bdpl-print-menu[hidden],
.bdp-content--bdpl .bdpl-email-menu[hidden],
.bdp-content--bdpl .bdpl-preview-menu[hidden]{
  display:none !important;
}


/* BDSUITE FIX2439: force Produktlister dashboard edit body directly under title/actions. */
.bdp-content--bdpl .bdpl-edit--dashboard > .bdpl-edit__body{
  display:flex !important;
  flex-direction:column !important;
  align-items:stretch !important;
  gap:12px !important;
  margin-top:0 !important;
  padding-top:0 !important;
}
.bdp-content--bdpl .bdpl-edit--dashboard > .bdpl-edit__body > .bdpl-edit__toolbar{
  order:1;
  display:flex !important;
  flex-wrap:wrap !important;
  align-items:center !important;
  gap:8px !important;
  margin:0 !important;
}
.bdp-content--bdpl .bdpl-edit--dashboard > .bdpl-edit__body > .bdpl-steps{
  order:2;
  margin:0 !important;
}
.bdp-content--bdpl .bdpl-edit--dashboard > .bdpl-edit__body > .bdpl-edit__form{
  order:3;
  margin:0 !important;
}
.bdp-content--bdpl .bdpl-edit--dashboard .bdpl-print-wrap,
.bdp-content--bdpl .bdpl-edit--dashboard .bdpl-preview-wrap,
.bdp-content--bdpl .bdpl-edit--dashboard .bdpl-email-wrap{
  display:inline-flex !important;
  vertical-align:middle !important;
}
.bdp-content--bdpl .bdpl-edit--dashboard .bdpl-edit__toolbar .bdpl-btn,
.bdp-content--bdpl .bdpl-edit--dashboard .bdpl-edit__toolbar .bdpl-print-wrap > .bdpl-btn,
.bdp-content--bdpl .bdpl-edit--dashboard .bdpl-edit__toolbar .bdpl-preview-wrap > .bdpl-btn,
.bdp-content--bdpl .bdpl-edit--dashboard .bdpl-edit__toolbar .bdpl-email-wrap > .bdpl-btn{
  height:34px !important;
  min-height:34px !important;
  padding:0 12px !important;
  line-height:34px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  border-radius:8px !important;
}


/* BDSUITE FIX2446: force horizontal step tabs inside dashboard edit view */
.bdp-content--bdpl .bdpl-edit--dashboard .bdpl-steps{
  display:flex !important;
  flex-direction:row !important;
  flex-wrap:nowrap !important;
  align-items:stretch !important;
  justify-content:stretch !important;
  gap:0 !important;
  width:100% !important;
  max-width:100% !important;
  overflow:hidden !important;
}
.bdp-content--bdpl .bdpl-edit--dashboard .bdpl-steps > .bdpl-step{
  display:flex !important;
  flex:1 1 0 !important;
  flex-direction:column !important;
  min-width:0 !important;
  width:auto !important;
  max-width:none !important;
  margin:0 !important;
  border-right:1px solid rgba(255,255,255,.08) !important;
  border-bottom:0 !important;
}
.bdp-content--bdpl .bdpl-edit--dashboard .bdpl-steps > .bdpl-step:last-child{
  border-right:0 !important;
}

/* BDSuite branding header sizing */
.bdp-brand[data-bdsuite-brand-host="1"],
.bdp-brand .bdsuite-site-branding{
  font-weight:400 !important;
}
.bdp-brand .bdsuite-site-branding__logo{
  height:70px !important;
  max-height:76px !important;
  margin-bottom:8px !important;
}
.bdp-brand .bdsuite-site-branding__name{
  font-size:12px !important;
  font-weight:400 !important;
  line-height:1.2 !important;
}
