/* Model-viewer */
model-viewer.hide {
    display: none;
}

/* AR-button */
#ar-button {
    position: absolute;
    right: 16px;
    bottom: 8px;
    width: 24px;
    height: 24px;
    z-index: 1000;
    cursor: pointer;
    background-color: transparent;
    background-image: url("../assets/view_in_ar_black_24dp.svg");
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    border:0;
    outline:0;
}

#ar-button.hide {
    display: none;
}

/* QR-container */
#qrcode-container {
    position: absolute;
    display: none;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    background-color: #000000cc;
    color: #fff;
    font-family: "Open Sans", sans-serif;
    font-size: 12px;
    text-align: center;
}

#qrcode-container.show {
    display: flex;
    flex-direction: column;
}

#closeQRbutton {
    position: absolute;
    padding: 4px;
    right: 6px;
    top: 6px;
    z-index: 1010;
    cursor: pointer;
    width: 24px;
    height: 24px;
    background-image: url("../assets/clear-24px.svg");
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
}

#qrcode {
    margin: 10px 0;
    padding: 8px;
    /* width: 200px; */
    max-width: calc(100% - 20px);
    /* height: 200px; */
    background-color: #fff;
    border-radius: 1px;
}

#qrcode img,
#qrcode canvas {
    width: auto;
    height: 200px;
}

@media (max-height: 400px) {
    #qrcode {
        padding: 6px;
    }

    #qrcode img,
    #qrcode canvas {
        height: 180px;
    }
}

@media (max-height: 350px) {

    #qrcode img,
    #qrcode canvas {
        height: 160px;
    }
}

#qrcode-container p {
    margin-top: 2px;
    padding: 2px;
    line-height: 1.3em;
}

.qr-title {
    font-size: 14px;
    font-weight: bold;
}

.qr-subtitle {
    color: #888;
}

#arText {
    margin-top: 32px;
}

@media (max-height: 320px) {
    #arText {
        margin-top: 8px;
    }

    #qrcode {
        padding: 4px;
    }

    #qrcode img,
    #qrcode canvas {
        height: 150px;
    }
}

@media (max-height: 350px) {
    #arText .qr-title {
        max-width: calc(100% - 30px);
    }
}

/* AR loading screen */
#arLoadingScreen {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 100%;
}

#arLoadingScreen.show {
    display: flex;
}

#loadingIcon {
    position: relative;
}

#arLoadingScreen .bar {
    /* Border/stroke is in sync with size below */
    width: 100px;
    height: 100px;
    border-radius: 100%;
    transform: rotate(-90deg);
    stroke-dasharray: calc(2 * 3.14 * 50);
    /* Loader stroke/border: 2 PI * Size */
    stroke-dashoffset: calc(2 * 3.14 * 50);
}

#arLoadingText {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -55%);
    text-align: center;
    font-size: 20px;
    font-weight: 500;
    font-family: 'Raleway';
    color: #111111;
}

#showModelButton {
    margin-top: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Raleway';
    color: #666;
}
