.disableClosePopup .popupBackground {
    pointer-events: none;
}
.disableClosePopup .closePopup {
    display: none;
}

.popupBackground {
    background: none;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: -1;
}

.videoContainer {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
#popupVideo video {
    max-height: 100vh;
    max-width: 100vw;
    padding: 20px;
}

html.popupOpened, html.popupOpened body {
    overflow: hidden;
    height: auto;
}

.popup {
    background: rgba(0,0,0,0.7);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    display:none;
    z-index:100;
    color: white;
    overflow: auto;
}

.popup[style*='display: block'] {
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex-flow: nowrap;
    flex-direction: column;
}

.popup h3 {
    text-align: center;
}

.popup.popupHideBackground {
    backdrop-filter: blur(10px);
}

.popup .closePopup, #errorDiv .btnError {
    margin: 0 !important;
    background: none;
    font-weight: normal;
    height: 50px;
    width: 50px;
    position: absolute;
    top: 15px;
    right: 15px;
    border: none;
    cursor: pointer;
    z-index: 10;
    text-align: center;
    transform: rotate(45deg);
}
.popup .closePopup:hover, .popup .closePopup:focus, #errorDiv .btnError:hover {
    background-color: transparent;
}
.popup .closePopup:after, #errorDiv .btnError:after {
    margin: 0 !important;
    font-size: 40px;
    line-height: 42px;
    content: "+";
    color: white;
    font-weight: 900;
}
.popup .closePopup:hover:after, #errorDiv .btnError:hover:after {
    color: #ccc;
}

#dialogTitle {
    font-size: 22px;
    font-weight: bold;

}

#dialogContainer {
    text-align: center;
    max-width: 600px;
}

#dialogContainer .dialogText {
    margin: 20px;
}

#dialogContainer .btn {
    margin: 0 10px;
}

/*Settings Popup*/
#popupSettings .popupInner {
    width: 450px;
    display: block;
}
.popupInner {
    padding: 20px 20px 50px;
    z-index: 1;
    /*color: #438DBA;*/
    color: #ffffff;
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    text-align: center;
    position: relative;
}

.popupInner .popupInnerBackground {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0;
    z-index: -1;
    border: 100px solid transparent;
    border-image: url(../images/pop-up_cornice.png) 200;
    border-image-width: 100px;
    background: url(../images/pop-up_center.png) center center;
    background-size: 100% 100%;
    background-clip: padding-box;
}

#settingsTitle {
    width: 100%;
    font-family: 'Palatino';
    text-align: center;
}
#settingsOptions {
    font-weight: bold;
}
.settingsSlider {
    display: block;
    font-family: 'Palatino';
    margin: 20px 5%;
}
.sliderTitle {
    font-family: 'Palatino';
    width: 100%;
}
.settingsSlider .sliderContainer {
    width: 100%;
    margin-top: 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.settingsSlider input {
    accent-color: white;
}
.settingsSlider input[type=range] {
    /*accent-color: #438DBA;*/
    flex-grow: 1;
}
.settingsSlider .valueSpan {
    width: 40px;
    text-align: right;
}




#popupScore .popupInner {
    display: block;
    background: none;
    border: none;
}
#totalScore {
    margin-top: 30px;
    font-weight: bold;
    font-family: 'Palatino', sans-serif;
}
#totalScore span {
    font-size: 22px;
    vertical-align: middle;
}
#scoreResume {
    padding: 0 40px;
}
#scoreTitle {
    font-weight: bold;
    margin-bottom: 30px;
    font-family: 'Palatino', sans-serif;
}
#popupScore .score {
    display: flex;
    align-items: center;
    transition: 1s color;
    margin-left: 25px;
    font-size: 14px;
    justify-content: end;
    flex-grow: 1;
    font-family: 'Palatino', sans-serif;
}

#scoreParchment {
    flex-grow: 1;
    display: flex;
    background: url("../images/pergamena_verticale_center.png.html");
    background-size: 100% 100%;
    padding: 20px 80px;
    margin: 70px;
    position: relative;
    width: 550px;
    min-height: 300px;
    flex-direction: column;
}
#scoreParchment:before {
    content: "";
    position: absolute;
    height: 57px;
    top: -57px;
    left: -20px;
    right: -20px;

    background: url("../images/pergamena_verticale_top.png.html");
    background-size: 100% 100%;

}
#scoreParchment:after {
    content: "";
    position: absolute;
    height: 57px;
    bottom: -57px;
    left: 0;
    right: 0;

    background: url("../images/pergamena_verticale_down.png.html");
    background-size: 100% 100%;
}

#scoreBox {
    flex-grow: 1;
    display: flex;
    padding: 20px 40px;
    margin: 20px 50px;
    position: relative;
    width: 550px;
    min-height: 300px;
    flex-direction: column;
}
#scoreImage {
    max-width: 300px;
    margin: 0 auto 30px;
}

#scoreParchment #scoreLogo, #scoreBox #scoreLogo, #scoreBox #scoreLogoPrint {
    width: 300px;
    margin: 0 auto 30px;
}
#scoreBox #scoreLogoPrint {
    display: none;
}

.scoreBadge {
    display: flex;
    align-items: center;
    margin: 5px 0;
    text-align: left;
    font-size: 14px;
}

.scoreBadge .image {
    height: 42px;
    flex: none;
    margin-right: 5px;
    filter: saturate(0.1);
}
.scoreBadge.badgeTaken .image {
    filter: saturate(1);
}

@media print {
    #popupScore {
        overflow: hidden;
    }

    #popupScore .popupBackground {
        background: white;
    }

    #scoreBox {
        color: black;
    }
    #scoreLogo {
        display: none;
    }
    #scoreBox #scoreLogoPrint {
        display: block;
    }

    #scoreButtons {
        display: none;
    }

    .popupInnerBackground {
        display: none;
    }
}

#popupInstructions .popupInner {
    flex-direction: column;
    align-items: center;
    min-width: 200px;
    min-height: 200px;
}

#popupInstructionsTitle {
    font-size: 24px;
    margin-top: 10px;
    font-family: 'Palatino';
}
#popupInstructionsContent {
    margin: 20px 0;
}

#popupControls .popupInner {
    flex-direction: column;
    align-items: center;
    min-width: 200px;
    min-height: 200px;
    max-width: 1000px;
}

#popupControlsTitle {
    font-size: 24px;
    margin-top: 10px;
    font-family: 'Palatino';
}
#popupControlsContent {
    margin: 20px 0;
    text-align: center;
}

#popupSledgeBuilder h4 {
    margin: 0;
}
#sledgeBuild {
    max-height: calc( 100vh - 200px );
    margin: 0;
}
#popupSledgeBuilder .popupInner {
    flex-direction: column;
    width: 800px;
}

.sledgeStep {
    margin: 10px 0;
}

#prevSledgeStep {
    float: left;
}
#nextSledgeStep, #confirmSledge {
    float: right;
}

#sledgeEndPicker {
    margin: 20px;
}
#sledgeEndPicker .btn {
    margin: 0 10px;
}

#sledgeFasteningPicker {
    display: flex;
}
#sledgeFasteningPicker > div {
    margin: 10px;
}

#sledgeDogsPicker {
    display: flex;
    margin: 20px;
}
#sledgeDogsPicker select {
    padding: 5px 10px;
    background: linear-gradient(90deg, rgba(132,212,253,1) 0%, rgba(199,225,252,1) 25%, rgba(199,225,252,1) 75%, rgba(132,212,253,1) 100%);
    color: #438DBA;
    border-radius: 8px;
    margin-top: 10px;
    border: none;
    font-family: 'Palatino', sans-serif;
    font-weight: bold;
    font-size: 16px;
}

#popupSledgeBuilder img {
    display: block;
    margin: 0 auto 5px;
}

.sliderContainer.qualContainer {
    display: block;
}
#qualitySlider {
    width: 100%;
}
.labelsCont {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.qualLabel {
    display: block;
    width: 33%;
    position:relative;
    font-weight: normal;
    font-size: 12px;
}
.qualIndicator {
    position: absolute;
    width: 4px;
    height: 20px;
    background: white;
    /* border: 1px solid black; */
    border-radius: 8px;
    top: -18px;
    left: 50%;
    z-index: 0;
}
.qualIndicator.leftIndicator {
    left: 6%;
    margin-left: 1px;
}
.qualIndicator.rightIndicator {
    left: 93%;
    margin-left: 1px;
}
#qualitySlider {
    -webkit-appearance: none;
    width: 100%;
    height: 5px;
    border-radius: 5px;
    background: transparent;
    opacity: 1;
    -webkit-transition: opacity .15s ease-in-out;
    transition: opacity .15s ease-in-out;
    outline: 1px solid white;
}
