/* Scan button in bottom bar */
#qr-scan-slot {
  display: flex;
  align-items: center;
  margin-left: auto;
  flex-shrink: 0;
}

#qr-scan-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  padding: 0;
}

#qr-scan-btn:active {
  transform: scale(0.92);
}

#qr-scan-btn svg {
  width: 24px;
  height: 24px;
}

/* Scanner overlay */
#qr-scanner-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #000000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#qr-scanner-close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 1010;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 0;
  background: none;
  color: #d4a574;
  font-size: 36px;
  font-weight: 300;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}

/* Camera container - rotated to diamond */
#qr-scanner-viewfinder {
  width: min(56vw, 226px);
  height: min(56vw, 226px);
  position: relative;
  overflow: hidden;
  border: 2px solid rgba(123, 45, 142, 0.6);
  transform: rotate(45deg);
}

#qr-scanner-reader {
  width: 142%;
  height: 142%;
  position: absolute;
  top: -21%;
  left: -21%;
  transform: rotate(-45deg);
}

/* Override html5-qrcode internal styles */
#qr-scanner-reader video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
  -webkit-user-select: none;
  user-select: none;
}

#qr-scanner-reader img[alt="Info icon"] {
  display: none !important;
}

#qr-scanner-hint {
  margin-top: calc(min(56vw, 226px) * 0.25);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: rgba(212, 165, 116, 0.5);
  text-align: center;
}
