.scanner-container {
  position: relative;
  width: 100%;
  height: 100%;
  background: black;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;

  zxing-scanner {
    width: 100%;
    height: 100%;
  }

  .scan-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    pointer-events: none;

    .scan-frame {
      width: 250px;
      height: 250px;
      border: 2px solid white;
      border-radius: 20px;
      box-shadow: 0 0 0 4000px rgba(0, 0, 0, 0.5);
      position: relative;

      &::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 2px;
        background: var(--ion-color-secondary);
        box-shadow: 0 0 10px var(--ion-color-secondary);
        animation: scan 2s linear infinite;
      }
    }

    .scan-text {
      color: white;
      margin-top: 24px;
      font-weight: 500;
      text-align: center;
      padding: 0 40px;
    }
  }
}

@keyframes scan {
  0% { top: 0; }
  100% { top: 100%; }
}
