﻿.html5-qrcode-scanner-body {
  margin: 0 auto;
  text-align:center;
}

.html5-qrcode-scanner-header {
}

.html5-qrcode-scanner-header .modal-title {
  text-align:left;
}

.html5-qrcode-scanner-header-status {
  float: right;
}



.html5-qrcode-scanner-scan-region {
  text-align:center;
}


.html5-qrcode-scanner-footer {
  text-align: right;
}

/* engine native / auto (BarcodeDetector): vlastni video + zamerovaci ramecek */
.html5-qrcode-scanner-detector {
  position: relative;
  overflow: hidden;
  background: #000;
}

.html5-qrcode-scanner-detector video {
  display: block;
  width: 100%;
  height: auto;
}

.html5-qrcode-scanner-frame {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(70%, 60vh);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255, 255, 255, .85);
  border-radius: 8px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, .35);
  pointer-events: none;
}

/* indikator cteni: skenovaci linka v ramecku, zeleny ramecek po precteni, radek stavu pod obrazem */
.html5-qrcode-scanner-frame--scanning::after {
  content: "";
  position: absolute;
  left: 4%;
  right: 4%;
  top: 0;
  height: 2px;
  background: #ef4444;
  box-shadow: 0 0 6px #ef4444;
  animation: html5-qrcode-scanner-line 1.6s ease-in-out infinite alternate;
}

@keyframes html5-qrcode-scanner-line {
  from { top: 4%; }
  to { top: 96%; }
}

.html5-qrcode-scanner-frame--found {
  border-color: #22c55e;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, .35), 0 0 0 3px #22c55e inset;
}

.html5-qrcode-scanner-detector video {
  cursor: crosshair;
}

/* zoom: pruh pod obrazem (− posuvnik +), vzdy v sirce dialogu */
.html5-qrcode-scanner-zoombar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 0;
  box-sizing: border-box;
  width: 100%;
  color: #6b7280;
}

.html5-qrcode-scanner-zoom {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  margin: 0;
  accent-color: var(--default-anchor-color, #2563eb);
}

.html5-qrcode-scanner-hint {
  padding: 6px 12px;
  font-size: 13px;
  color: #4b5563;
  text-align: center;
  min-height: 30px;
}

/* engine native/auto: dialog na vysku – PC max. 560 px a vyska okna, telefon cela obrazovka; video vyplni prostor */
.html5-qrcode-scanner-modal--fullheight .modal-dialog {
  width: auto;
  max-width: 560px;
  height: 96vh;
  margin: 2vh auto;
}

.html5-qrcode-scanner-modal--fullheight .modal-content {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.html5-qrcode-scanner-modal--fullheight .html5-qrcode-scanner-body {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}

.html5-qrcode-scanner-modal--fullheight .html5-qrcode-scanner-detector video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 767px) {
  .html5-qrcode-scanner-modal--fullheight .modal-dialog {
    max-width: none;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    margin: 0;
  }

  .html5-qrcode-scanner-modal--fullheight .modal-content {
    border: 0;
    border-radius: 0;
  }
}

/* dialog NFC (Include/Portal/NfcReader/NfcReader.js): stejny dialog na vysku, obsah vystredeny, pulzujici vlna */
.amc-nfc-dialog__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 64px;  /* vlna se rozsiri na 1,7nasobek ikony */
  padding: 24px !important;
}

.amc-nfc-dialog__icon {
  position: relative;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: #eff6ff;
  color: var(--default-anchor-color, #2563eb);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 72px;
}

.amc-nfc-dialog__icon::before,
.amc-nfc-dialog__icon::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--default-anchor-color, #2563eb);
  opacity: 0;
  animation: amc-nfc-wave 2s ease-out infinite;
}

.amc-nfc-dialog__icon::after {
  animation-delay: 1s;
}

@keyframes amc-nfc-wave {
  from { transform: scale(1); opacity: .6; }
  to { transform: scale(1.7); opacity: 0; }
}

.amc-nfc-dialog__text {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  text-align: center;
}

/* rezim NFC v dialogu skeneru: vyzva misto obrazu */
.html5-qrcode-scanner-body > .amc-nfc-dialog__body {
  height: 100%;
  min-height: 320px;
}
