﻿.scanner-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    visibility: hidden;
}

#app {
    width: 100vw;
    height: 100vh;
    background: black;
    position: relative;
}

.scanner-close {
    position: absolute;
    top: env(safe-area-inset-top, 10px);
    right: 10px;
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 22px;
    cursor: pointer;
    z-index: 99999;
}

.scanner-torch {
    position: absolute;
    top: env(safe-area-inset-top, 10px);
    left: 10px;
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 22px;
    cursor: pointer;
    z-index: 99999;
}

.show {
    visibility: visible;
}


.scanner-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%;
    max-width: 400px;
    height: 17%;
    transform: translate(-50%, -50%);
    border-radius: 10px;
    box-sizing: border-box;
    pointer-events: none;
    transition: all 0.2s ease-in-out;
    z-index: 10;
}

    .scanner-overlay::before,
    .scanner-overlay::after,
    .scanner-overlay span::before,
    .scanner-overlay span::after {
        content: '';
        position: absolute;
        border: 3px solid rgba(255,255,255,0.9);
        width: 20px;
        height: 20px;
        box-sizing: border-box;
        background: transparent;
        animation: pulse 1.2s infinite;
    }
.scandit-paintboards{
    height:auto !important;
}

.scanner-overlay::before {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
}

    .scanner-overlay::after {
        top: 0;
        right: 0;
        border-left: none;
        border-bottom: none;
    }

    .scanner-overlay span::before {
        bottom: 0;
        left: 0;
        border-right: none;
        border-top: none;
    }

    .scanner-overlay span::after {
        bottom: 0;
        right: 0;
        border-left: none;
        border-top: none;
    }


@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.3;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.6;
    }

    100% {
        transform: scale(1);
        opacity: 0.3;
    }
}

.scanner-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, #FFD700 0%, #FFF700 50%, #FFD700 100%);
    background-size: 200% 100%;
    animation: scan-line 2s linear infinite, shimmer 1s linear infinite;
    z-index: 11;
}

.scanner-overlay.scan-success {
    animation: pulse 0.5s ease-in-out;
}


.scanner-overlay.scan-fail {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    25% {
        transform: translate(-50%, -50%) rotate(-5deg);
    }

    50% {
        transform: translate(-50%, -50%) rotate(5deg);
    }

    75% {
        transform: translate(-50%, -50%) rotate(-5deg);
    }
}

@keyframes scan-line {
    0% {
        top: 0;
    }

    50% {
        top: calc(100% - 1px);
    }

    100% {
        top: 0;
    }
}
