@font-face {
  font-family: 'BadComic';
  src: url('/static/gallery/BadComic.ttf');
}


#header {
  display: flex;
  z-index: 3;
  position: sticky;
  top: 10px;
  background-color: rgba(226, 198, 198, 0.6); /* temp for debugging */
  backdrop-filter: blur(3px);
  height: 3em;
  margin-left: auto;
  border-radius: 10px;
}

.icon_button {
  margin: auto;
  margin-left: 5px;
}
#profile-link {
  margin-right: 5px;
  margin-left: 10px;
}
#login-link {
  margin-right: 15px;
  margin-left: 20px;
}

.search_button {
  background-color: transparent;
  border: none;
  cursor: pointer;
  position: relative;
  right: 45px;
  top: 2px;

}
.search_filler {
  height: 100%;
  width: 10%;
  position: absolute;
  left: -10px;
  background-color: #FFF8F0;
  border-radius: 10px;
}

#focus_add_tag {
  left: 5.5%;
  margin-top: 1em;
}


#focus_add_tag > .popup_text_box {
  left: 12px;
}

.tag_text > p {
  left: -0.5em;
  position: relative;
  bottom: 0.5em;
  color: #e2c6c6;
}

label, input, p, div, label, .tag, .page_button {
  font-family: "BadComic", sans-serif;
  font-optical-sizing: auto;
  font-weight: 600;
  font-style: normal;
  overflow-wrap: break-word;
  text-decoration: none;
}
input {
  font-weight: 500 !important;
}
div {
  color: #3B1E0D;
}

a:focus {
  /* Provide a fallback style for browsers
 that don't support :focus-visible */
  outline: none;
  background: lightgrey;
}

a:focus:not(:focus-visible) {
  /* Remove the focus indicator on mouse-focus for browsers
 that do support :focus-visible */
  background: transparent;
}

a:focus-visible {
  /* Draw a very noticeable focus style for
 keyboard-focus on browsers that do support
 :focus-visible */
  outline: 2px solid red;
  background: transparent;
}




a {color: #3B1E0D}
a:visited {text-decoration: none; color:#3B1E0D}
a:hover {text-decoration: none; color:#3B1E0D}
a:focus {text-decoration: none; color:#3B1E0D}
a:hover, a:active {text-decoration: none; color:#3B1E0D}


.N {
  /* nothing */
}
.R {
  color: tomato !important;
}
.G {
  color: #1cc533 !important;
}
.P {
  color: mediumpurple !important;
}


body {
  display: flex;
  justify-content: center;
  flex-direction: column;
  background-image: url('/static/gallery/images/bg.webp');  
  background-color: #B4DACC;
}

#tag_add_fix {
  top: 8px;
  right: 50px;
}

.container {
  display: flex;
}

.imagecontainer {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.tag-con {
  flex-grow: 1;
  z-index: 0;
  /* experimental, looks neat? */
  /*transform: rotate(1deg);*/
  animation: rotate 1s ease-out;
  animation-play-state: paused;
  animation-delay: calc(var(--scroll) * -1s);
  animation-iteration-count: 1;
  animation-fill-mode: both;

  font-size: 1.5em;
}

.tags {
  position: sticky;
  top: 7vh;
  z-index: 0;
}
.tags.hide_scrollbar {
  overflow-y: inherit;
}

#tag_page_container {
  columns: 5 200px;
  column-gap: 0.5rem;
  margin: 0 auto;
  min-width: 80%;
  max-width: 95%;
}

.custom_file_upload {
  display: inline-block;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 10px;
  background-color:#fff8f1;
  margin: 1em;
}

.file_submit {
  border: 0;
  background-color: unset;
  cursor: pointer;
}
#upload_content {
  display: flex;
  flex-direction: column;
  align-items: center;
}
#upload_gallery {
  float: unset;
}

.gallery {
  /* to make it right aligned or whatever... */
  float: right;
  margin-top: 0.5em !important;
  width: 70%;
  columns: 5 200px;
  column-gap: 0.5rem;
  margin: 0 auto;
  min-height: calc(100vh - 10em);
  div {
    width: 150px;
    margin: 0 0.5rem 0.5rem 0;
    display: inline-block;
    width: 95%;
    border: solid #FFF8F0;
    border-width: 5px 5px 20px 5px;
    padding: 0px;
    box-shadow: 1px 5px 5px rgba(16, 3, 48, 0.2);
    /* border-radius: 5px; */
    transition: all .25s ease-out;
    &:hover {
      border-color: coral;
    }

    img {
      width: 100%;
      /* border-radius: 4px; */
      transition: all .25s ease-in-out;
      display: block;
    }
  }
  .video {
    /*
    border-image-source: url('/static/gallery/images/tape.svg');
    border-image-repeat: repeat;
    border-image-slice: 3;
    */
    
    border-width: 15px 5px 15px 5px;
    position:relative;
    border-color: #3B1E0D;
    /*
    border: solid rgb(50, 42, 45);
    border-width: 15px 5px 15px 5px;
    */

    &:hover {
      border-color: rgb(255, 80, 162);
    }
  }

}

.page_button {
  text-decoration: none;
  display: inline-block;
  vertical-align: top;
  color: rgb(50, 42, 45);
  padding-left: 5px;
  padding-right: 5px;


  transition: all .25s ease-out;
  &:hover {
    color: coral;
  }
}

.page_count {
  vertical-align: middle;
  padding: 8px 8px;
}

#first_page #last_page {
  color: rgb(89, 0, 255);
  &:hover {
    color: rgb(255, 80, 162);
  }
}

.paginator {
  max-width: fit-content;
  margin-inline: auto;  
  display: flex;
  flex-direction: row;
  align-items: center;

}

a.deactivated {
  pointer-events: none;
  color: grey !important;
}



#media {
  display: flex;
}



/* Mobile Landscape Size to Tablet Portrait (devices and browsers) */
@media only screen and (min-width: 480px) and (max-width: 767px) {

  .tag-con {
    transform: none !important;
  }
  .gallery {
    width: 95% !important;
    columns: 2 100px;

  }
  #focus_info {
    margin-left: 5px;
  }
  .tags {
    top: 0;
    max-height: 100vh !important;
    overflow-y: scroll !important;
  }
  .tag_left_part {
    display: none;
  }
  .link__graphic {
    display: none;
  }
  

}

/* Mobile Portrait Size to Mobile Landscape Size (devices and browsers) */
@media only screen and (max-width: 479px) {

  #overlay_container {
    flex-direction: column !important;
    max-height: 100%;
    overflow-y: scroll !important;
    overflow-x: hidden;
  }
  #focus_image {
    height: auto !important;
    width: 100vw !important;
  }

  #focus_file {
    width: 100vw !important;
    height: auto !important;
  }

  #focus_info {
    max-height: unset !important;
  }

  #focus_tags {
    overflow-y: unset !important;
  }

  .tag-con {
    transform: none !important;
    display: none !important;
  }
  .gallery {
    width: 95% !important;
    columns: 2 100px;
  }
  .label {
    width:100%;
  }
  .popup_text_box {
    top: unset !important;
    bottom: 3.5em;
    flex-direction: column-reverse !important;
  }


  /* for the thing that isn't used really
    #media {
    flex-direction: column;
  }

  .image {
    width: 100%;
  }
  */

}


#overlay {
  position: fixed;
  display: none; /* hidden by default */
  width: 100%;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}



#overlay_container {
  display:flex;
  flex-direction: row;
  align-items: flex-end; /*make it flex-start*/
  overflow-y: hidden;
}
#overlay_bg {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;

}

#focus_image {
  height: 85vh;
  width: 70vw;

  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-top: 4em;

}

#focus_file {
  height: 85vh;
  width: 70vw;
  object-fit: contain;
  animation-name: unhide;
  animation-duration: 0.3s;
  animation-timing-function: linear;
  z-index: 5;
  position: relative;

}

#focus_info {
  width: 15em;
  margin-top: 8vh;
  max-height: 70vh;
  z-index: 3;
  height: fit-content;
  animation-name: tween;
  animation-duration: 0.3s;
  animation-timing-function: ease-out;
  position:relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-self: center;
}

@keyframes tween {
  from {
    right: -100%;
    transform: rotate(3deg);
  }
  to {
    right: 0%;
    transform: rotate(0deg);
  }
}

.remove_scrolling {
  height: 100%;
  overflow-y: hidden !important;
}

.remove_horizontal_scrolling {
  overflow-x: hidden !important;
}

.hide_scrollbar {
  overflow-y: scroll;
  -ms-overflow-style: none;
}
.hide_scrollbar::-webkit-scrollbar {
  display: none;
}


.popup_text_box {
  display: none;
  position: absolute;
  flex-direction: column;
  right: 0;
  left: -12px;
  top: 3em;
  z-index: 10;
  cursor: pointer;

}


.textbox {
  border: none;
  margin: auto;
  padding: 16px 5px;
  background-color: #FFF8F0;
  border-radius: 15px;
  left: -1em;
  position: relative;
}


.searchbox_wrapper {
  display: flex;
  align-items: center;
  position: relative;
}

.box_container {
  min-height: 30px;
  height: fit-content;
  width: 163px;
  display: flex;
  margin-top: 5px;
  background-color: #fff8f1;
  transition: all 0.5s;
  position: relative;
  right: 0;
  justify-content: space-between;
  &:hover {
    right: -0.5em;
  }

}

.box_left {
  /* idk */
  padding-left: 5px;
  width: 80%;
  overflow-wrap: break-word;
}

.box_right {
  /* idk */
  position: absolute;
  right: 0;
  color: #e2c6c6;
}

.box_separator {
  flex-grow: 1;
  border-bottom: dotted 2px black;
}

#searchbox {
  z-index: -10;
}

.blur {
  animation-name: blur_anim;
  animation-duration: 0.5s;
  animation-timing-function: ease-in;
  animation-fill-mode: both;
}

.recolor {
  animation-name: color_anim;
  animation-duration: 0.5s;
  animation-timing-function: ease-in;
  animation-fill-mode: both;
}

@keyframes color_anim {
  from {
    background-color: rgba(255, 235, 207, 0);
  }
  to {
    background-color: rgba(64, 36, 35, 0.2);
  }

}


@keyframes blur_anim {
  from {
    filter: blur(0px);
    
  }
  to {
    filter: blur(5px); 
  }
}

@keyframes unblur_anim {
  from {
    filter: blur(5px);
    background-color: rgba(64, 36, 35, 0.2);
  }
  to {
    filter: blur(0px);
    background-color: rgba(255, 235, 207, 0)

  }
}

@keyframes uncolor_anim {
  from {
    background-color: rgba(64, 36, 35, 0.2);
  }
  to {
    background-color: rgba(255, 235, 207, 0);
  }
}


@keyframes unhide {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
@keyframes unhide_instant {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 0;
  }
  51% {
    opacity: 1;
  }
  100% {
    opacity: 1;
  }
}
@keyframes rotate {
  from {
    transform: rotate(1deg);
  }
  to {
    transform: rotate(0.1deg);
  }
}



.unblur {
  /**/
  animation-duration: 0.25s;
  animation-name: unblur_anim;
  animation-timing-function: ease-out;
  animation-fill-mode: both;
}
.unrecolor {
  animation-duration: 0.25s;
  animation-name: uncolor_anim;
  animation-timing-function: ease-out;
  animation-fill-mode: both;
}


.tag_paper {
  display: flex;
  height: 2em;
  margin-bottom: 3px;
  transition: all 0.5s;
  position: relative;
  right: 0;
  &:hover {
    right: -0.5em;
  }
}

#focus_tags {
  overflow-y: scroll;
  max-height: calc(85vh + 3px);
  overflow-x: hidden;
}

#focus_tags > .tag_paper {
  right: unset;
  left: 0.5em;

  &:hover {
    left: 0;
  }

}

.selected_tags {
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  padding-top: 10px;
}
.tag_paper.selected_tag {
  width: 70%;
  transition: none;
  position: inherit;
}
.selected_tag .tag_text {
  justify-content: center;
  align-items: center;
}


.hook {
  transform: rotate(90deg);
  height: 100%;
  position: relative;
  right: 5px;
}
.note {
  height: 100%;
  position: relative;
  right: -100%;
}

.tag {
  margin: auto;
  text-align: center;
  font-size: 0.8em;
  position: relative;
  min-width: 100px;
}
.tag_text {
  background-color: #fff8f1;
  border-radius: 10px;
  width: 100%;
  display: flex;
}
.tag_left_part {
  /* background color should depend on the type of tag */
  width: 40vw;
  position: absolute;
  background-color: #E2C6C6;
  left: -35vw;
  height: 2em;
  z-index: -10;
}
.tag_left_part.G {
  background-color: #C8F8DC;
}
.tag_left_part.R {
  background-color: #FFBBBB;
}
.tag_left_part.P {
  background-color: #F9D0F0;
}

/*plagiraism*/
.link__graphic--scribble {
  top: 100%;
}
.link__graphic {
  position: absolute;
  top: 90%;
  left: 0;
  pointer-events: none;
  fill: none;
  stroke: #e2c6c6;
  stroke-width: 1px;
  z-index: -2;
}

.link__graphic--scribble path {
  transition: stroke-dashoffset 0.6s cubic-bezier(0.7, 0, 0.3, 1);
}


.link__graphic--stroke path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.link:hover .link__graphic--stroke path {
  stroke-dashoffset: 0;
}
.link {
  z-index: 2;
}

#choice_holder {
  display: flex;
  justify-content: center;
}

.label {
  display: block;
  max-width: 100%;
  min-width: 15%;
}
.label > input {
  visibility: hidden;
  position: absolute;
}
.label > input + div {
  cursor: pointer;
  border: none;
  height: 5em;
  align-content: center;
  text-align: center;
  background-color: #fff8f1;
  border-radius: 10px;
  margin-left: 3px;
  margin-right: 3px;
}
.label > input:checked + .N {
  background-color: #e2c6c6;
}
.label > input:checked + .G {
  background-color: #c9f8dd;
}
.label > input:checked + .R {
  background-color: #febbbc;
}
.label > input:checked + .P {
  background-color: #f9d0ef;
}

/* upload stuff copied from codepen */
.file-area {
  width: 100%;
  position: relative;
  
  input[type=file] {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    cursor: pointer !important;
  }
  
  .file-dummy {
    padding: 30px;
    background: rgba(255,255,255,0.2);
    border: 2px dashed rgba(255,255,255,0.2);
    text-align: center;
    transition: background 0.3s ease-in-out;
    
    .success {
      display: none;
    }
  }
  
  &:hover .file-dummy {
    background: rgba(255,255,255,0.1);
  }
  
  input[type=file]:focus + .file-dummy {
    outline: 2px solid rgba(255,255,255,0.5);
    outline: -webkit-focus-ring-color auto 5px;
  }
  
  input[type=file]:valid + .file-dummy {
    border-color: rgba(120, 255, 57, 0.603);
    background-color: rgba(0,255,0,0.3);

    .success {
      display: inline-block;
    }
    .default {
      display: none;
    }
  }
}

#uploadform {
  display: flex;
  align-content: center;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  flex-direction: column;
  min-width: 20vw;
  padding-top: 10px;
}

.file_submit {
  height: 3em;
  width: 9em;
  background-color: #FFF8F0;
  border-radius: 15px;
}
.file_submit:disabled {
  background-color: #fff8f077;
  cursor: default !important;
  div {
    color:#3b1e0d83;
  }
}
.delete {
  width: fit-content;
  padding: 16px 15px;
  border: none;
  border-radius: 15px;
  background-color: #febbbc;
  cursor: pointer;
}
#focus_bottom_row {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: flex-end;
}
#focus_delete_tag.toggled {
  background-color: rgb(255, 65, 90);
}
.delete.delete_tag {
  position: absolute;
  padding: 5px;
}
.hidden {
  display: none;
}