/* COLOR SCHEME */
:root {
  color-scheme: light only;
}

/* HTML */
html {
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

/* FONT */
@font-face {
    font-display: block;
    font-family: 'Roboto Mono';
    src: url('/res/graphics/roboto_mono.ttf') format('truetype');
}

/* BODY */
body {
    align-items: center; 
    background-color: rgb(0, 0, 0);
    display: flex;
    flex-direction: column;
    margin: 0;
    min-height: 100vh;
}

/* IMAGE */
.img {
    display: block;
    width: 300px;
}

/* HEADING */
.heading {
    color: white;
    cursor: pointer;
    font-family: "Roboto Mono";
    font-size: 27px;
    height: 45px;
    line-height: 43px;
    text-align: center;
    width: 300px;
}

.heading:hover {
    background-color: white;
    color: black;
}

/* LINK */
a {
    text-decoration: none;
}

/* IMAGE GALLERY THUMBNAIL */
.gallery_thumb {
    cursor: pointer;
    height: 223px;
    position: relative;
    width: 300px;
}

.gallery_thumb .state {
    height: 100%;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    width: 100%;
}

.gallery_thumb .default {
    opacity: 1;
}

.gallery_thumb:hover .default {
    opacity: 0;
}

.gallery_thumb:hover .hover {
    opacity: 1;
}

.gallery_thumb:active .hover {
    opacity: 0;
}

.gallery_thumb:active .active {
    opacity: 1;
}

/* IMAGE GALLERY */
#gallery_background {
    background-color: rgba(0, 0, 0, 0.9);
    display: none;
    height: 100vh;
    left: 0;
    position: fixed;
    top: 0;
    width: 100%;
    width: 100vw;
    z-index: 100;
}

#gallery_frame {
    align-items: center;
    aspect-ratio: 16 / 9;
    background: rgb(0, 0, 0);
    box-sizing: border-box;
    display: none;
    justify-content: space-between;
    left: 50%;
    max-height: 100vh;
    min-width: 300px;
    position: fixed;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(100vw, calc(100vh * 16 / 9));
    z-index: 200;
}

#gallery_exit {
    color: white;
    cursor: pointer;
    left: 50%;
    position: absolute;
    top: 3%;
    transform: translateX(-50%);
    z-index: 300;
}

#gallery_prev {
    color: white;
    cursor: pointer;
    left: 1%;
    margin-left: auto;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 300;
}

#gallery_next {
    color: white;
    cursor: pointer;
    margin-right: auto;
    position: absolute;
    right: 1%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 300;
}

#gallery_exit img,
#gallery_prev img, 
#gallery_next img {
    display: block;
    filter: drop-shadow(0px 2px 5px rgba(0, 0, 0, 0.39)) opacity(60%);
    height: auto;
    max-width: 80px;
    min-width: 30px;
    width: 5vw;
}

#gallery_exit:hover img,
#gallery_prev:hover img, 
#gallery_next:hover img {
    filter: drop-shadow(0px 2px 5px rgba(0, 0, 0, 0.39)) opacity(60%) brightness(91%);
}

#gallery_exit:active img,
#gallery_prev:active img, 
#gallery_next:active img {
    filter: drop-shadow(0px 2px 5px rgba(0, 0, 0, 0.39)) opacity(60%) brightness(97%);
}

#gallery_progress {
    bottom: 3%;
    color: white;
    filter: opacity(60%);
    font-family: 'Roboto Mono';
    font-size: clamp(12px, 2.5vw, 50px);
    left: 50%;
    position: absolute;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.39);
    transform: translateX(-50%);
    user-select: none;
    white-space: nowrap;
    z-index: 300;
}

#gallery_img {
    display: block;
    height: 100%;
    min-height: calc(300px * 9 / 16);
    min-width: 300px;
    object-fit: contain;
    width: 100%;
}

/* TEXT */
.text {
    color: white;
    font-family: 'Roboto Mono';
    font-size: 16px;
    line-height: 1.6;
    text-align: center;
    width: 300px;
}

/* DOWNLOAD BUTTON */
.download {
    cursor: pointer;
    display: block;
    height: 26px;
    position: relative;
    width: 300px;
}

.download .state {
    display: block;
    height: 100%;
    left: 0;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    top: 0;
    width: 100%;
}

.download .default { opacity: 1; }
.download:hover .default { opacity: 0; }
.download:hover .hover   { opacity: 1; }
.download:active .hover  { opacity: 0; }
.download:active .active { opacity: 1; }

.download_title {
    align-items: center;
    color: rgb(0, 0, 0);
    display: flex;
    font-family: 'Roboto Mono';
    font-size: 13px;
    font-weight: 600;
    height: 100%;
    justify-content: center;
    left: 0;
    pointer-events: none;
    position: absolute;
    text-decoration: underline;
    top: 0;
    user-select: none;
    width: 100%;
}

/* SMALL TEXT */
.text_small {
    color: white;
    font-family: 'Roboto Mono';
    font-size: 13px;
    line-height: 2;
    text-align: center;
    width: 295px; /* setting to 295px instead of 300px somehow fixes a visual enlargement bug that occurs sometimes */
}
