/* Popup: Fixed Vollbild, Flexbox-Spalte */
#popup-barcode-scanner {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%; height: 100%;
    margin: 0; padding: 0;
    z-index: 10000;
    background-color: #142864;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
}

/* Obere blaue Leiste */
#popup-barcode-scanner section.header-bar {
    flex: 0 0 60px;
    height: 60px; min-height: 60px;
    width: 100%;
    background-color: #142864;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
    box-sizing: border-box;
}

/* Scan-Bereich */
#popup-barcode-scanner section.scan,
#popup-barcode-scanner.popup > section.scan {
    flex: 1 1 auto;
    position: relative;
    top: unset; left: unset;
    height: auto;
    width: 100%;
    overflow: hidden;
    background-color: #000;
    display: block;
}

/* Scanner-Container  */
#popup-barcode-scanner section.scan #scanner-container {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    overflow: hidden;
}

/* Untere Navigationsleiste */
#popup-barcode-scanner section.row.nav {
    flex: 0 0 60px;
    height: 60px; min-height: 60px;
    width: 100%;
    max-width: 100%;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #142864;
    position: relative;
    z-index: 999;
    box-sizing: border-box;
}

#popup-barcode-scanner section.row.nav .col { flex: 1; height: 100%; }
#popup-barcode-scanner section.row.nav .col[data-type="settings"] { display: none; }
#popup-barcode-scanner section.row.nav .col[data-type="hide"] {
    display: flex; align-items: center; justify-content: center; cursor: pointer;
}

/* Settings versteckt */
#popup-barcode-scanner section.settings { display: none; }

/* Viewfinder */
#popup-barcode-scanner #qr-shaded-region {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 88%; height: 55%;
    min-height: 150px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
    z-index: 15;
    pointer-events: none;
}

#popup-barcode-scanner #qr-shaded-region span {
    position: absolute; width: 50px; height: 50px;
    border-color: #fff; border-style: solid;
}

#popup-barcode-scanner #qr-shaded-region span:nth-child(1) { top: 0;    left: 0;  border-width: 4px 0   0   4px; }
#popup-barcode-scanner #qr-shaded-region span:nth-child(2) { top: 0;    right: 0; border-width: 4px 4px 0   0;   }
#popup-barcode-scanner #qr-shaded-region span:nth-child(3) { bottom: 0; left: 0;  border-width: 0   0   4px 4px; }
#popup-barcode-scanner #qr-shaded-region span:nth-child(4) { bottom: 0; right: 0; border-width: 0   4px 4px 0;   }

/* Barcode-Box (SDK _renderLoop) */
#scanner-container .barcode-box {
    position: absolute;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 4px;
    box-sizing: border-box;
    pointer-events: none;
    background: transparent;
    will-change: transform, width, height;
    transition: border-color 0.15s ease;

}

#scanner-container .barcode-box.know {
    border-color: #4CAF50;
    display: none !important;
}

/* Label unter der Box */
#scanner-container .barcode-label {
    position: absolute;
    bottom: -22px; left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: #fff; font-size: 11px; line-height: 1;
    padding: 2px 5px; border-radius: 3px;
    white-space: nowrap; pointer-events: none;
    max-width: 150px; overflow: hidden; text-overflow: ellipsis;
}

#torch-button {
    color: #363636;
    border: 1px solid #CCCCCC;
    font-family: "century-gothic",Arial,sans-serif;
    font-size: 12px;
    height: 55px;
    line-height: 55px;
    padding: 0 20px;
    position: relative;
    width: 100%;
    cursor: pointer;
    display: block;
    background: #fff;
}
