@font-face {
    font-family: Rubik;
    src: url(../fonts/Rubik-Light.ttf);
}

@font-face {
    font-family: Rubik-Bold;
    src: url(../fonts/Rubik-SemiBold.ttf);
}

::-moz-selection { /* Code for Firefox */
    color: #ffffff;
    background: var(--navbar-color-orange);
}
  
  ::selection {
    color: #ffffff;
    background: var(--navbar-color-orange);
}

h1 {
    font-family: var(--text-font);
    color: var(--text-color);
    font-size: 40px;
}

p {
    font-family: var(--text-font);
    color: var(--text-color);
    text-align: justify;
    font-size: 25px;
}

a {
    height: 0;
}

body {
    background-color: var(--navbar-color-yellow);
}

.orange-lines {
    background-color: var(--navbar-color-orange);
    width: 100%;
    height: 40px;
}

.navbar-and-content {
    display: flex;
}

.navbar-and-content .content {
    width: calc(100% - 20%);
}

.navbar-and-content .content .permanent {
    display: grid;
    padding: 40px 5%;
}

.content {
    width: 100%;
    justify-content: center;
    /*padding: 40px 0;*/
}

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

#book-viewport {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    user-select: none;
    touch-action: none;
}

#drag-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    display: none;
    cursor: grab;
}

#drag-overlay:active {
    cursor: grabbing;
}

#book-wrapper {
    width: 80%;
    height: 80%;
    transform-origin: center center;
    will-change: transform;
}

.zoom-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 8px;
}

.zoom-controls button, .zoom-controls label {
    padding: 8px 14px;
    font-size: 16px;
    cursor: pointer;
    font-family: var(--text-font-bold);
    color: var(--text-color);
    background-color: var(--navbar-color-yellow);
    border: 2px solid var(--navbar-color-orange);
    font-wheight: bold;
}

.zoom-controls label {
    cursor: unset !important;
}
    
#book {
    width: 100%;
    height: 100%;
}

.page {
    background-color: #ffffff;
    overflow: hidden;
}

.stf__item {
    transform-style: unset !important;
}

.page.--left:not(.cover-page)::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 30px;
    height: 100%;
    background: linear-gradient(to left, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0));
    pointer-events: none;
}

.page.--right:not(.cover-page)::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 30px;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0));
    pointer-events: none;
    
}

.page.--left .page-img {
    border-style: solid;
    border-image-slice: 1;
    border-image-source: linear-gradient(to right, var(--navbar-color-yellow), #00000000);
    border-width: 2px 0 2px 2px;
}

.page.--right .page-img {
    border-style: solid;
    border-image-slice: 1;
    border-image-source: linear-gradient(to left, var(--navbar-color-yellow), #00000000);
    border-width: 2px 2px 2px 0;
}
    
.page-img {
    width: calc(100% - 1px);
    height: calc(100% - 3px);
    object-fit: contain;
    display: block;
}

.cover-page {
    width: calc(100% - 1px);
    height: calc(100% - 1px);
    border: 1px solid var(--navbar-color-yellow);
    background-color: var(--navbar-color-yellow);
}

@media only screen and (max-width: 800px) {
    
    .navbar-and-content {
        display: grid;
    }
    
    .title {
        text-align: center !important;
    }

    .navbar-and-content .content {
        width: 100%;
        height: 100%;
        padding: 0;
        margin: 0;
    }
    
    #book-viewport {
        margin-top: 2.5%;
    }
    
    .zoom-controls {
        position: static;
        display: flex;
        gap: 0;
        justify-content: space-between;
        margin-top: 5%;
    }

    #orange1 {
        display: none;
    }
}