/*CSS here will be used by any file that has added the stylesheet*/

/* CSS - Cascading Style Sheet */

:root {

    --color-0: rgba(38, 38, 38, 1);
    --color-1: rgba(122, 129, 132, 1);
    --color-2: rgba(48, 48, 48, 1);
    --color-3: rgba(45, 109, 130, 1);
    --color-4: rgba(180, 100, 100, 1);
    --color-5: rgba(140, 60, 60, 1);

    --bg-color: var(--color-0);
    --bg-color-2: rgb(60, 80, 85);
    --bg-light-color: rgba(48, 61, 65, 1);
    --bg-dark-color: rgba(24, 31, 33, 1);
    --bg-hover-color: var(--color-2);

    --font-color: #ffffff;
    --font-color-2: #ddd;
    --border-color: black;

    --measurement-detail-node-bg-light: var(--color-1);
    --measurement-detail-node-bg-dark: var(--color-2);
    --measurement-detail-area-bg-color: #eee;

    --viewer-bg: rgb(48, 48, 48);
    --sidebar-bg: rgba(38, 38, 38, 1);
    --selected: #47cbf6;
}

html,
body {
    font-family: "Oswald", sans-serif !important;
}

/* The title of the model */
.title {
    display: table-caption;
    position: absolute;
    z-index: 1000;
    width: 300px;
    /* word-spacing: 100vw; */
    margin: auto;
    top: 30px;
    right: 30px;
    color: white;
    text-align: right;
    padding: 0px;
    font-weight: 500;
    line-height: 0.90;
    font-size: 3.5vw;
    pointer-events: none;
}

.theme-color-text {
    color: var(--color-4);
}

.theme-color-background {
    background-color: var(--color-4);
}

.theme-button {
    background-color: var(--color-4);
    border-radius: 5px;
    padding: 5px 10px;
    width: auto;
    color: var(--font-color);
    cursor: pointer;
}

.theme-button:hover {
    background-color: var(--color-5);
}

.theme-download-button {
    pointer-events: auto;
    background: url(https://data.dh.gu.se/ui-icons/download_white_circle.png);
    background-size: 22px;
    background-repeat: no-repeat;
    background-position: 8px;
    padding-left: 40px;
    background-color: var(--color-4);
    width: auto;
    height: 25px;
    max-width: 400px;
}

#full-screen-label {
    display: none;
    color: white;
    font-size: 0.9em;
    font-weight: 200;
    width: auto;
    right: calc(60px);
    margin-top: 30px;
    border-radius: 8px;
    padding: 5px 15px;
    background-color: rgba(0, 0, 0, 0.8);
    position: absolute;
}

/* Common share and download buttons for all media categories */

.round-button {
    width: 40px;
    height: 40px;
    cursor: pointer;
    position: absolute;
    left: 30px;
    background-color: rgb(0, 0, 0, 0.8) !important;
    border-radius: 50%;
    user-select: none;
    -webkit-user-select: none;
}

.round-button:hover {
    background-color: rgb(0, 0, 0, 1.0) !important;
    cursor: pointer;
    transform: scale(1.07);
}

.download-button {
    pointer-events: auto;
    background: url(https://data.dh.gu.se/ui-icons/download_white.png);
    background-size: 80%;
    background-repeat: no-repeat;
    background-position: center;
    bottom: 3px;
    z-index: 1000;
}

.share-button {
    pointer-events: auto;
    background: url(https://data.dh.gu.se/ui-icons/share_white.svg);
    background-size: 60%;
    background-repeat: no-repeat;
    background-position: center;
    bottom: 50px;
}

.clear-annotation-button {
    pointer-events: auto;
    background: url(https://data.dh.gu.se/ui-icons/annotations_active_white.png);
    background-size: 80%;
    background-repeat: no-repeat;
    background-position: center;
    bottom: 150px;
    margin-top: 5px;
}

.annotate-button {
    pointer-events: auto;
    background: url(https://data.dh.gu.se/ui-icons/annotate_white.svg);
    background-size: 70%;
    background-repeat: no-repeat;
    background-position: center;
    bottom: 100px;
    margin-top: 5px;
}

.polygon-annotate-button {
    pointer-events: auto;
    background-image: url(https://data.dh.gu.se/ui-icons/polygon_white.svg);
    background-size: 80%;
    background-repeat: no-repeat;
    background-position: center;
    bottom: 100px;
    margin-top: 5px;
}

svg.a9s-annotationlayer .a9s-selection polygon.a9s-inner,
svg.a9s-annotationlayer .a9s-annotation polygon.a9s-inner {
    stroke: red;
    stroke-width: 2;
    stroke-dasharray: none;
    fill: transparent;
}

.expand-button {
    pointer-events: auto;
    background: url(https://data.dh.gu.se/ui-icons/expand_white.svg);
    background-size: 60%;
    background-repeat: no-repeat;
    background-position: center;
    bottom: 3px;
    width: 38px;
    height: 38px;
}

.full-page {
    background: url(https://data.dh.gu.se/ui-icons/expand_white.svg);
    background-size: 100%;
    background-repeat: no-repeat;
    background-position: top;
    width: 32px;
    height: 32px;
    overflow: hidden;
    cursor: pointer;
}

.full-page-active {
    background: url(https://data.dh.gu.se/ui-icons/compress_white.svg);
    background-repeat: no-repeat;
    background-size: 100%;
}

.label-popup {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8em;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.8em;
    white-space: nowrap;
}

#download-label {
    bottom: 9px;
    left: 77px;
}

#share-label {
    margin-left: 45px;
    margin-top: 7px;
    min-width: 53px;
}

.popup-animation {
    animation: download-popup-animate 3s normal forwards ease-in-out;
}

@keyframes download-popup-animate {
    from {
        opacity: 0;
        transform: scale(0.3);
    }

    15% {
        opacity: 1;
        transform: scale(1.0);
    }

    80% {
        transform: scale(1.0);
        opacity: 1;
    }

    to {
        opacity: 0;
        transform: scale(0.0);
    }
}

.deactivated {
    opacity: 0.5;
    pointer-events: none;
}

/* This is the label that states what type of viewer this is: mesh or point cloud */

.model-viewer-id {
    position: absolute;
    z-index: 1000;
    max-width: auto;
    bottom: 90px;
    right: 20px;
    color: white;
    text-align: right;
    padding: 15px 15px;
    font-weight: 400;
    line-height: 0.90;
    font-size: 2.0vw;
    pointer-events: none;
    text-transform: capitalize;
}

@media screen and (max-width: 1900px) {
    .title {
        font-size: 3.0em;
    }

    .model-viewer-id {
        font-size: 2em;
    }
}



h3 {
    cursor: pointer;
    padding: 4px 10px 4px 20px;
    font-size: 2em;
    margin-bottom: 0px;
    margin-top: 0px;
}

h2 {
    display: block;
    text-align: left;
    font-size: 1.2em;
    overflow: hidden;
    white-space: nowrap;
    font-weight: bold;
    letter-spacing: 1px;
    padding-left: 0px;
    margin-right: 0px;
    padding-top: 20px;
    margin-bottom: 10px;
}


.button-icon {
    width: 25px !important;
    height: 25px !important;
    opacity: 0.8;
    margin-top: 10px;
}

.button-icon-wide {
    width: 55px !important;
    height: 25px !important;
    opacity: 0.8;
    margin-top: 10px;
}

.button-icon:hover {
    opacity: 1.0;
}


.tool-item h2 {
    padding-top: 0px;
    padding-left: 20px;
}

.interface-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    position: absolute;
    bottom: 20px;
    pointer-events: none;
}

.interface-area-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    position: absolute;
    top: 80px;
    pointer-events: none;
    user-select: none;
}

.toolbar-bottom {
    pointer-events: auto;
    display: flex;
    flex-direction: row;
    justify-content: center;
    padding-left: 10px;
    padding-right: 10px;
    width: auto;
    height: 48px;
    background-color: rgb(0, 0, 0, 0.8);
    border-radius: 8px;
    z-index: 1000;
    cursor: pointer;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    touch-action: none;
    -ms-touch-action: none;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0.0rem 0.1rem 1rem rgba(0, 0, 0, 0.3) !important;
    border-style: solid;
    border-color: grey;
    border-width: 0.5px 0px 0px 0px;
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

/* A switcher for multiple media in same module */

#ToolbarHorizontal {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgb(0, 0, 0, 0.8);
    border-radius: 6px;
    width: auto;
    margin-bottom: 12px;
}

#Prev,
#Next {
    position: relative;
    width: 30px;
    height: 14px;
    background-size: 35px !important;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

#Prev {
    background-image: url(https://data.dh.gu.se/ui-icons/arrow_prev_white.png);
}

#Next {
    background-image: url(https://data.dh.gu.se/ui-icons/arrow_next_white.png);
    margin-left: 5px;
}

#currentpage {
    font-family: "Oswald", sans-serif !important;
    color: white;
    font-size: 0.8em !important;
    font-weight: 100;
    pointer-events: none !important;
}

.SwitchButton {
    pointer-events: auto;
    width: 25px !important;
    height: 35px;
    color: white;
    opacity: 0.8;
    margin-right: 8px;
    margin-left: 8px;
    margin-top: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.SwitchButton:hover {
    opacity: 1;
    cursor: pointer;
}


#transcription p {
    margin: 0;
    padding: 5px 0 0 10px;
}

#translation-display>p {
    margin: 0;
}

#translation-display {
    clear: both;
}

#description-display>p {
    margin: 0;
}

#description-display {
    clear: both;
}

#contributors>p {
    margin: 0;
    padding: 2px;
    font-size: 17.6px;
}

#contributors {
    clear: both;
}

#edit-link {
    text-decoration: none;
}


/* a flex-box style to keep things centered */
.ui-overlay-container {
    width: 100%;
    display: flex;
    justify-content: center;
    position: absolute;
    bottom: 60px;
    pointer-events: none;
}

/* This one describes the look of the UI-element with the navigation instructions */
#instructions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    position: absolute;
    z-index: 100000;
    width: 340px;
    height: auto;
    min-height: 45px;
    bottom: 110px;
    border-radius: 8px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    text-align: center;
    padding: 15px 15px;
    font-size: 0.9em;
    font-weight: 300;
    line-height: 1.4;
    box-shadow: 0.0rem 0.1rem 1rem rgba(0, 0, 0, 0.3) !important;
    user-select: none;
    -webkit-user-select: none;
    /* Safari */
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    transition: all 0.5s ease-in-out;
}

.short {
    width: 290px !important;
}

.instruction-closer {
    width: 15px;
    height: 15px;
    top: 5px;
    margin-right: 5px;
    border-radius: 50%;
    position: absolute;
    right: 0px;
    color: white;
    background-image: url("close.png");
    background-size: 18px 18px;
    background-repeat: no-repeat;
    background-position: center;
    line-height: 0;
    font-size: 40px;
    pointer-events: auto;
    cursor: pointer;
}

.instruction-closer:hover {
    opacity: 0.6;
}

.LODtool {
    pointer-events: auto;
    position: absolute;
    z-index: 100000;
    width: 270px;
    height: auto;
    min-height: 45px;
    bottom: 20px;
    border-radius: 8px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    text-align: center;
    padding: 0px 20px 5px 20px;
    font-size: 0.8em;
    line-height: 2.0;
    box-shadow: 0.0rem 0.1rem 1rem rgba(0, 0, 0, 0.3) !important;
    border-style: solid;
    border-color: grey;
    border-width: 0.5px 0px 0px 0px;

}

.LODtool span {
    user-select: none;
    -webkit-user-select: none;
    cursor: default;
}

/* The switch between the different "tabs" in the sidebar */
.switch {
    color: white;
    display: flex;
    cursor: pointer;
    font-size: 1.8em;
}

.switch-button {
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    margin-right: 20px;
    margin-left: 20px;
}

.switch-button:hover {
    box-shadow: inset 2px 2px 20px rgba(0, 0, 0, 0.05);
}

/* Metadata classes */

.flex-container {
    font-size: 1.2em;
}

.flex-container .metadata {
    color: hsl(195, 70%, 72%) !important;
}

/* a:link {
    color: white !important;
} */

.flex-container .description {
    line-height: 1.2 !important;
    font-size: 0.9em !important;
}

/* Potree sidebar lists*/
.pv-menu-list {
    list-style-type: none;
    padding-bottom: 20px;
    padding-left: 0px;
    margin: 0px 0px;
    overflow: hidden;
}

.pv-menu-list>* {
    margin: 10px 20px;
}


/* 3d hop tool layout*/
.tool-item {
    width: 100%;
    float: left;
}

.tool-icon {
    float: left;

}

.tool-label {
    float: left;
    margin-left: 15px;
    margin-top: 5px;
}

.potree_menu_toggle {
    display: none;
}


/* Hide away complexities on mobile */

@media screen and (max-width: 500px) {

    .compact {
        display: none;
    }

    .full-page {
        display: none;
    }
}




/*styling for pop-up of annotations*/
.popup {
    display: none;
    position: fixed;
    color: white;
    left: 50%;
    bottom: 35px;
    transform: translate(-50%, -50%);
    border-radius: 8px;
    background-color: rgba(0, 0, 0, 0.8);
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.7);
    z-index: 1000;
    width: 260px;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.popup-content {
    text-align: center;
}

.popup-content p {
    line-height: 1.0;
}

.popup-content button {
    margin: 0px 10px 15px 10px;
    padding: 8px 15px;
    font-size: 0.8em;
    color: white;
    background-color: rgb(60, 60, 60);
    border-width: 0.0px;
    border-radius: 6px;
    border-color: none;
    width: 220px;
}

.popup-content button:hover {
    opacity: 0.8;

}

#saveNo {
    background-color: rgb(130, 50, 50);
}


#toolButtonsContainerVertical {
    position: absolute;
    background-color: transparent;
    top: calc(80px);
    left: 30px;
    z-index: 1000;
    display: flex;
    gap: 5px;
    display: flex;
    flex-direction: column;
}


.toolButtonVertical {
    background-color: rgba(0, 0, 0, 0.8);
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 40px;
    height: 40px;
}

.toolButtonVertical:hover {
    transform: scale(1.05);
}

.toolButtonVertical img:hover {
    opacity: 1.0;
}

.toolButtonVertical img {
    width: 45%;
    height: 45%;
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.metadata-help {
    display: flex;
    flex-direction: column;
    flex-grow: inherit;
    align-items: center;
    justify-content: center;
    float: left;
    border-radius: 8px;
    width: calc(100%);
    height: calc(100vh - 450px);
    min-height: 200px;
    margin-left: 0px;
    background-color: rgba(255, 255, 255, 0.3);
    overflow: auto;
    margin-top: 20px;
    margin-bottom: 30px;
    text-align: center;
    font-size: 1.2em;
    font-weight: 100;
}

.annotation-box-demo {
    width: 100px;
    height: 50px;
    margin-top: 20px;
    border-width: 2px;
    border-color: black;
    border-style: dotted;
    border-radius: 6px;
    margin-left: 40px;
}

.annotation-box-demo-2 {
    width: 100px;
    height: 50px;
    margin-top: 20px;
    border-width: 2px;
    border-color: black;
    border-style: dotted;
    border-radius: 6px;
    margin-top: -30px;
    margin-left: -20px;
}

*:focus {
    outline: none !important;
}