/**
 * 针对小程序样式做适配
 * 请注意与weapps/src/pages/editor/components/Main/EditAndPreview/index.iframe.scss的一致性，以确保小程序端样式与
**/

body {
  margin: 0;
  padding: 0;
}

#weapp-scancode-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.weapp-scancode-close-button {
  background: white;
  color: black;
  display: flex;
  position: absolute;
  top: 14px;
  left: 14px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  justify-content: center;
  align-items: center;
  z-index: 500;
}

.weapp-scancode-close-button {
  background: white;
  color: black;
  display: flex;
  position: absolute;
  top: 14px;
  left: 14px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  justify-content: center;
  align-items: center;
  z-index: 500;
}

.weapp-scancode-modal {
  position: fixed;
  background-color: black;
  left: 0px;
  right: 0px;
  top: 0px;
  bottom: 0px;
}

.weapp-scancode-modal-main {
  height: 100%;
  position: relative;
}

.weapp-scancode-img-selector {
  position: absolute;
  bottom: 32px;
  right: 32px;
  z-index: 500;
}
.weapp-scancode-img-picker {
  z-index: 500;
  padding: 5px;
  display: block;
  cursor: pointer;
}

.weapp-scancode-scan-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
}
.weapp-scancode-scan-square {
  --square-size: 16rem;
  width: var(--square-size);
  height: var(--square-size);
  position: relative;
}
.weapp-scancode-scan-bar {
  position: absolute;
  height: 10px;
  width: 100%;
  background: linear-gradient(90deg, transparent, #07c160 50%, transparent);
  top: 0%;
  border-top-left-radius: 50%;
  border-top-right-radius: 50%;
  animation: slideinout-top-down 2s;
  animation-direction: normal;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
.weapp-scancode-scan-tip {
  margin-top: 10rem;
  color: white;
}
.weapp-scancode-scan-not-found {
  color: white;
}
.weapp-scancode-scan-not-found + p {
  color: #999;
}

@keyframes slideinout-top-down {
  /* use transform to prevent relayout */
  0% {
    transform: translateY(0px);
    opacity: 0;
  }
  50% {
    transform: translateY(calc(var(--square-size) / 2));
    opacity: 0.5;
  }
  100% {
    transform: translateY(var(--square-size));
    opacity: 0;
  }
}

@media (min-width: 1024px) {
  .weda-responsive_flex_flow {
    flex-flow: row !important;
  }
}
