/* Модул 7: OCR overlay и бутон */
#sff-ocr-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

#sff-ocr-overlay.sff-ocr-loading .sff-ocr-skeleton-video {
    display: block;
}

#sff-ocr-overlay.sff-ocr-loading #sff-ocr-video,
#sff-ocr-overlay.sff-ocr-loading #sff-ocr-canvas {
    visibility: hidden;
}

.sff-ocr-skeleton-video {
    display: none;
    width: 90%;
    max-width: 400px;
    height: 280px;
    border-radius: 8px;
    background: linear-gradient(90deg, #2a2a2a 25%, #3a3a3a 50%, #2a2a2a 75%);
    background-size: 200% 100%;
    animation: sff-ocr-skeleton 1.2s ease-in-out infinite;
}

@keyframes sff-ocr-skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

#sff-ocr-video,
#sff-ocr-canvas {
    max-width: 95%;
    max-height: 55vh;
    border-radius: 8px;
    background: #000;
}

#sff-ocr-status {
    color: #eee;
    margin-top: 12px;
    font-size: 14px;
    text-align: center;
    min-height: 20px;
}

#sff-ocr-controls {
    margin-top: 16px;
    display: flex;
    gap: 12px;
    align-items: center;
}

#sff-ocr-controls button {
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 14px;
    cursor: pointer;
    border: none;
    font-weight: 500;
}

#sff-ocr-close {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

#sff-ocr-capture {
    background: #0f5ef7;
    color: #fff;
}

#sff-ocr-capture:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.sff-ocr-field-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.sff-ocr-field-container input {
    flex: 1;
    min-width: 120px;
}

.sff-ocr-scan-btn {
    padding: 6px 12px;
    font-size: 13px;
    border: 1px solid #0f5ef7;
    background: #0f5ef7;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
}

.sff-ocr-scan-btn:hover {
    background: #0b4ac4;
    border-color: #0b4ac4;
}
