/* NAZZANI_SCANNER_V5_DM_CAMERA_STYLE_20260810 */

html.nazzani-scanner-v5-open,
html.nazzani-scanner-v5-open body {
  overflow: hidden !important;
  overscroll-behavior: none;
}

.nazzani-scanner-v5 {
  position: fixed;
  inset: 0;
  z-index: 65000;
  background: #000;
}

.nazzani-scanner-v5[hidden] {
  display: none !important;
}

.nazzani-scanner-v5-camera {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #000;
}

.nazzani-scanner-v5-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nazzani-scanner-v5-header {
  position: absolute;
  z-index: 5;
  top: 0;
  left: 0;
  right: 0;

  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;

  padding:
    calc(14px + env(safe-area-inset-top))
    18px
    48px;

  color: #fff;

  background:
    linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.80),
      transparent
    );
}

.nazzani-scanner-v5-brand {
  margin-bottom: 5px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  opacity: 0.74;
}

.nazzani-scanner-v5-title {
  font-size: 20px;
  line-height: 1.15;
  font-weight: 850;
}

.nazzani-scanner-v5-meta {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-top: 8px;
  padding: 4px 9px;

  border:
    1px solid
    rgba(255, 255, 255, 0.24);

  border-radius: 999px;

  color:
    rgba(255, 255, 255, 0.86);

  background:
    rgba(0, 0, 0, 0.34);

  font-size: 10px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.05em;

  backdrop-filter: blur(7px);
}

.nazzani-scanner-v5-close {
  display: grid;
  place-items: center;

  width: 46px;
  height: 46px;
  padding: 0;

  border: 0;
  border-radius: 50%;

  color: #fff;
  background:
    rgba(0, 0, 0, 0.50);

  font-size: 31px;
  line-height: 1;
}

.nazzani-scanner-v5-target {
  position: absolute;
  inset: 0;
  z-index: 3;

  display: grid;
  place-items: center;

  pointer-events: none;
}

.nazzani-scanner-v5-frame {
  position: relative;

  width:
    min(72vw, 342px);

  aspect-ratio: 1;

  border-radius: 22px;

  box-shadow:
    0 0 0 9999px
      rgba(0, 0, 0, 0.52);

  transition:
    transform 140ms ease,
    box-shadow 140ms ease;
}

.nazzani-scanner-v5-frame::after {
  content: "";

  position: absolute;
  inset: 10px;

  border:
    1px solid
    rgba(255, 255, 255, 0.18);

  border-radius: 16px;
}

.nazzani-scanner-v5-frame::before {
  content: "";

  position: absolute;
  left: 13%;
  right: 13%;
  top: 50%;

  height: 1px;

  background:
    linear-gradient(
      to right,
      transparent,
      rgba(255, 255, 255, 0.56),
      transparent
    );

  opacity: 0.60;
}

.nazzani-scanner-v5-frame .corner {
  position: absolute;

  width: 47px;
  height: 47px;

  border-style: solid;
  border-color: #fff;
  border-width: 0;

  filter:
    drop-shadow(
      0 1px 4px
      rgba(0, 0, 0, 0.62)
    );
}

.nazzani-scanner-v5-frame .tl {
  top: 0;
  left: 0;

  border-top-width: 4px;
  border-left-width: 4px;
  border-radius: 20px 0 0 0;
}

.nazzani-scanner-v5-frame .tr {
  top: 0;
  right: 0;

  border-top-width: 4px;
  border-right-width: 4px;
  border-radius: 0 20px 0 0;
}

.nazzani-scanner-v5-frame .bl {
  bottom: 0;
  left: 0;

  border-bottom-width: 4px;
  border-left-width: 4px;
  border-radius: 0 0 0 20px;
}

.nazzani-scanner-v5-frame .br {
  right: 0;
  bottom: 0;

  border-right-width: 4px;
  border-bottom-width: 4px;
  border-radius: 0 0 20px 0;
}

.nazzani-scanner-v5-frame.is-found {
  transform: scale(1.012);

  box-shadow:
    0 0 0 9999px
      rgba(0, 0, 0, 0.43),
    0 0 0 3px
      rgba(37, 211, 102, 0.36);
}

.nazzani-scanner-v5-frame.is-found
.corner {
  border-color: #25d366;
}

.nazzani-scanner-v5-frame.is-found::before {
  background: #25d366;
  opacity: 0.85;
}

.nazzani-scanner-v5-result {
  position: absolute;
  z-index: 6;

  box-sizing: border-box;

  min-width: 22px;
  min-height: 22px;

  border:
    3px solid
    #25d366;

  border-radius: 9px;

  box-shadow:
    0 0 0 2px
      rgba(0, 0, 0, 0.22),
    0 0 18px
      rgba(37, 211, 102, 0.48);
}

.nazzani-scanner-v5-result[hidden] {
  display: none !important;
}

.nazzani-scanner-v5-bottom {
  position: absolute;
  z-index: 5;

  left: 0;
  right: 0;
  bottom: 0;

  display: grid;
  justify-items: center;
  gap: 9px;

  padding:
    54px
    18px
    calc(
      19px +
      env(safe-area-inset-bottom)
    );

  background:
    linear-gradient(
      to top,
      rgba(0, 0, 0, 0.86),
      transparent
    );
}

.nazzani-scanner-v5-status {
  max-width: 440px;

  padding: 11px 16px;

  border-radius: 999px;

  color: #fff;

  background:
    rgba(0, 0, 0, 0.65);

  font-size: 15px;
  line-height: 1.35;
  font-weight: 800;

  text-align: center;

  backdrop-filter: blur(8px);
}

.nazzani-scanner-v5-status[
  data-kind="success"
] {
  background:
    rgba(18, 133, 68, 0.95);
}

.nazzani-scanner-v5-status[
  data-kind="error"
] {
  background:
    rgba(155, 38, 48, 0.95);
}

.nazzani-scanner-v5-help {
  max-width: 430px;

  color:
    rgba(255, 255, 255, 0.72);

  font-size: 12px;
  line-height: 1.4;

  text-align: center;
}

.nazzani-scanner-v5-fallback {
  min-height: 41px;
  padding: 8px 16px;

  border:
    1px solid
    rgba(255, 255, 255, 0.30);

  border-radius: 999px;

  color: #fff;

  background:
    rgba(0, 0, 0, 0.44);

  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 520px) {
  .nazzani-scanner-v5-frame {
    width:
      min(75vw, 326px);
  }

  .nazzani-scanner-v5-header {
    padding-left: 15px;
    padding-right: 15px;
  }

  .nazzani-scanner-v5-bottom {
    padding-left: 14px;
    padding-right: 14px;
  }
}

/* NAZZANI_KIZ_DB_FALLBACK_UI_20260820 */
.nazzani-scanner-v5-kiz-match {
  width: min(100%, 440px);
  box-sizing: border-box;
  padding: 14px 15px;
  border: 1px solid rgba(132, 245, 171, 0.72);
  border-radius: 16px;
  color: #fff;
  background: rgba(12, 92, 48, 0.94);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.32);
  text-align: center;
  backdrop-filter: blur(10px);
}

.nazzani-scanner-v5-kiz-match[hidden] {
  display: none !important;
}

.nazzani-scanner-v5-kiz-match > strong {
  display: block;
  font-size: 17px;
  line-height: 1.25;
}

.nazzani-scanner-v5-kiz-match-summary {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  line-height: 1.4;
}

.nazzani-scanner-v5-kiz-match-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.nazzani-scanner-v5-kiz-confirm,
.nazzani-scanner-v5-kiz-continue {
  min-height: 44px;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
}

.nazzani-scanner-v5-kiz-confirm {
  border: 1px solid #fff;
  color: #0b5c30;
  background: #fff;
}

.nazzani-scanner-v5-kiz-continue {
  border: 1px solid rgba(255, 255, 255, 0.48);
  color: #fff;
  background: rgba(0, 0, 0, 0.18);
}

.nazzani-scanner-v5-kiz-confirm:disabled,
.nazzani-scanner-v5-kiz-continue:disabled {
  opacity: 0.58;
}

@media (max-width: 420px) {
  .nazzani-scanner-v5-kiz-match-actions {
    grid-template-columns: 1fr;
  }
}

/* NAZZANI_KIZ_BANK_SEARCH_UX_V9 */

#nazzaniScannerV5BankSearch {
  width: 100%;
  min-height: 72px;
  padding: 17px 22px;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-radius: 18px;
  background: #f59e0b;
  color: #201300;
  font-size: 19px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: 0.025em;
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.30),
    0 0 0 4px rgba(245, 158, 11, 0.20);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

#nazzaniScannerV5BankSearch[hidden] {
  display: none !important;
}

#nazzaniScannerV5BankSearch:active:not(:disabled) {
  transform: translateY(1px);
}

#nazzaniScannerV5BankSearch[data-state="searching"] {
  background: #2563eb;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.58);
  opacity: 1;
  cursor: wait;
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.34),
    0 0 0 4px rgba(37, 99, 235, 0.24);
}

#nazzaniScannerV5BankSearch[data-state="searching"]::before {
  content: "";
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  border: 3px solid rgba(255, 255, 255, 0.38);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: nazzani-kiz-bank-spinner 0.85s linear infinite;
}

#nazzaniScannerV5Status[data-kind="working"] {
  white-space: pre-line;
  min-height: 76px;
  padding: 15px 16px;
  border: 1px solid rgba(147, 197, 253, 0.82);
  border-radius: 16px;
  background: rgba(30, 64, 175, 0.94);
  color: #ffffff;
  font-size: 18px;
  font-weight: 850;
  line-height: 1.35;
  text-align: center;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

#nazzaniScannerV5Status[data-kind="success"] {
  white-space: pre-line;
  min-height: 72px;
  padding: 15px 16px;
  border: 1px solid rgba(134, 239, 172, 0.84);
  border-radius: 16px;
  background: rgba(21, 128, 61, 0.95);
  color: #ffffff;
  font-size: 19px;
  font-weight: 900;
  line-height: 1.3;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.30);
}

#nazzaniScannerV5Status[data-kind="error"] {
  white-space: pre-line;
  min-height: 72px;
  padding: 15px 16px;
  border: 1px solid rgba(254, 202, 202, 0.84);
  border-radius: 16px;
  background: rgba(185, 28, 28, 0.95);
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.30);
}

@keyframes nazzani-kiz-bank-spinner {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  #nazzaniScannerV5BankSearch[data-state="searching"]::before {
    animation: none;
  }
}
