/* Hide all elements */
body.barcode-scanner-active {
  visibility: hidden;
}

 /* Show only the barcode scanner modal */
.barcode-scanner-modal {
  visibility: visible;
}

.appFadeOut {
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s 1s, opacity 1s linear;
}

.appFadeIn {
    visibility: visible;
    opacity: 1;
    transition: opacity 1s linear;
}

#cancelBarcodeScan {
    color: black;
    padding: 5px;
    border-radius: 3px;
    background-color: #ccc;
    border: 1px solid #555;
}

#scannerOverlay {
    text-align: center;
    color: white;
    background: transparent;
    outline: 50px rgb(255, 0, 0);
    height: 100%;
    width: 99%;
    position: absolute;
}

.barcodeContainer {
    width: 100%;
    height: 100%;
    overflow: hidden;
    box-sizing: border-box;
    padding-top: 35%;
}

.barcodeContainer {
    display: flex;
}

.relative {
    position: relative;
    z-index: 1;
}

.square {
    width: 100%;
    position: relative;
    overflow: hidden;
    transition: 0.3s;
}

.square:after {
    content: '';
    top: 0;
    display: block;
    padding-bottom: 100%;
}

.square>div {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}

.barcode-scanner-line:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    border-top: 1px solid green;
    background: transparent;
    width: 80%;
    transform: translateY(-50%);
}

.surround-cover {
    box-shadow: 0 0 0 99999px rgba(0, 0, 0, 0.5);
}

.barcode-scanner--area--container {
    width: 80%;
    max-width: min(500px, 80vh);
    margin: auto;
}

.barcode-scanner--area--outer {
    display: flex;
    border-radius: 1em;
}

.barcode-scanner--area--inner {
    width: 100%;
    margin: 1rem;
    border: 2px solid #fff;
    box-shadow: 0px 0px 2px 1px rgb(0 0 0 / 0.5),
        inset 0px 0px 2px 1px rgb(0 0 0 / 0.5);
    border-radius: 1rem;
}

.sample-background {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(45deg, #673ab7, transparent);
    background: url(./mockup.jpg);
    background-position: 45% 50%;
    background-size: cover;
    background-repeat: no-repeat;
    animation: shake 5s infinite;
}

@keyframes shake {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }

    20% {
        transform: translate(5px, 5px) rotate(-1deg) scale(1.05);
    }

    40% {
        transform: translate(5px, 5px) rotate(-2deg) scale(1.07);
    }

    60% {
        transform: translate(2px, 2px) rotate(0deg) scale(1.04);
    }

    80% {
        transform: translate(-1px, -1px) rotate(-2deg) scale(1.05);
    }

    100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
}

#toogleBarcodeScanTorch {
    width: 2em;    
    height: 2em;
    position: absolute;
    z-index: 100;
    left:0;
    top:0;
}