/** @version 2.0.3 */
/* lager.css - lagerskanning view */

/* =========================
   SCAN VIEW
   ========================= */

.scan {
  display: grid;
  gap: calc(14px * var(--ui-scale));
}

.scan-input-wrap {
  display: flex;
  gap: calc(10px * var(--ui-scale));
  align-items: center;
}

/* Hint-knap */
.hintbtn {
  flex: 1;
  text-align: left;
  border: 1px solid rgba(29, 132, 214, .18);
  background: rgba(29, 132, 214, .08);
  color: var(--muted);
  border-radius: calc(12px * var(--ui-scale));
  padding: calc(12px * var(--ui-scale));
  cursor: pointer;
  font-weight: 950;
  font-size: 1rem;
}

.hintbtn:active {
  transform: translateY(1px);
}

.qr-btn {
  width: calc(48px * var(--ui-scale));
  height: calc(48px * var(--ui-scale));
  border-radius: calc(12px * var(--ui-scale));
  border: 1px solid rgba(29, 132, 214, .25);
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.qr-btn:active {
  transform: scale(0.95);
}

.qr-btn svg {
  width: 65%;
  height: 65%;
}

/* =========================
   Scanner Overlay (Kamera Popup)
   ========================= */

.scanner-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: calc(20px * var(--ui-scale));
}

.scanner-overlay.is-show {
  display: flex;
}

.scanner-modal {
  width: 80vw;
  max-width: 500px;
  background: #000;
  border-radius: calc(20px * var(--ui-scale));
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}

.scanner-header {
  padding: calc(12px * var(--ui-scale)) calc(16px * var(--ui-scale));
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
  background: #111;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.scanner-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}

.btn-close-scanner {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  font-size: 1.2rem;
  width: calc(36px * var(--ui-scale));
  height: calc(36px * var(--ui-scale));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

#reader {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #000;
  overflow: hidden;
}

#reader video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.scanner-footer {
  padding: calc(14px * var(--ui-scale));
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
  background: #111;
}

/* Liste + watermark */
.listwrap {
  position: relative;
  overflow: hidden;
  padding: 0;
}

.watermark {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;

  pointer-events: none;
  user-select: none;

  font-size: calc(6rem * var(--ui-scale));
  font-weight: 950;
  letter-spacing: calc(2px * var(--ui-scale));

  color: rgba(16, 68, 145, 0.55);
  transform: translateY(calc(6px * var(--ui-scale)));
  z-index: 2;
}

.items {
  position: relative;
  z-index: 3;
  display: grid;

  /* Touch-first + ensartet højde */
  min-height: calc(120px * var(--ui-scale));
  align-items: center;
}

/* Tom liste */
.empty {
  padding: calc(14px * var(--ui-scale));
  color: rgba(15, 23, 42, .70);
  font-weight: 850;
}

/* Varelinje */
.item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: calc(12px * var(--ui-scale));
  padding: calc(14px * var(--ui-scale));
  border-top: 1px solid var(--line);

  /* Gennemsigtighed så vandmærke kan ses */
  background: rgba(255, 255, 255, .55);
  backdrop-filter: blur(0.5px);

}

.item:first-child {
  border-top: none;
}

.item:active {
  transform: translateY(1px);
}

.item .left {
  min-width: 0;
}

.item .sku {
  font-weight: 950;
  font-size: .82rem;
  letter-spacing: .4px;
  opacity: .85;
}

.item .name {
  margin-top: calc(4px * var(--ui-scale));
  font-weight: 750;
  font-size: 1.02rem;

  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.item .right {
  display: flex;
  align-items: center;
}

.item .qty {
  font-variant-numeric: tabular-nums;
  font-weight: 950;
  font-size: .95rem;
  opacity: .92;
}

/* Statusfarver (app.new.js bruger .is-green / .is-red) */
.item.is-green {
  background: rgba(22, 163, 74, .14);
}

.item.is-red {
  background: rgba(220, 38, 38, .14);
}

/* Manuel input (skjult som default) */
.manual {
  display: none;
  gap: calc(10px * var(--ui-scale));
  align-items: center;
}

.manual.is-show {
  display: flex;
}

.manual-input {
  flex: 1;
  font-size: 1rem;
  padding: calc(12px * var(--ui-scale));
  border-radius: calc(12px * var(--ui-scale));
  border: 1px solid var(--line);
  outline: none;
  background: #fff;
  color: var(--text);
}

.manual-input:focus {
  border-color: rgba(29, 132, 214, .55);
  box-shadow: 0 0 0 calc(4px * var(--ui-scale)) rgba(29, 132, 214, .18);
}

.manual-close {
  border: none;
  background: rgba(15, 23, 42, .08);
  color: rgba(15, 23, 42, .75);
  font-weight: 950;
  font-size: 1.1rem;

  width: calc(44px * var(--ui-scale));
  height: calc(44px * var(--ui-scale));
  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
}

.manual-close:active {
  transform: translateY(1px);
}

/* =========================
   Popup (app.new.js)
   ========================= */

.popup {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: calc(18px * var(--ui-scale));
  background: rgba(2, 8, 23, .45);
  z-index: 9999;
}

.popup.is-show {
  display: flex;
}

.popup-card {
  max-width: 900px;
  width: 100%;
  background: #fff;
  border-radius: calc(16px * var(--ui-scale));
  border: 1px solid rgba(15, 23, 42, .12);
  box-shadow: 0 18px 50px rgba(2, 8, 23, .25);
  padding: calc(16px * var(--ui-scale));
  color: rgba(15, 23, 42, .92);
}

.popup-title {
  font-weight: 950;
  font-size: 1.05rem;
  margin-bottom: calc(10px * var(--ui-scale));
}

.popup-body {
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.25;
  white-space: pre-wrap;
}

/* =========================
   Liste-overskrifter
   ========================= */

.items-header {
  position: sticky;
  top: calc(10px * var(--ui-scale));
  /* under topbar */
  z-index: 4;

  display: grid;
  grid-template-columns: 1fr 2fr auto;
  gap: calc(12px * var(--ui-scale));

  padding: calc(10px * var(--ui-scale)) calc(14px * var(--ui-scale));
  border-bottom: 1px solid var(--line);

  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(2px);

  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: rgba(15, 23, 42, .70);
}

.items-header .h-qty {
  text-align: right;
}