@media screen and (orientation : portrait) {
    .orientation {
        display: flex;
        flex-flow: column wrap;
        justify-content: center;
        align-items: center;
        gap: 2rem;
    }
    #presentation,
    #translation,
    #viewer,
    #navigatorContainer,
    .loader,
    aside {
        display: none !important;
    }
}

@media screen and (orientation : landscape) {
    .orientation {
        display: none;
    }
}

h1.ar,
.changeLang.ar,
h2.ar,
label.ar,
option.ar,
span.ar,
p.ar,
.caption.ar,
td.ar,
li.ar,
.translation.ar,
.translationMenu.ar select {
    direction: rtl !important;
}

header.ar,
.changeLang.ar,
.location.ar,
.swiper-slide.ar,
.translationMenu.ar,
.summary.ar {
    flex-direction: row-reverse !important;
}

.location.ar,
.sidebarRight li.ar {
    display: flex !important;
}

.location.ar {
    flex-flow: row-reverse !important;
}

.acknowledgements h2.ar,
.acknowledgements ul.ar {
    margin: auto !important;
    margin-right: 0 !important;
}

.acknowledgements ul.ar {
    padding-right: 40px !important;
}

body.ar {
    grid-auto-columns: 2fr 3fr 3fr !important;
}

.sidebarLeft.ar {
    grid-area: sidebarRight !important;
    flex-flow: row wrap !important;
    transform: translateX(calc(var(--contentWidth))) !important;
}

.sidebarRight.ar {
    grid-area: sidebarLeft !important;
    flex-flow: row-reverse wrap !important;
    transform: translateX(calc(var(--contentWidth) * -1)) !important;
}

.copyValidation.ar {
    right: 0 !important;
    left: 100% !important;
    margin-right: 0 !important;
    margin-left: 1rem !important;
}

.sidebarLeft.ar.clicked, .sidebarRight.ar.clicked {
    transform: translateX(0vw) !important;
}

#presentation.ar {
    right: -100% !important;
    left: unset !important;
}

#presentation.show.ar {
    right: calc(100vw - calc(100vw * 5.75 / 8)) !important;
    left: unset !important;
    direction: rtl !important;
}

/* LOADER */
/* For this loader, see https://loading.io/css/ (.lds-dual-ring) */
.loader {
    display: inline-block;
    width: 4rem;
    height: 4rem;
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
}

.loader:after {
    content: " ";
    display: block;
    width: 4rem;
    height: 4rem;
    margin: 0;
    border-radius: 50%;
    border: 1rem solid #fff;
    border-color: #fff transparent #fff transparent;
    animation: loader 1.2s linear infinite;
}

@keyframes loader {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ORIENTATION */
.orientation {
    height: 100%;
    width: 100%;
}

.orientation img {
    width: 40%;
    height: auto;
    animation: rotation 1.5s infinite linear;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    } 
    75% {
        transform: rotate(90deg);
    }
    100% {
        transform: rotate(90deg);
    }
}

.orientation div {
    width: 60%;
    font-size: 2rem;
    text-align: center;
}

@font-face {
    font-family: NotoSansDisplay-Regular;
    src: url(../fonts/Noto_Sans_Display/static/NotoSansDisplay/NotoSansDisplay-Regular.ttf);
}

.offline {
    width: 100%;
    display: flex;
    flex-flow: column;
    align-items: center;
    justify-content: center;
}

.offline h2 {
    font-size: 3rem;
    font-weight: bold;
}

.offline p,
.offline a {
    font-size: 1.5rem;
}

/* GLOBAL */
* {
    font-size: 1.1vmax;
    font-family: NotoSansDisplay-Regular, sans-serif;
}

*:not(a) {
    color: rgba(255, 255, 255, 1);
}


.bi {
    font-size: 3rem;
}

html,
body {
    overflow-x: hidden;
    overflow-y: auto;
}

body {
    min-height: 100vh;
    max-height: 100vh;
    min-width: 100vw;
    max-width: 100vw;
    margin: 0;
    display: grid;
    grid-auto-columns: 3fr 3fr 2fr;
    grid-template-rows: 1fr 8fr;
    grid-template-areas: 
    "header header header"
 "sidebarLeft main sidebarRight";
    background: linear-gradient(180deg, rgba(82, 116, 114, 0.8) 0%, rgba(90, 124, 122, 0.8) 50%, rgba(98, 132, 130, 0.8) 100%);
}

button:not(.changeLang) {
    text-shadow: 0.15rem 0.15rem 0.3rem rgba(0, 0, 0, 1);
}

button,
input,
label,
#navigator,
#viewer {
    cursor: pointer;
}

/* HEADER */
header {
    grid-area: header;
    border-bottom: 0.1rem solid rgba(0, 0, 0, 0.125);
    box-shadow: 0rem 0.2rem 0.2rem rgba(0, 0, 0, 0.7);
    background: linear-gradient(180deg, rgba(82, 116, 114, 1) 0%, rgba(90, 124, 122, 1) 50%, rgba(98, 132, 130, 1) 100%);
    z-index: 3;
    padding: 0 3rem 0 3rem;
    display: flex;
    flex-flow: row wrap;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 2rem;
    font-weight: bold;
    text-shadow: 0.3rem 0.3rem 0.6rem rgba(0, 0, 0, 1);
    max-width: 80%;
}

header h1 a {
    font-size: inherit;
    color: inherit;
    text-decoration: none;
}

.dropdown {
    position: relative;
}

.languageButton {
    border: none;
    background-color: transparent;
}

.languageButton .bi {
    font-size: 1rem;
}

.languageIcon {
    max-width: 3rem;
    height: auto;
    /*border-radius: 100%;*/
    vertical-align: middle;
    filter: drop-shadow(0.2rem 0.2rem 0.4rem rgba(0, 0, 0, 0.4));
}

.dropdownContent {
    display: none;
    position: absolute;
    right: 0;
    z-index: 9999;
    padding: 0.5rem 0 0.5rem 0;
    border-radius: 5%;
    list-style: none;
    background-color: rgba(250, 250, 250, 1);
}

.dropdownContent * {
    color: rgba(0, 0, 0, 1) !important;
}


.dropdownItem:hover {
    background-color: rgba(130, 130, 130, 0.8);
}

.dropdownContent button {
    width: 100%;
    display: flex;
    flex-flow: row;
    align-items: center;
    padding: 0.5rem;
    border: none;
    background-color: transparent;
}

.dropdownContent img {
    max-width: 1rem;
    padding-right: 1rem;
}

/* MAIN */
main {
    grid-area: main;
    grid-column: sidebarLeft-start/sidebarRight-end;
    display: flex;
    flex-flow: row wrap;
    position: relative;
}

/* VIEWER */
#viewer {
    height: 90%;
    width: 100%;
}

/* Zone */
.annotation {
    stroke-width: 20;
}

.annotation:hover polygon {
    stroke-width: 40;
}

.annotation.zone_verse polygon {
    stroke: rgba(255, 0, 0, 0);
    fill: rgba(255, 0, 0, 0);
}

.active_zone_verse polygon {
    stroke: rgba(255, 0, 0, 1) !important;
    fill: rgba(255, 0, 0, 0) !important;
}

.annotation.zone_polyptoton,
.annotation.zone_jointright,
.annotation.zone_jointleft,
.annotation.zone_rubric,
.annotation.zone_palimpsest {
    display: none;
}

.annotation.zone_polyptoton,
.annotation.zone_jointright,
.annotation.zone_jointleft,
.annotation.zone_rubric,
.annotation.zone_palimpsest polygon {
    pointer-events: none;
}

.zone_polyptoton polygon {
    stroke: rgba(0, 0, 255, 1);
    fill: rgb(0, 0, 255, 0.2);
}

#checkbox_polyptoton.activeCheckbox + label {
    color: rgb(0, 0, 255, 1);
}

label i {
    color: inherit;
}

.zone_jointright polygon {
    stroke: rgba(255, 255, 0, 1);
    fill: rgba(255, 255, 0, 0.2);
}

#checkbox_jointright.activeCheckbox + label {
    color: rgba(255, 255, 0, 1) !important;
}

.zone_jointleft polygon {
    stroke: rgba(255, 105, 14, 1);
    fill: rgba(255, 105, 14, 0.2);
}

#checkbox_jointleft.activeCheckbox + label {
    color: rgba(255, 105, 14, 1) !important;
}

.zone_rubric polygon {
    stroke: rgba(255, 0, 0, 1) !important;
    fill: rgba(255, 0, 0, 0.2);
}

#checkbox_rubric.activeCheckbox + label {
    color: rgba(255, 0, 0, 1) !important;
}

.zone_palimpsest polygon {
    stroke: rgba(108, 117, 125, 1);
    fill: rgba(108, 117, 125, 0);
}

.zone_correction polygon {
    stroke: rgba(220, 53, 69, 1);
    fill: rgba(220, 53, 69, 0.3);
}

/* NAVIGATOR */
#navigatorContainer {
    height: 8%;
    width: 100%;
}

#navigator {
    width: 100%;
    height: 100%;
}

/* TRANSLATION */
.toggleTransliteration {
    display: none;
}

.toggleHieroglyph {
    display: none;
}

#translation {
    display: none;
    height: 40%;
    width: 65%;
    position: absolute;
    top: 70%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    margin: 1rem auto;
    border: 0.15rem solid rgba(0, 0, 0, 0.4);
    border-radius: 0.3rem;
    background-color: rgba(255, 255, 255, 0.6);
    cursor: grab;
}

#translation * {
    color: rgba(0, 0, 0, 1) !important;
}

.translationMenu {
    height: 10%;
    width: auto;
    padding: 0 1rem 0 1rem;
    display: flex;
    flex-flow: row;
    justify-content: space-between;
    align-items: center;
}

.summary {
    max-width: 80%;
    display: flex;
    flex-flow: row;
    justify-content: space-between;
    gap: 1rem;
}

.summary select {
    cursor: pointer;
}

.location {
    max-width: 20%;
    font-weight: bold;
}

.swiper {
    width: 100%;
    height: 90%;
}

.swiper-wrapper {
    width: 100%;
    height: 100%;
}

.swiper-slide {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    align-content: center;
}

.swiper-slide > div {
    padding: 0.5rem;
    text-align: center;
}

.hieroglyphs {
    display: none;
    width: 50%;
}


.edition {
    display: flex;
    flex-flow: column;
    gap: 0.5rem;
    width: 100%;
}

.transliteration {
    font-style: italic;
    display: none;
}

.editorialMarks {
    font-style: normal;
}

.swiper-slide img {
    max-width: 100%;
    transform: scaleX(-1);
}

.swiper-slide-active {
    height: 50% !important;
    border-top: 0.15rem solid rgba(187, 189, 191, 1);
    border-bottom: 0.15rem solid rgba(187, 189, 191, 1);
    background-color: rgba(255, 255, 255, 0.6);
}

.preceding,
.following {
    height: 25% !important;
    opacity: 0.6;
}

/* SIDEBARS */
.sidebar {
    display: flex;
    transition: transform 0.5s;
    z-index: 2;
    overflow: hidden;
    pointer-events: none;
}

.sidebar input,
.sidebar button,
.sidebar a,
.sidebar label,
.sidebarContainer {
    pointer-events: all;
}

.sidebarContainer {
    height: 100%;
    width: 75%;
    overflow-y: auto;
    background: linear-gradient(180deg, rgba(82, 116, 114, 0.9) 0%, rgba(90, 124, 122, 0.9) 50%, rgba(98, 132, 130, 0.9) 100%);
}

.sidebarIcons {
    width: 25%;
    display: flex;
    flex-flow: column;
    align-items: center;
    gap: 1rem;
    pointer-events: none;
}

.sidebarRight .sidebarIcons {
    justify-content: space-between;
}

.sidebarIcons button {
    width: 90%;
    border: none;
    font-weight: bold;
    background-color: transparent;
    filter: drop-shadow(0.2rem 0.2rem 0.4rem rgba(0, 0, 0, 0.4));
}

.clicked {
    transform: translateX(0vw) !important;
}

.sidebarRight {
    flex-flow: row wrap;
    --width: calc(100vw* 2 / 8);
    --contentWidth: calc(var(--width)* 3 / 4);
    grid-area: sidebarRight;
    transform: translateX(var(--contentWidth));
    font-weight: bold;
    overflow: visible;
}

.sidebarLeft {
    flex-flow: row-reverse wrap;
    --width: calc(100vw* 3 / 8);
    --contentWidth: calc(var(--width)* 3 / 4);
    grid-area: sidebarLeft;
    transform: translateX(calc(var(--contentWidth)* -1));
    overflow-y: auto;
}

/* Right sidebar content */
.sidebarRight .sidebarContent {
    margin: 1rem 0.5rem;
}

.sidebarRight ul {
    list-style: none;
    padding: 0;
}

.sidebarRight li {
    width: 100%;
    height: auto;
    margin: 1rem 0;
    display: flex;
    flex-flow: row;
    align-items: center;
    gap: 0.5rem;
}

.sidebarRight input {
    height: 1.5rem;
    width: 1.5rem;
    margin: 0;
}

.links {
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 5rem;
}

.linkDOI {
    position: relative;
}

.logoGitLab, .logoDOI {
    width: 100%;
    height: auto;
    max-width: 3rem;
}

.copyValidation {
    display: none;
    position: absolute;
    top: 0;
    right: 100%;
    margin-right: 1rem;
    width: fit-content;
    min-width: 8rem;
    text-align: right;
}

.logoGitLab:hover, .logoDOI:hover {
    cursor: pointer;
}

/* Left sidebar content */
.sidebarLeft .sidebarContent {
    height: 100%;
}

.restartAudioButton,
.hideTranslationButton,
.hideTransliterationButton,
.hideHieroglyphButton {
    display: none;
}

.presentationButtons {
    width: 100%;
    height: calc(100%/11);
    padding: 0.5rem;
    display: flex;
    flex-flow: row nowrap;
    justify-content: flex-start;
    align-items: center;
    gap: 2rem;
    font-weight: bold;
    background: rgba(98, 132, 130, 0.7);
    border: 0.05rem solid rgba(0, 0, 0, 0.4);
}

.presentationButtons:hover {
    background: rgba(80, 121, 119, 1);
}

.presentationButtons.selected {
    background: rgba(80, 121, 119, 1);
}

.presentationButtons span {
    margin-top: auto;
    margin-bottom: auto;
    text-align: start;
}

.presentationButtonsImg {
    border-radius: 100%;
    height: 100%;
    width: auto;
    display: block;
}

/* PRESENTATION */
#presentation {
    left: -100%;
    position: absolute;
    width: calc(100vw* 5.75 / 8);
    height: 100%;
    z-index: 1;
    background: linear-gradient(180deg, rgba(82, 116, 114, 0.9) 0%, rgba(90, 124, 122, 0.9) 50%, rgba(98, 132, 130, 0.9) 100%);
    transition: all 1s ease;
    text-align: justify;
    overflow-y: auto;
}

#presentation.show {
    left: calc(100vw - calc(100vw * 5.75 / 8));
    transition: all 1s ease;
}

.presentationContainer {
    padding: 1.5rem;
}

.presentationPart {
    max-height: 100%;
    width: 100%;
    display: none;
}

.presentationHead {
    display: flex;
    flex-flow: row;
    justify-content: center;
}

.presentationHead h2 {
    width: 95%;
    font-size: 2rem;
}

.closePresentation {
    width: 5%;
    font-size: 2rem;
    background-color: transparent;
    border: none;
}

.presentationBody {
    height: 100%;
    display: flex;
    flex-flow: column;
    gap: 1rem;
}

.presentationBody p {
    width: 100%;
    font-size: 1rem;
    margin: 0;
}

.presentationBody figure,
.presentationBody iframe,
.presentationBody video,
.presentationBody ul,
.presentationBody h2 {
    max-width: 60%;
    margin: 0 auto;
}

.presentationBody figure,
.presentationBody iframe,
.presentationBody video {
    margin: 0 auto;
}

.presentationBody figure {
    display: flex;
    flex-flow: column;
    align-items: center;
    gap: 1rem;
}

.presentationBody figure a {
    max-width: 80%;
}

.copyright {
    align-self: center;
    direction: ltr;
}

.presentationBody img {
    width: 100%;
    height: auto;
}

.hieroglyphInLine {
    height: 3rem !important;
    width: auto !important;
}

figcaption {
    text-align: center;
    display: flex;
    flex-flow: column;
    gap: 0.5rem;
}

table {
    max-width: 60%;
    margin: 0 auto;
    text-align: center;
}

.partSix table {
    border: 0.1rem solid rgba(0, 0, 0, 0.2);
    border-collapse: collapse;
}

.partSix td {
    width: calc(100%/3);
    padding: 0.2rem;
    border: 0.1rem solid rgba(0, 0, 0, 0.2);
}

.partNine figure:nth-of-type(2) {
    display: none;
}

.partTen table {
    border: 0;
}

.partTen td {
    width: 100%;
    padding: 0.2rem;
    border: 0;
}

.acknowledgements h2,
.acknowledgements ul {
    margin: 0;
}

.acknowledgements ul:last-of-type {
    max-width: 100%;
}

.projectContact {
    display: flex;
    flex-flow: column;
    gap: 1rem
}

.projectCopyright {
    max-width: 100%;
    display: flex;
    flex-flow: row wrap;
    gap: 1rem;
    justify-content: center;
    text-align: center;
}

.projectCopyright img {
    max-width: 100%;
}

.logoPartners,
.logoWebHosting {
    max-width: 100%;
    display: flex;
    flex-flow: row wrap;
    gap: 25%;
    align-items: center;
    justify-content: center;
}

.logoPartners img,
.logoWebHosting img{
    max-width: 20%;
    height: auto;
}

hr {
    margin: 1rem 0;
    color: inherit;
    border: 0;
    border-top: 1px solid;
    opacity: .25;
}

.version {
    width: 100%;
    display: flex;
    flex-flow: column;
    align-items: center;
    gap: 1rem;
}

.introjs-tooltip {
    max-width: 400px;
    text-align: justify;
}

.introjs-tooltip *:not(a) {
    color: rgba(0, 0, 0, 1);
}

.result {
    width: 100%;
    height: fit-content;
    padding: 2rem;
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
}

.resultVerse {
    width: 80%;
    padding: 2rem;
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
}

.resultEdition {
    font-style: italic;
}

.resultId,
.resultImage,
.resultmdc,
.resultTranslation,
.resultEdition,
.resultTranslation {
    width: 100%;
    height: fit-content;
    display: block;
    text-align: center;
}

#helpButton {
    position: absolute;
    right: 2rem;
    top: 2rem;
}

.helpButton {
    border: unset;
    background-color: unset;
}

.modal {
    display: none;
    height: 100%;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
    background-color: rgba(0, 0, 0, 0.5);
}

.modalContent {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50%;
    max-height: 60%;
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.8);
    border: 0.15rem solid rgba(0, 0, 0, 0.4);
    border-radius: 1rem;
    z-index: 999;
    overflow: scroll;
}

.modalHeader {
    width: 100%;
    display: flex;
    flex-flow: row;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 1);
    border-radius: 1rem 1rem 0 0;
    box-shadow: 0rem 0.2rem 0.2rem rgba(0, 0, 0, 0.7);
}

.closeModal {
    border: unset;
    background-color: unset;
}

.closeModal i {
    font-size: 2.5rem;
}

.modal h2,
.modal h3,
.modal i,
.modal div,
.modal li,
.modal p {
    color: rgba(0, 0, 0, 1);
}

.modalBody {
    width: 90%;
}

.modalPart {
    width: 100%;
    padding: 0.25rem;
}

.modal h3 {
    text-align: center;
}