/* =============================================================
   scan-helpers.css — Flash verde la scanare OK pentru toate paginile
   de scanare (etichete, scanare_t, mod-camera*).
   Se poate aplica pe orice container (#reader, #preview-container, etc).
============================================================= */
/* Reticul pătrat — overlay vizual peste #reader (folosit cu PecoScannerOptim) */
.peco-scan-frame { position: relative; }
.peco-scan-frame::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 65%;
    aspect-ratio: 1 / 1;
    border: 2px solid #22c55e;
    border-radius: 10px;
    pointer-events: none;
    z-index: 5;
}

.scan-flash-ok {
    position: relative;
    box-shadow: 0 0 0 4px #22c55e !important;
    border-radius: 12px;
    animation: scanFlashOkAnim .7s ease;
    transition: box-shadow .3s ease;
}
@keyframes scanFlashOkAnim {
    0%   { box-shadow: 0 0 0 0    rgba(34, 197, 94, .9); }
    40%  { box-shadow: 0 0 0 14px rgba(34, 197, 94, .35); }
    100% { box-shadow: 0 0 0 4px  rgba(34, 197, 94, .9); }
}
/* Mic ecran de confirmare — toast centrat pe container */
.scan-ok-toast {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(34, 197, 94, .92);
    color: #fff;
    font-weight: 800;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 1.05rem;
    box-shadow: 0 6px 20px rgba(34, 197, 94, .4);
    animation: scanToastIn .35s ease, scanToastOut .35s ease .85s forwards;
    pointer-events: none;
    z-index: 999;
}
@keyframes scanToastIn  { from { opacity: 0; transform: translate(-50%, -60%); } to { opacity: 1; transform: translate(-50%, -50%); } }
@keyframes scanToastOut { to   { opacity: 0; transform: translate(-50%, -40%); } }
