/* Fixes the overlay lag */
.openseadragon-container a {
transition: none !important;
}
.openseadragon-canvas:focus {
outline: none;
}

#osd-wrap {
margin-bottom: 50px;
margin-left: -15%;
position: relative;
width: calc(100% + 30%);
}

#osd-wrap::before {
background-color: #d3d3d3;
content: "";
display: block;
height: 1px;
margin: 25px 0 10px 0;
overflow: hidden;
width: 100%;
}

#osd-wrap::after {
background-color: #d3d3d3;
content: "";
display: block;
height: 1px;
margin: 25px 0 25px 0;
overflow: hidden;
width: 100%;
}

.sketch_title {
border-bottom: 1px solid #d3d3d3;
letter-spacing: 0.2em;
padding-bottom:10px;
text-align: center;
text-transform: uppercase;
}

#osd_PAFA {
background-color: #EEE9E4;
border-bottom: 1px solid #d3d3d3;
height: 550px;
margin: 0;
overflow: hidden;
position: relative;
width: 100%;
}

#osd_PAFA.fullpage {
min-height: 100vh !important;
width: 100% !important;
}

#osd_PAFA.is_ios.fullpage {
/* Fix for 100vh not working for mobile WebKit e.g. iPad mini Safari */
/* NB Nothing seems to work for Firefox, */
/* even if targeted "Mozila" via navigator.userAgent. */
min-height: -webkit-fill-available !important;
}

#osd_PAFA.reconstruction .openseadragon-container {
height: 50% !important;
}

#osd_PAFA.fullpage .openseadragon-container {
background-color: #EEE9E4 !important;
max-height: calc(100% - 80px) !important;  /* iPad mini Safari */
/*max-height: calc(100vh - 80px) !important;*/
}

#osd_PAFA.fullpage .modal_image .openseadragon-container,
#osd_PAFA.fullpage .img_paras_wrap .openseadragon-container,
#osd_PAFA.fullpage .full_height .openseadragon-container {
max-height: 100% !important;  /* Because iPad mini Safari 100% creates white space. */
}

#osd_PAFA.fullpage.reconstruction .openseadragon-container {
max-height: calc(50% - 40px) !important;  /* iPad mini Safari */
/*max-height: calc(50vh - 40px) !important;*/
}

#osd_reconstruction {
background-color: #EEE9E4;
display: none;
height: 50%;
margin: 0;
position: relative;
width: 100%;
}

#osd_PAFA.fullpage #osd_reconstruction {
height: calc(50% - 40px);  /* iPad mini Safari */
/*height: calc(50vh - 40px);*/
}

#osd_reconstruction .openseadragon-container {
min-height: 100% !important;
}

.img_num {
border-radius: 50%;
visibility: hidden;
}
.img_num.design {
visibility: visible;
}
.img_num.selected {
box-shadow: 0 0 6px 2px #ff4d4d;
}
.img_num:hover {
box-shadow: 0 0 6px 2px #ff4d4d;
cursor: pointer;
}

.unidentified.framed {
border-radius: 0;
height: 20px;
width: 48px;
}
.box.unidentified {
visibility: hidden;
outline: 2px solid #cc0000;
}
.box.unidentified.active {
visibility: visible;
}
.box.unidentified.active:hover {
cursor: pointer;
}

/* high_light to avoid conflict with highlight in template.css */
.design_two.high_light {
box-shadow: 0 0 6px 2px #ff4d4d;
}

/* menubar ------------------------------------------------------------*/

.menubar.fullpage {
display: none;
}

#osd_PAFA.fullpage .menubar.fullpage {
bottom: 0;
border-top: 1px solid #d3d3d3;
display: block;
height: 80px;
left: 0;
position: absolute;
right: 204px;
z-index: 100;
}

.menu_parts {
display: flex;
justify-content: space-between;
position: relative;
width: 100%;
}

.menubar.fullpage .menu_parts {
padding-left: 5%;
padding-right: 5%;
padding-top: 5px;
margin: 0 auto;
}

#pafa_toolbar {
height: 50px;
width: 210px;
}

#pafa_toolbar.fullpage {
bottom: 1px;
border-top: 1px solid #d3d3d3;
display: block;
height: 80px;
position: absolute !important;
right: 0;
width: 205px;
z-index: 100;
}

/*---------------------------------------------------------------------------*/

.menu_list {
display: none;
flex-grow: 1;
margin: 10px 35px 0 35px;
}

.menu_list.in_view {
display: block;
}

.sidebar.menu_list {
display: none;
}

.menu_row {
display: flex;
justify-content: space-between;
width: 85%;
}

.unidentified .menu_row,
.menu_row.second {
justify-content: flex-start;
}

.unidentified .menu_row .menubar_option {
padding-right: 25px;
}

/* popup --------------------------------------------------------------------*/
/* renamed from modal because modal used in boostrap */

#osd_PAFA .popup {
background-color: #e6e6e6;
display: none;
font-size: 16px;
height: calc(100% - 20px);
left: 0;
margin: 10px;
position: absolute;
top: 0;
transition: 0.5s;
width: calc(100% - 30px);
z-index: 20;
}

#osd_PAFA.sidebar .popup {
width: calc(100% - 370px);
}

#osd_PAFA.sidebar.fullpage .popup {
max-height: calc(100% - 100px);
width: calc(100% - 370px);
transition: 0.5s;
}

#osd_PAFA.fullpage .popup {
max-height: calc(100% - 100px);
}

#osd_PAFA .popup.selected {
display: block;
}

.popup button {
background-color: transparent;
background-image: url("../images/icon_exit.png");
background-position: center;
background-repeat: no-repeat;
background-size: 28px;
border: none;
height: 28px;
opacity: 0.3;
outline: none;
transition: 0.2s opacity;
width: 28px;
z-index: 100;
}

.popup button:hover {
opacity:0.85;
}

.view_info .call_out,
.popup .call_out {
color: #0070e0;
}

/* modal simple --------------------------------------------------------------*/

#osd_PAFA .popup.simple {
grid-template-rows: 1fr 1fr;
grid-template-columns: 1fr 1fr;
grid-template-columns: 1fr 100px;
height: 100%;
}

#osd_PAFA .popup.simple.selected {
display: grid;
}

.popup.simple .close_popup {
grid-column-end: 3;
grid-column-start: 2;
grid-row-end: 3;
grid-row-start: 1;
justify-self: center;
margin-top: 25px;
}

.popup .content {
grid-column-end: 2;
grid-column-start: 1;
grid-row-end: 3;
grid-row-start: 1;
max-width: 900px;
padding-bottom: 20px;
padding-left: 5%;
}

#osd_PAFA.fullpage .popup .content {
padding-left: 10%;
}

.popup.smirke .content, 
.popup.appendix .content {
padding-top: 10px;
}

.popup.simple .modal_image {
height: 50%;
padding: 20px 20px 20px 0;
}

.popup.simple .text {
font-size: 14px;
height: 50%;
overflow-y: auto;
padding: 20px 20px 20px 0;

}

.popup.simple .text.full_height {
height: 100%;
}

/* modal left right ----------------------------------------------------------*/

#osd_PAFA .popup.left_right {
grid-template-rows: repeat(5, 1fr);
grid-template-columns: 1fr 1fr;
grid-gap: 20px;
padding: 10px 0 10px 10px;
}

#osd_PAFA .popup.left_right.selected {
display: grid;
}

.popup.left_right .modal_image {
grid-column-end: 2;
grid-column-start: 1;
grid-row-end: 4;
grid-row-start: 1;
}

.popup.left_right .image_caption {
grid-column-end: 2;
grid-column-start: 1;
grid-row-end: 6;
grid-row-start: 4;
overflow-y: auto;
}

.popup.left_right .close_popup {
grid-column-end: 3;
grid-column-start: 2;
grid-row-end: 2;
grid-row-start: 1;
justify-self: end;
margin: 25px 50px 0 0;
}

.popup.left_right .modal_text {
grid-column-end: 3;
grid-column-start: 2;
grid-row-end: 6;
grid-row-start: 2;
overflow-y: auto;
padding-right: 10px;
}

.sequence {
font-size: 14px;
}
.sequence:hover {
color: #663300;
cursor: pointer;
}
.sequence.selected {
color: #cc0000;
}

/*----------------------------------------------------------------------------*/

#osd_PAFA.fullpage .popup .text {
font-size: 16px;
height: auto;
max-height: calc(100% - 300px);
padding-top: 30px;
}

#osd_PAFA.fullpage .popup .text.full_height {
height: 95%;
max-height: unset;
padding-top: 0;
}

.popup .text_img {
display: block;
margin: 0 auto;
padding-bottom: 25px;
padding-top: 25px;
width: 250px;
}

.text_img.sketch {
width: 100%;
height: auto;
max-width: 600px;
}

/*https://stackoverflow.com/questions/4861224/how-to-use-css-to-surround-a-number-with-a-circle*/
.circled {
border: 1px solid #cc0000;
border-radius: 50%;
color: #cc0000;
display: none;
font-size: 14px;
font-weight: bold;
line-height: 20px;
text-align: center;
width: 22px;
}

.circled.loaded {
display: inline-block;
}

.lettered {
color: #cc0000;
display: none;
font-size: 14px;
font-weight: bold;
}

.lettered.loaded {
display: inline-block;
}

.modal_overlay {
opacity: 0.5;
outline: 2px solid #cc0000;
}

.modal_overlay:hover {
opacity: 1;
outline: 2px solid #cc0000;
cursor: default;
}

.modal_overlay.show,
.modal_overlay.vertical_lines.hover,
.modal_overlay.smirke_paintings.hover,
#unidentified_13.modal_overlay,
#unidentified_16.modal_overlay {
opacity: 1;
}

.text_overlay {
border-bottom: 2px solid #ff9999;
border-top: 2px solid transparent;
}

.text_overlay:hover {
cursor: default;
}

.text_overlay:hover,
.text_overlay.hover {
background-color: #ffcccc;
border-bottom: 2px solid #ffcccc;
border-top: 2px solid #ffcccc;
}

/*----------------------------------------------------------------------------*/

.osd_design,
.osd_unidentified {
background-color: #fff;
height: 100%;
width: 100%;
}

#osd_design_four {
background-color: #fff;
height: 50%;
position: relative;
width: 100%;
}

.osd_painting,
#osd_unidentified_12 {
height: 100%;
width: 100%;
}

#osd_design_sketch,
.osd_unillustrated {
background-color: #fff;
height: 300px;
margin: 10px 0 0 25px;
position: relative;
width: 75%;
}

/* Needs to be Ids to work */
.fullpage #osd_design_one .openseadragon-container,
.fullpage #osd_design_two .openseadragon-container,
.fullpage #osd_design_three .openseadragon-container,
.fullpage #osd_design_four .openseadragon-container,
.fullpage #osd_design_five .openseadragon-container,
.fullpage #osd_design_six .openseadragon-container,
.fullpage #osd_design_sketch .openseadragon-container,
.fullpage #osd_unidentified_13 .openseadragon-container,
.fullpage #osd_unidentified_16 .openseadragon-container,
.fullpage #osd_unillustrated_molinari .openseadragon-container,
.fullpage #osd_unillustrated_fulton .openseadragon-container {
background-color: #fff !important;
}

/*----------------------------------------------------------------------------*/

.small_icons img {
height: 35px;
width: 36px;
}

#osd_sidebar {
background-color: #fff;
box-shadow: -5px 0 5px -1px rgba(102,51,0,0.25); /*663300 re index_article:hover #EEE9E4*/
height: 100%;
position: absolute;
right: 0;
top:0;
transition: 0.5s;
width: 350px;
z-index: 100;
}

.sidebar_title {
display: none;
font-size: 12px;
letter-spacing: 0.2em;
text-align: center;
text-transform: uppercase;
}

.sidebar_title::after {
background-color: #d3d3d3;
content: "";
display: block;
height: 1px;
margin-bottom: 10px;
margin-left: auto;
margin-right: auto;
margin-top: 10px;
overflow: hidden;
width: 85%;
}

#osd_PAFA.fullpage .sidebar_title {
display: block;
}

#osd_PAFA.fullpage #osd_sidebar {
max-height: calc(100% - 80px);  /* iPad mini Safari */
/*max-height: calc(100vh - 80px);*/
width: 350px;
}

#osd_sidebar.change_width,
#osd_PAFA.fullpage #osd_sidebar.change_width {
width: 10px;
}

#osd_sidebar .sidebar_content {
display: flex;
flex-direction: column;
height: calc(100% - 20px);
margin: 20px 20px 0 20px;
opacity: 1;
position: relative;
transition: opacity 1s ease-in-out;
}

#osd_sidebar.change_width .sidebar_content {
opacity: 0;
transition: opacity 0.1s ease-in-out;
}

#osd_sidebar .toggle {
background-color: #fff;
box-shadow: -2px 0 5px 2px rgba(102,51,0,0.25);
color: #663300;
display: none;
font-size: 25px;
height: 35px;
left: -20px;
padding-left: 5px;
position: absolute;
top: 5%;
width: 20px;
}

#osd_sidebar .toggle::after {
background-color: #fff;
content: '';
display: block;
height: 35px;
right: -10px;
pointer-events: none;
position: absolute;
top: 0;
width: 10px;
}

#osd_sidebar .toggle.active {
display: block;
}

#osd_sidebar .toggle:hover {
cursor: pointer;
}

#osd_sidebar .view_info {
display: none;
flex-grow: 2;
line-height: 1.5;
margin-top: 10px;
overflow: auto;
padding: 0 10px 25px 0;
}

#osd_PAFA.fullpage #osd_sidebar .view_info {
max-height: 60%;
}

#osd_sidebar .view_info::after {
background-color: #d3d3d3;
content: "";
display: block;
height: 1px;
margin-bottom: 10px;
margin-left: auto;
margin-right: auto;
margin-top: 10px;
overflow: hidden;
width: 85%;
}

#osd_sidebar .view_info.active {
display: block;
}

#osd_sidebar.change_width .view_info.active {
display: none;
}

.view_info.three {
margin-bottom: 100px;
}

#osd_sidebar .view_info.three::after {
display: none;
}

.view_info .help {
color: #444;
font-size: 12px;
}

.view_info .info_left {
display: inline;
}
.view_info .info_below {
display: none;
}

#osd_sidebar .slider_container {
background-color: #fff;
bottom: 0;
height: 110px;
opacity: 1;
position: absolute;
width: 100%;
}

#osd_sidebar .slider_container::before {
background-color: #d3d3d3;
content: "";
display: block;
height: 1px;
margin-bottom: 10px;
margin-left: auto;
margin-right: auto;
margin-top: 10px;
overflow: hidden;
width: 75%;
}

#osd_sidebar.change_width .slider_container {
opacity: 0;
transition: opacity 0.1s ease-in-out;
}

.slider_container .slider_title {
color: grey;
margin-left: 10px;
}

.slider_container .slider_title.enabled {
color: #663300;
}

#osd_PAFA.fullpage .sidebar_buttons {
margin-top: 10px;
}

.sidebar_buttons::after {
background-color: #d3d3d3;
content: "";
display: block;
height: 1px;
margin-bottom: 10px;
margin-left: auto;
margin-right: auto;
margin-top: 10px;
overflow: hidden;
width: 85%;
}

button.menubar_option {
background-color: transparent;
border: none;
color: #663300;
margin: 0;
margin-bottom: 5px;
outline: none;
opacity: 1;
padding: 0;
overflow: visible;
text-align: left;
}

button.menubar_option:not(:first-of-type) {
padding-left: 10px;
}

.menubar_option .num_title {
border-bottom: 2px solid transparent;
}
.menubar_option:hover .num_title,
.menubar_option.selected .num_title,
.menubar_option.osd_selected .num_title {
border-bottom: 2px solid #cc0000;
color: #cc0000;
}

.menubar_option .circled {
border: 1px solid #663300;
border-radius: 50%;
color: #663300;
font-size: 12px;
font-weight: bold;
line-height: 18px;
text-align: center;
width: 20px;
}

.menubar_option:hover .circled ,
.menubar_option.selected .circled,
.menubar_option.osd_selected .circled {
border: 1px solid #cc0000;
color: #cc0000;
}

.sidebar_content button.layer {
background-color: #f2f2f2;
border: none;
color: #663300;
height: 25px;
margin: 0;
margin-bottom: 5px;
padding: 0 0 0 5px;
overflow: visible;
text-align: left;
width: 100%;
}

.sidebar_content button.layer:hover {
background-color: #e6e6e6;
}

.sidebar_content button.layer.in_view,
.sidebar_content button.layer.in_view:hover {
background-color: #fff;
outline: 1px solid #e6e6e6;
}

#plan-notes {
margin-top: 20px;
}

#plan-notes::after {
background-color: #d3d3d3;
content: "";
display: block;
height: 1px;
margin: 0 0 25px 0;
overflow: hidden;
width: 100%;
}

.appendix_option {
color: #663300;
cursor: pointer;
}

.appendix_option:hover,
.appendix_option.selected {
border-bottom: 2px solid #cc0000;
color: #cc0000;
}

/*-----------instructions_button----------*/

.instructions_wrap {
margin: 25px 0 100px 0;
}

.instructions_wrap::after {
background-color: #d3d3d3;
content: "";
display: block;
height: 1px;
margin: 50px 0 75px 0;
overflow: hidden;
width: 100%;
}

.instructions button {
background: transparent;
border: 1px solid #d3d3d3;
color: #036;
margin: 10px 15px 10px 0;
outline: none;
padding: 5px 10px 5px 10px;
user-select: none;
}

.instructions button:hover {
background: #d3dede;
cursor: pointer;
}

.instructions button.active_background {
background: #d3dede;
}

/*-----------panorama----------*/

#panorama {
height:500px;
width: 100%;
}

.pnlm-hotspot {
visibility: hidden !important;
}

.pnlm-hotspot.show {
visibility: visible !important;
}

div.pnlm-tooltip span {
background-color: rgba(230, 230, 230, 0.9) !important;
color: #292929 !important;
font-family: "Libre Baskerville", Baskerville, Georgia, Times, serif;
}

div.pnlm-tooltip:hover span:after {
border-color: rgba(230, 230, 230, 0.9) transparent transparent transparent !important;
}

.long_caption {
font-size: 12px;
}

/*-----------------------------*/

.no_opacity {
opacity: 0;
}

.display {
display: block !important;
}

.visible {
opacity: 1;
transition: opacity 0.5s linear;
-o-transition: opacity 0.5s linear;
-moz-transition: opacity 0.5s linear;
-webkit-transition: opacity 0.5s linear;
}

@media screen and (max-width:1200px) {
    #osd-wrap {
    margin-left: -10%;
    width: calc(100% + 20%);
    }
}

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

#pafa_toolbar {
    bottom: auto;
    border-bottom: none;
    display: block;
    height: auto;
    left: 0;
    position: absolute !important;
    right: auto;
    top: 0;
    white-space: nowrap;
    width: 144px;
    z-index: 100;
}

.menubar {
    display: none;
}

.sidebar.menu_list {
    display: block;
    margin: 10px 35px 0 0;
}

.view_info .help.slider {
    margin-bottom: 0;
    padding-top: 25px;
}

.view_info .info_left {
    display: none;
}
.view_info .info_below {
    display: inline;
}

#osd_sidebar .slider_container {
    margin-top: 25px;
    position: relative;
}

#osd_sidebar .sidebar_content {
    overflow: auto;
}

#osd_sidebar .view_info {
    overflow: unset;
}

.to_truncate {
    display: none;
}

.design_buttons,
.paintings_buttons,
.unidentified_buttons {
    display: flex;
    flex-direction: column;
}

button.menubar_option:not(:first-of-type) {
    padding-left: 0;
}

.unidentified .menu_row {
    justify-content: unset;
}

#osd_PAFA .popup.simple {
    grid-template-columns: 1fr 60px;
}

.popup button {
    right: 25px;
}

.text_wrap {
    height: 100%;
}

#osd_PAFA .modal_text {
    font-size: 14px;
}

#osd_design_four {
    margin: 0;
}

#osd_PAFA.sidebar .popup,
#osd_PAFA.sidebar.fullpage .popup {
    max-height: calc(100% - 25px);
}

#osd_PAFA.fullpage .popup .text,
#osd_PAFA.fullpage .popup .modal_text {
    font-size: 14px;
}

/*fullpage --------------------------------*/

#osd_PAFA.fullpage .openseadragon-container {
    max-height: calc(100vh) !important;
}

#osd_PAFA.fullpage.reconstruction .openseadragon-container {
/*    max-height: calc(50vh) !important;*/
    max-height: calc(50%) !important;  /* iPad mini Safari */
}

#osd_PAFA.fullpage #osd_reconstruction {
/*    height: calc(50vh);*/
    height: calc(50%) !important;  /* iPad mini Safari */
}

#osd_PAFA.fullpage .menubar.fullpage {
    display: none;
}

#pafa_toolbar.fullpage {
    border-top: none;
    top: 0;
}

#osd_PAFA.fullpage #osd_sidebar {
    height: 100%;
    max-height: 100%;
}
}

@media screen and (max-width:900px) {
#osd-wrap {
    margin-left: 0;
    width: 100%;
}
}

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

.sidebar.menu_list {
    margin-left: 25px;
}

#osd_PAFA .popup {
    margin: 0;
    padding: 0;
    width: 100%;
}

#osd_PAFA.sidebar .popup {
    height: calc(100% - 200px);
    width: 100%;
}

#osd_PAFA.sidebar.fullpage .popup {
    height: calc(100% - 200px);
    transition: 0.5s;
    width: 100%;
}

#osd_sidebar {
    background-color: #fff;
    height: 200px;
    position: absolute;
    right: 0;
    bottom:0;
    transition: 0.5s;
    top: unset;
    width: 100%;
    z-index: 100;
}
#osd_PAFA.fullpage #osd_sidebar {
    height: 300px;
    width: 100%;
}
#osd_sidebar.change_width,
#osd_PAFA.fullpage #osd_sidebar.change_width  {
    height: 10px;
    width: 100%;
}

#osd_sidebar .toggle {
    background-color: #fff;
    box-shadow: 0 -2px 5px 2px rgba(102,51,0,0.25);
    color: #663300;
    display: none;
    font-size: 25px;
    height: 35px;
    left: 50%;
    padding-left: 5px;
    position: absolute;
    top: -35px;
    width: 25px;
}

#osd_sidebar .toggle span {
    display: inline-block;
    transform: rotate(90deg);
}

#osd_sidebar .toggle::after {
    background-color: #fff;
    bottom: -10px;
    content: '';
    display: block;
    height: 10px;
    pointer-events: none;
    position: absolute;
    right: 0;
    top: unset;
    width: 25px;
}
}
