@import 'shared.css';

@font-face {
  font-family: "DS-Digital Bold Italic Fixed";
  src: url("ds1.woff2") format("woff2");
}

/* Clock-specific body modifications */
body {
  overflow: hidden;
  user-select: none;
  height: 90vh;
  width: 100vw;
  display: flex;
  align-items: center;
}

/* Clock Display */
div.lcd {
  font-family: "DS-Digital Bold Italic Fixed", sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  font-size: 23vw;
  text-shadow: 0 0 4px hsl(var(--hue), var(--sdw-sat), var(--sdw-lum));
  position: relative;
}

#hh, #mm, #ss, span.colon {
  position: relative;
}

#hh::before, #mm::before, #ss::before, span.colon::before {
  position: absolute;
  inset: 0;
  color: inherit;
  opacity: 0.05;
  text-shadow: none;
  z-index: -1;
}

#hh::before, #mm::before, #ss::before {
  content: "88";
}

span.colon::before {
  content: ":";
}

div.tfampm {
  display: flex;
  flex-direction: column;
}

div.tfampm span {
  font-family: 'Ramabhadra', sans-serif;
  font-size: 3.2vw;
  color: transparent;
  text-shadow: none;
  margin-left: 4vw;
  position: relative;
}

div.tfampm span::before {
  position: absolute;
  inset: 0;
  color: hsl(var(--hue), var(--txt-sat), var(--txt-lum));
  opacity: 0.05;
  text-shadow: none;
  z-index: -1;
}

span#tf::before {
  content: "24HR";
}

span#am::before {
  content: "AM";
}

span#pm::before {
  content: "PM";
}

div.tfampm span.active {
  color: unset;
  text-shadow: 0 0 4px hsl(var(--hue), var(--sdw-sat), var(--sdw-lum));
}

/* About Icon */
div#about {
  position: absolute;
  bottom: 2vh;
  right: 1vw;
  transition: opacity 1.5s 1s;
}

div#about:hover {
  opacity: 1 !important;
}

/* Responsive Layout */
@media (orientation: landscape) {
  body {
    padding-left: 1vw;
  }

  div.lcd {
    flex-direction: row;
    margin-top: calc(-1 * env(safe-area-inset-bottom));
  }

}

@media (orientation: portrait) {
  div.lcd {
    flex-direction: column;
    font-size: 27vh;
  }

  div.tfampm {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    position: relative;
  }

  div.tfampm span {
    font-size: 3.2vh;
    margin-left: calc(3.2vw * 2);
  }
  
  div.tfampm span:first-child {
    margin-left: 0;
  }
  
  span.colon {
    display: none;
  }

  div#about {
    bottom: 1vh;
    right: 3vw;
  }
}
