/* =========================================
   8. QR Scanner Styles
   ========================================= */
/* Floating Action Button for Mobile QR Scan */
.fab-qr {
    position: fixed;
    bottom: 85px;
    /* Above bottom nav */
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #059669);
    /* Fresh Green */
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    z-index: 1040;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
}

.fab-qr:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

.fab-qr i {
    font-size: 1.8rem;
}

/* Scanner Modal Overlay */
.qr-scanner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    /* Initially hidden and click-through */
    transition: opacity 0.3s ease;
}

.qr-scanner-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.qr-scanner-container {
    width: 90%;
    max-width: 500px;
    background: transparent;
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
}

#qr-reader {
    width: 100%;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: black;
}

/* Customizing html5-qrcode styles if needed */
#qr-reader video {
    border-radius: var(--radius-md);
    object-fit: cover;
}

.qr-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 2010;
    transition: transform 0.2s;
}

.qr-close-btn:hover {
    transform: scale(1.1);
}

.qr-scan-guide {
    color: white;
    text-align: center;
    margin-top: 20px;
    font-size: 1.1rem;
    font-weight: 500;
}