/* ========== scan-qr.css ========== */

/* فونت وزیر */
@font-face {
    font-family: 'Vazirmatn';
    src: url('/dgid/assets/fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('/dgid/assets/fonts/Vazirmatn-Bold.ttf') format('truetype');
    font-weight: 700;
}

* {
    font-family: 'Vazirmatn', sans-serif;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    background: #000;
    overflow: hidden;
}

#qrVideo {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    z-index: 0;
}

/* ========== کادر اسکن (دقیقاً مشابه AR، وسط صفحه) ========== */
.scan-overlay {
    position: fixed;
    inset: 0;
    z-index: 10;
    pointer-events: none;
    display: none;
}

.scan-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 220px;
    height: 220px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    border: 2px solid white;
    border-radius: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
    box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.45);
}

.scan-frame .material-icons {
    font-size: 52px;
    color: white;
}

.scan-frame .scan-hint {
    font-size: 14px;
    color: white;
    font-weight: normal;
    padding: 0 10px;
}

/* ========== راهنما و خطا ========== */
#qrGuide, #qrError {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    text-align: center;
    z-index: 30;
    background: rgba(0,0,0,0.85);
    padding: 20px 24px;
    border-radius: 12px;
    max-width: 320px;
    display: none;
}

#qrGuide button, #qrError button {
    background: #0096f5;
    color: #fff;
    border: none;
    padding: 10px 20px;
    margin-top: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}

#qrLoading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    text-align: center;
    z-index: 30;
    display: none;
}