.fabrikElement {
    position: relative;
}
/* Hide Button ScanQR */
.qrcode-btn-camera-check {
    display: none !important;
}
/* Block Scroll  */
body.qrcode-modal-open {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
}
.qrcode-text {
    padding-right: 50px !important;
}

.qrcode-text-btn {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    width: 2.5em;
    height: 2.5em;
    background: url('/media/fabrik/com_fabrik/images/qr_icon.svg') center no-repeat;
    background-size: 1.2em;
    border: none;
    cursor: pointer;
    z-index: 10;
    border-radius: 4px;
    transition: all 0.2s;
}

.qrcode-text-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.qrcode-text-btn>input[type=file] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.qrcode-text.qrcode-both {
    padding-right: 90px !important;
}

.qrcode-buttons {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    display: flex;
    gap: 5px;
    z-index: 10;
}

.qrcode-btn {
    width: 2.5em;
    height: 2.5em;
    border: none;
    background-color: transparent;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 1.2em;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.qrcode-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.qrcode-btn-camera {
    background-image: url('/media/fabrik/com_fabrik/images/qr_icon.svg');
}

.qrcode-btn-gallery {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z'%3E%3C/path%3E%3C/svg%3E");
}

.qrcode-btn>input[type=file] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

/* Modal fullscreen */
.qrcode-scanner-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.qrcode-scanner-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    z-index: 10000;
    transition: background 0.2s;
}

.qrcode-scanner-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.qrcode-scanner-video {
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1;
    border-radius: 16px;
    overflow: hidden;
    border: 3px solid #007bff;
    box-shadow: 0 8px 32px rgba(0, 123, 255, 0.4);
}

.qrcode-scanner-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

@media (max-width: 768px) {
    .qrcode-text.qrcode-both {
        padding-right: 80px !important;
    }

    .qrcode-btn {
        width: 2.3em;
        height: 2.3em;
    }

    .qrcode-scanner-modal {
        padding: 10px;
    }

    .qrcode-scanner-close {
        top: 10px;
        right: 10px;
    }

    .qrcode-scanner-video {
        max-width: 100%;
    }
}