body dialog#pairedScanner504[open] { position: fixed !important; inset: 0 !important; margin: auto !important; width: min(560px, calc(100vw - 12px)) !important; max-width: none !important; height: fit-content !important; min-height: 0 !important; max-height: calc(100dvh - 12px) !important; overflow: hidden !important; }
body dialog#pairedScanner504.sn-moved[open] { inset: var(--sn-top) auto auto var(--sn-left) !important; margin: 0 !important; }
body dialog#pairedScanner504.sn-expanded[open] { width: min(850px, calc(100vw - 12px)) !important; }
#pairedScanner504 > header { cursor: grab; touch-action: none; user-select: none; background: #14334f; color: white; }
#pairedScanner504 > main { margin: 0; width: 100%; max-width: none; overflow-x: hidden; max-height: calc(100dvh - 88px); padding: 10px !important; }
.sn-window-actions { display: flex; gap: 4px; }
.sn-window-actions button { min-width: 44px; min-height: 44px; }
.scanner504 [hidden], .sn-phone [hidden] { display: none !important; }
.scanner504 .sn-manual input { min-width: 0; box-shadow: none; outline-offset: 0; }
.scanner504 .sn-manual input:focus, .scanner504 .sn-manual input:focus-visible { outline: 0 !important; border-color: #236092 !important; box-shadow: none !important; }
/* The brand focus rule is important inside this layer; keep one field contour there too. */
@layer brand-foundation {
  .scanner504 .sn-manual input:focus, .scanner504 .sn-manual input:focus-visible { outline: 0 !important; border-color: #236092 !important; box-shadow: none !important; }
  .scanner504 button.sn-frame-grip { border: 0 !important; background: transparent !important; box-shadow: none !important; outline: 0 !important; }
  .scanner504 .sn-frame:has(.sn-frame-grip:focus-visible) { border-color: #ffd36b !important; }
}
.scanner504 .sn-photo-options { display: flex; flex-wrap: wrap; gap: 6px; }
.scanner504 .sn-view {
  position: relative;
  height: clamp(240px, 48dvh, 420px) !important;
  min-height: 0 !important;
  aspect-ratio: auto !important;
  max-height: none;
  background: #101b23;
}
.scanner504 .sn-view video {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center;
}
.scanner504 .sn-view .sn-frame {
  position: absolute;
  inset: 19% 6%;
  border: 2px solid #e2efff !important;
  border-radius: 5px !important;
  box-shadow: 0 0 0 100vmax #10203966 !important;
  pointer-events: none;
}
.scanner504 .sn-view[data-scan-magnified="true"] video { transform: scale(1.5); }
.scanner504 .sn-frame-grip { position: absolute; width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 0; border: 0 !important; background: transparent !important; border-radius: 0; box-shadow: none !important; pointer-events: auto; touch-action: none; }
.scanner504 .sn-frame-grip::before { content: ''; position: absolute; background: white; border-radius: 4px; filter: drop-shadow(0 1px 2px #102039); }
.scanner504 .sn-frame-grip[data-resize=width] { right: -1px; top: 50%; transform: translateY(-50%); cursor: ew-resize; }
.scanner504 .sn-frame-grip[data-resize=width]::before { right: -1px; top: 8px; width: 5px; height: 28px; }
.scanner504 .sn-frame-grip[data-resize=height] { bottom: -1px; left: 50%; transform: translateX(-50%); cursor: ns-resize; }
.scanner504 .sn-frame-grip[data-resize=height]::before { bottom: -1px; left: 8px; height: 5px; width: 28px; }
.scanner504 .sn-frame-grip[data-resize=both] { right: -1px; bottom: -1px; cursor: nwse-resize; }
.scanner504 .sn-frame-grip[data-resize=both]::before { background: transparent; width: 19px; height: 19px; right: -1px; bottom: -1px; border: solid white; border-width: 0 5px 5px 0; border-radius: 0 0 4px 0; }
.scanner504 .sn-frame-grip:focus-visible { outline: 0 !important; }
.scanner504 .sn-tools [data-torch][aria-pressed=true] { background: #fff1bd; color: #14334f; }
.scanner504 [data-modes] { justify-content: flex-end; }
.scanner504 [data-modes] > button { min-height: 36px; background: transparent; font-size: 13px; padding: 5px 8px; }
.scanner504 .sn-tools { gap: 6px; margin-block: 7px; }
.scanner504 .sn-manual { margin-block: 7px; }
.scanner504 .sn-status { margin-block: 7px; }
.scanner-page > .scanner504 { width: min(560px, 100%); }
@media (max-width: 600px) {
  .scanner-page { padding: 4px !important; }
  .scanner-page > .scanner504 { width: 100% !important; max-width: 100% !important; }
  .scanner504 .sn-tools button { padding-inline: 8px; }
  #pairedScanner504 > header { padding: 8px 10px !important; }
  #pairedScanner504 [data-modes] { display: flex; }
  #pairedScanner504 [data-modes] > button { font-size: 13px; padding: 6px; }
  .scanner504 .sn-view { height: min(48dvh, 110vw) !important; }
}
@media (max-height: 500px) and (min-width: 601px) {
  .scanner504 .sn-view { height: 58dvh !important; }
}
.scanner504 .sn-view[data-scanning] .sn-frame::after {
  content: none !important;
  display: none !important;
  animation: none !important;
}
.scanner504 .sn-read-label {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 12px;
  max-width: calc(100% - 28px);
  transform: translateX(-50%);
  padding: 6px 12px;
  border-radius: 20px;
  color: #fff;
  background: #112b3ee8;
  font: 650 14px system-ui;
  text-align: center;
  pointer-events: none;
}
.scanner504 .sn-read-progress {
  position: absolute;
  inset: auto auto 0 0;
  width: var(--sn-read-progress, 0%);
  height: 4px;
  background: #ffcd55;
  pointer-events: none;
}
.scanner504 .sn-view[data-read-state=accepted] .sn-frame {
  border-color: #22b573 !important;
}
.scanner504 .sn-view[data-read-state=accepted] .sn-read-label { background: #12613e; }
.scanner504 .sn-view[data-read-state=error] .sn-read-label { background: #9d2d28; }
.scanner504 .sn-view[data-read-state=accepted] .sn-read-progress { width: 100%; background: #22b573; }
.scanner504 .sn-manual input { font-size: 16px; font-variant-numeric: tabular-nums; }
.sn-scan-launch { min-height: 36px; border: 1px solid #b9c8d8; border-radius: 8px; background: #f4f8fc; color: #14334f; font: 600 14px system-ui; padding: 4px 10px; cursor: pointer; }
@media (pointer: coarse) { .sn-scan-launch, .scanner504 button { min-height: 44px; } }
