@ -0,0 +1,458 @@
* { box-sizing: border-box; }

/* force scrollbar, prevents initial gap */
html {
  overflow-y: scroll;
}

body {
  font-family: sans-serif;
}

:root{
  --unit-width: 155px;
  --unit-height: 155px;
}

/* ---- grid ---- */

.grid {
  background: #DDD;
}

/* clear fix */
.grid:after {
  content: '';
  display: block;
  clear: both;
}

/* ---- .element-item ---- */

/* 5 columns, percentage width */
.grid-item,
.grid-sizer {
  width: 1%;
}

.grid-item {
  float: left;
  /*width: var(--unit-width);
  height: var(--unit-height);*/
  width: auto;
  height: auto;
  padding: 0px;
  margin: 0;
  background: #DDD;
  border: 0px solid #333;
  border-color: hsla(0, 0%, 0%, 0.7);
  align-items: center;
  position: relative;
}

/*
supported tile size:
  21  - 2x1
  32  - 3x2
  43  - 4x3
  7   - 10x7
  17  - 40x17
*/

.grid-item--width2 { width: 280px; }
.grid-item--height2 { height: 280px; }

.grid-item--width32 { width: 100%; height: auto;}
.grid-item--height32 { height: 220px; }

.grid-item--width43 { width: 193px; }
.grid-item--height43 { height: 193px; }

.grid-item--width7 { width: 210px; }
.grid-item--height7 { height: 210px; }

.grid-item--width8 { width: 185px; }
.grid-item--height8 { height: 190px; }

.grid-item--width7m { width: 595px; height:425px}
.grid-item--height7m { height: 595px; width:420px}

.grid-item--width17 { width: 320px; height: 150px; }
.grid-item--height17 { height: 320px; width: 150px;}

* { box-sizing: border-box; }

body {
  font-family: sans-serif;
}

/* ---- button ---- */

.button {
  display: inline-block;
  padding: 0.5em 1.0em;
  background: #EEE;
  border: none;
  border-radius: 7px;
  background-image: linear-gradient( to bottom, hsla(0, 0%, 0%, 0), hsla(0, 0%, 0%, 0.2) );
  color: #222;
  font-family: sans-serif;
  font-size: 16px;
  text-shadow: 0 1px white;
  cursor: pointer;
}

.button-read {
  display: inline-block;
  padding: 0.5em 1.0em;
  background: #EEE;
  border: none;
  border-radius: 7px;
  background-image: linear-gradient( to bottom, hsla(0, 0%, 0%, 0), hsla(0, 0%, 0%, 0.2) );
  color: #222;
  font-family: sans-serif;
  font-size: 16px;
  text-shadow: 0 1px white;
  cursor: pointer;
}

.button:hover {
  background-color: #8CF;
  text-shadow: 0 1px hsla(0, 0%, 100%, 0.5);
  color: #222;
}

.button:active,
.button.is-checked {
  background-color: #28F;
}

.button.is-checked {
  color: white;
  text-shadow: 0 -1px hsla(0, 0%, 0%, 0.8);
}

.button:active {
  box-shadow: inset 0 1px 10px hsla(0, 0%, 0%, 0.8);
}

/* ---- button-group ---- */

.button-group {
  margin-bottom: 20px;
}

.button-group:after {
  content: '';
  display: block;
  clear: both;
}

.button-group .button {
  float: left;
  border-radius: 0;
  margin-left: 0;
  margin-right: 1px;
}

.button-load {
  float: center;
  border-radius: 0;
  margin-left: 0;
  margin-right: 1px;
  margin-bottom: 20px;
}

.button-group .button:first-child { border-radius: 0.5em 0 0 0.5em; }
.button-group .button:last-child { border-radius: 0 0.5em 0.5em 0; }

/* ---- isotope ---- */

.grid {
  border: 1px solid #333;
}

/* clear fix */
.grid:after {
  content: '';
  display: block;
  clear: both;
}

/* ---- .element-item ---- */

.element-item {
  position: relative;
  float: left;
/*  width: 155px;
  height: 155px;*/
  margin: 1px;
  padding: 2px;
  background: #fff;
  color: #262524;
  align-items: center;
}

.element-item > * {
  margin: 0;
  padding: 0;
}

.element-item .year {
  position: absolute;

  left: 10px;
  top: 60px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
  font-weight: normal;
}

.element-item .name {
  position: absolute;
  left: 10px;
  top: 0px;
  font-size: 42px;
  font-weight: bold;
  color: white;
}

.element-item .date {
  position: absolute;
  text-align: center;
  bottom: 15px;
  color: white;
}

.element-item .action {
  position: absolute;
  left: 10px;
  top: 76px;
  font-size: 12px;
}

.element-item.writing          { background: #F00; background-image: linear-gradient( to bottom, hsla(20, 100%, 50%, 0), hsla(0, 0%, 0%, 0.2) ); }
.element-item.remarkable  { background: #F80; background-image: linear-gradient( to bottom, hsla(36, 100%, 50%, 0), hsla(0, 0%, 0%, 0.2) ); }
.element-item.poem      { background: #FF0; background-image: linear-gradient( to bottom, hsla(72, 100%, 50%, 0), hsla(0, 0%, 0%, 0.2) ); }
.element-item.video        { background: #F2F; background-image: linear-gradient( to bottom, hsla(100, 100%, 50%, 0), hsla(0, 0%, 0%, 0.2) ); }
.element-item.procreate      { background: #0F8; background-image: linear-gradient( to bottom, hsla(144, 100%, 50%, 0), hsla(0, 0%, 0%, 0.2) ); }
.element-item.drawing { background: #FFF; background-image: linear-gradient( to bottom, hsla(180, 100%, 50%, 0), hsla(0, 0%, 0%, 0.2) ); }
.element-item.metalloid       { background: #08F; background: hsl( 216, 100%, 50%); }
.element-item.diatomic        { background: #00F; background: hsl( 252, 100%, 50%); }
.element-item.halogen         { background: #F0F; background: hsl( 288, 100%, 50%); }
.element-item.noble-gas       { background: #F08; background: hsl( 324, 100%, 50%); }

.element-item.association          { background: #edd; background-image: linear-gradient( to bottom, hsla(20, 100%, 50%, 0), hsla(0, 0%, 0%, 0.2) ); }
.element-item.region  { background: #ede; background-image: linear-gradient( to bottom, hsla(36, 100%, 50%, 0), hsla(0, 0%, 0%, 0.2) ); }
.element-item.national      { background: #dde; background-image: linear-gradient( to bottom, hsla(72, 100%, 50%, 0), hsla(0, 0%, 0%, 0.2) ); }
.element-item.training        { background: #F2F; background-image: linear-gradient( to bottom, hsla(100, 100%, 50%, 0), hsla(0, 0%, 0%, 0.2) ); }
.element-item.jo      { background: #ded; background-image: linear-gradient( to bottom, hsla(144, 100%, 50%, 0), hsla(0, 0%, 0%, 0.2) ); }

.image-container {
  position: relative; /* This makes the container the reference for positioning the child elements absolutely */
  display: inline-block; /* This shrinks the container to fit the image's width */
}

.tile-container img {
  display: block; /* Ensures the image takes up the full width of its container */
  width: 100%; /* Makes the image responsive to the container's width */
  height: auto; /* Keeps the image's aspect ratio */
}

.content-container img {
  display: block; /* Ensures the image takes up the full width of its container */
  width: 100%; /* Makes the image responsive to the container's width */
  height: auto; /* Keeps the image's aspect ratio */
}

.content-text {
  position: absolute; /* Positions the text div over the image */
  bottom: 0; /* Aligns the text div at the bottom of the image */
  left: 0; /* Aligns the text div to the left of the container */
  width: 100%; /* Ensures the text div matches the image/container width */
  /* Additional styling for visibility and aesthetics */
  color: white; /* Text color */
  background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background for the text for readability */
  text-align: center; /* Centers the text within the div */
  padding: 10px 0; /* Adds some padding inside the text div */
}

.overlay-text {
  position: absolute; /* Positions the text div over the image */
  bottom: 0; /* Aligns the text div at the bottom of the image */
  left: 0; /* Aligns the text div to the left of the container */
  width: 100%; /* Ensures the text div matches the image/container width */
  /* Additional styling for visibility and aesthetics */
  color: white; /* Text color */
  background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background for the text for readability */
  text-align: center; /* Centers the text within the div */
  padding: 10px 0; /* Adds some padding inside the text div */
  opacity: 0;
}

.drawing:hover .overlay-text {
    opacity: 1;
}

.drawing .caption {
    position: absolute;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5); /* Black background with opacity */
    color: #f1f1f1; /* Light grey text */
    /*width: ;*/
    text-align: center;
    padding: 20px 0;
    opacity: 0;
    transition: opacity 0.5s ease;
    font-family: Arial, sans-serif; /* Example font */
}

.drawing:hover .caption {
    opacity: 1;
}

/* Grey overlay that appears on hover */
.drawing:hover img {
    filter: grayscale(40%);
}

.procreate .play {
    position: absolute;
    bottom: 0;
    background: rgba(A0, A0, A0, .5); /* Black background with opacity */
    color: #f1f1f1; /* Light grey text */
    width: 90%;
    text-align: center;
    padding: 20px 0;
    opacity: 0;
    transition: opacity 0.5s ease;
    font-family: Arial, sans-serif; /* Example font */
}

.procreate:hover .play  {
    opacity: 1;
}

#openseadragon {
    width: 100%;
    height: 100vh; /* Adjust height as necessary to ensure it covers the screen */
}

.grid-anim {
    position: relative;
    background-image: linear-gradient( to bottom, hsla(50, 100%, 50%, 0), hsla(0, 0%, 0%, 0.2) );
    background-position: center, center; /* Center both images */
    background-repeat: no-repeat, no-repeat;
    background-color: #e09000 !important;
}

.icon-anim-play {
    position: absolute;
    top: 20%;
    left: 25%;
    width:150px;
    height:150px;
    background-size: 50%;
    background-image: url('../images/animation-icon.png');
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;         /* Initially invisible */
    transition: opacity 0.5s ease; /* Smooth transition for the overlay */
    pointer-events: none;
}

.icon-video-play {
    position: absolute;
    top: 20%;
    left: 25%;
    width:150px;
    height:150px;
    background-size: 50%;
    background-image: url('../images/play.gif');
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;         /* Initially invisible */
    transition: opacity 0.5s ease; /* Smooth transition for the overlay */
    pointer-events: none;
}

.grid-anim:hover .icon-anim-play{
    opacity: 0.6;         /* Make the overlay visible on hover */

}

.grid-item:hover .icon-video-play{
    opacity: 0.6;         /* Make the overlay visible on hover */

}
.grid-item:hover {
  background-color: #00FF00 !important;
  background-image: linear-gradient( to bottom, hsla(144, 100%, 50%, 0), hsla(0, 0%, 0%, 0.2) );
}

.grid-item .content {
  display: block; /* Ensures the image takes up the full width of its container */
  width: 100%; /* Makes the image responsive to the container's width */
  height: auto; /* Keeps the image's aspect ratio */
}

.grid-item img{
  vertical-align: middle;
}

.grid-item .play {
    position: absolute;
    top:25%;
    left:25%;
    background: rgba(A0, A0, A0, .5); /* Black background with opacity */
    color: #f1f1f1; /* Light grey text */
    width: 50%;
    text-align: center;
    padding: 5px 0;
    opacity: 0;
    transition: opacity 0.5s ease;
    font-family: Arial, sans-serif; /* Example font */
}

.grid-item:hover .play  {
    opacity: .6;

}

.top-menu {
  display: block;
  position: relative;
  z-index: 1;
  background: #fff;
}

.top-menu h1 {
  position: relative;
  z-index: 150;
  cursor: pointer;
  background: #fff;
  margin: 0;
  padding: 5px;
}

.filter-menu, .sort-menu {
  max-height: 640px;
  opacity: 1;
  transition: all 0.3s ease-in-out;
  background: #fff;
}

.menu-hidden .filter-menu,
.menu-hidden .sort-menu {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}

.grid {
  position: relative;
  z-index: 50;
  margin-top: 0;
  transition: margin-top 0.3s ease-in-out;
  will-change: margin-top;
}

.grid-item {
    position: relative;
    z-index: 50;
    pointer-events: auto;
}

.grid-item:hover {
    z-index: 150;
}

/* New class for when grid should move up */
.grid-moved-up {
    margin-top: -640px;  /* Adjust this value based on your menu height */
}

#magnifier {
    display: none;
    position: fixed;
    width: 400px;
    height: 400px;
    border: 2px solid #ccc;
    border-radius: 50%;
    overflow: hidden;
    pointer-events: none;
    z-index: 9999;
}

#magnifier img {
    position: absolute;
}

.icon-animation-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background-size: contain;
    background-image: url('../images/animation-icon.png');
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 2;
}

.grid-anim:hover .icon-animation-play {
    opacity: 1;
}

.animation-loading {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 8px;
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    white-space: nowrap;
}