/* =========================
  ScanWin — retail-scan.css
========================= */

/* fullscreen page never scrolls; undo style.css's reserved gutter
   (it resizes the fixed column and re-scales the cover backdrop) */
html {
  scrollbar-gutter: auto;
}

.sw-scan-body {
  /* style.css paints <html>; body must fill the viewport for the dark
     backdrop to show around the phone column */
  min-height: 100vh;
  background: #0c0a18;
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  line-height: normal;
}

.sw-scan {
  background: #0c0a18 center/cover no-repeat;
  background-image:
    linear-gradient(rgba(12, 10, 24, 0.35), rgba(12, 10, 24, 0.55)),
    url("../img/campaigns/coca-cola.png");
}

.sw-scan__video:not([data-live]) {
  opacity: 0;
}

.sw-scan::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 160px;
  z-index: 1;
  background: linear-gradient(rgba(8, 6, 18, 0.6), rgba(8, 6, 18, 0));
  pointer-events: none;
}

.sw-scan__top {
  padding: 14px 16px;
  padding-top: max(14px, env(safe-area-inset-top));
}

.sw-scan__icobtn {
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  backdrop-filter: blur(4px);
}
.sw-scan__icobtn svg {
  width: 19px;
  height: 19px;
}
.sw-scan__icobtn.is-on {
  background: #f5b301;
  color: #1a1206;
}

.sw-scan__frame {
  position: relative;
  width: 248px;
  height: 248px;
}
.sw-scan__frame::before,
.sw-scan__frame::after,
.sw-scan__corner::before,
.sw-scan__corner::after {
  content: "";
  position: absolute;
  width: 34px;
  height: 34px;
  border: 3px solid #7c6cff;
}
.sw-scan__frame::before {
  top: 0;
  left: 0;
  border-right: 0;
  border-bottom: 0;
  border-top-left-radius: 12px;
}
.sw-scan__frame::after {
  top: 0;
  right: 0;
  border-left: 0;
  border-bottom: 0;
  border-top-right-radius: 12px;
}
.sw-scan__corner::before {
  bottom: 0;
  left: 0;
  border-right: 0;
  border-top: 0;
  border-bottom-left-radius: 12px;
}
.sw-scan__corner::after {
  bottom: 0;
  right: 0;
  border-left: 0;
  border-top: 0;
  border-bottom-right-radius: 12px;
}
.sw-scan__laser {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 3px;
  border-radius: 999px;
  top: 12px;
  background: linear-gradient(
    90deg,
    rgba(124, 108, 255, 0) 0%,
    #7c6cff 50%,
    rgba(124, 108, 255, 0) 100%
  );
  box-shadow: 0 0 14px 2px rgba(124, 108, 255, 0.7);
  animation: sw-scan-laser 2.4s ease-in-out infinite;
}
@keyframes sw-scan-laser {
  0%,
  100% {
    top: 12px;
  }
  50% {
    top: 233px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sw-scan__laser {
    animation: none;
    top: 122px;
  }
}

.sw-scan__hint {
  font-size: 15px;
  margin: 1em 0;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

.sw-scan__gps {
  background: rgba(7, 6, 16, 0.55);
  backdrop-filter: blur(4px);
  color: #d6ffe9;
  font-size: 12.5px;
  padding: 7px 13px;
}
.sw-scan__gps svg {
  width: 14px;
  height: 14px;
  color: #34d399;
}
.sw-scan__gps.is-off {
  color: #ffd9d0;
}
.sw-scan__gps.is-off svg {
  color: #fb9a86;
}

.sw-scan__sheet {
  border-radius: 22px 22px 0 0;
  padding: 22px 20px calc(22px + env(safe-area-inset-bottom));
}
.sw-scan__sheet-title {
  font-size: 15px;
  color: #0f0f21;
}

.sw-scan__manualbtn {
  --bs-btn-bg: #f3f1fe;
  --bs-btn-color: var(--sw-violet, #6e5df8);
  --bs-btn-hover-bg: #f3f1fe;
  --bs-btn-hover-color: var(--sw-violet, #6e5df8);
  --bs-btn-active-bg: #f3f1fe;
  --bs-btn-active-color: var(--sw-violet, #6e5df8);
  --bs-btn-border-width: 0;
  --bs-btn-font-size: 14px;
  --bs-btn-font-weight: 600;
  --bs-btn-padding-y: 13px;
  --bs-btn-border-radius: 12px;
  --bs-btn-line-height: normal;
  --bs-btn-focus-shadow-rgb: 110, 93, 248;
}
.sw-scan__manualbtn svg {
  width: 17px;
  height: 17px;
}
.sw-scan__note {
  font-size: 12px;
  color: #9499a8;
}

.sw-scan__manual {
  display: none;
}
.sw-scan__manual.is-open {
  display: flex;
}

.sw-scan__input {
  line-height: normal;
  border-color: #e5e8ed;
  border-radius: 12px;
  padding: 13px 14px;
  font-size: 14px;
  color: #0f0f21;
}
.sw-scan__input:focus {
  border-color: #b9aef5;
  box-shadow: none;
  color: #0f0f21;
}

.sw-scan__fallback {
  position: relative;
  z-index: 2;
  display: none;
  margin: 0 24px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(7, 6, 16, 0.55);
  backdrop-filter: blur(4px);
  color: #fde9c8;
  font-size: 12.5px;
}
.sw-scan.is-nocam .sw-scan__fallback {
  display: flex;
}
.sw-scan__fallback svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: #f5b301;
}

@media (min-width: 576px) {
  .sw-scan {
    max-width: 420px;
    margin: 0 auto;
    border-left: 1px solid #1c1830;
    border-right: 1px solid #1c1830;
  }
}
