/* ==================== SCANNER OVERLAY STYLES ==================== */

/* Scanner box - kamera görüntüsü */
#reader {
    position: relative;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    aspect-ratio: 16 / 10;
    display: none;
}

#reader video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Quagga2 canvas gizle (debug canvas) */
#reader canvas.drawingBuffer {
    display: none !important;
}

/* Scanner overlay controls container */
.scanner-overlay-controls {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 10;
}

/* Tarama rehber çerçevesi */
.scan-guide {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.scan-guide-box {
    width: 280px;
    height: 120px;
    position: relative;
    margin: 0 auto;
}

@media (min-width: 480px) {
    .scan-guide-box {
        width: 340px;
        height: 140px;
    }
}

/* Köşe işaretleri */
.scan-guide-corner {
    position: absolute;
    width: 24px;
    height: 24px;
    border-color: #00e676;
    border-style: solid;
    border-width: 0;
}

.scan-guide-corner.tl {
    top: 0; left: 0;
    border-top-width: 3px;
    border-left-width: 3px;
    border-top-left-radius: 8px;
}

.scan-guide-corner.tr {
    top: 0; right: 0;
    border-top-width: 3px;
    border-right-width: 3px;
    border-top-right-radius: 8px;
}

.scan-guide-corner.bl {
    bottom: 0; left: 0;
    border-bottom-width: 3px;
    border-left-width: 3px;
    border-bottom-left-radius: 8px;
}

.scan-guide-corner.br {
    bottom: 0; right: 0;
    border-bottom-width: 3px;
    border-right-width: 3px;
    border-bottom-right-radius: 8px;
}

/* Animasyonlu tarama çizgisi */
.scan-line {
    position: absolute;
    left: 8px;
    right: 8px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00e676, #00e676, transparent);
    box-shadow: 0 0 8px rgba(0, 230, 118, 0.6);
    animation: scanLineMove 2s ease-in-out infinite;
}

@keyframes scanLineMove {
    0%, 100% { top: 10%; }
    50% { top: 85%; }
}

/* Tarama ipucu */
.scan-hint {
    margin-top: 12px;
    color: #fff;
    font-size: 13px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Alt toolbar */
.scan-toolbar {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
}

.scan-tool-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.6);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: all 0.2s ease;
}

.scan-tool-btn:hover,
.scan-tool-btn:active {
    background: rgba(0, 0, 0, 0.7);
    border-color: #fff;
    transform: scale(1.05);
}

.scan-tool-btn.active {
    background: rgba(255, 200, 0, 0.4);
    border-color: #ffc800;
}

/* Durum badge */
.scan-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    white-space: nowrap;
    letter-spacing: 0.3px;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 400px) {
    .scan-guide-box {
        width: 240px;
        height: 100px;
    }

    .scan-tool-btn {
        width: 38px;
        height: 38px;
        font-size: 17px;
    }

    .scan-status-badge {
        font-size: 11px;
        padding: 5px 10px;
    }

    .scan-hint {
        font-size: 12px;
    }
}
