/* FONTS */
@import url("https://fonts.googleapis.com/css2?family=Stick+No+Bills:wght@400;600&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Iceland&display=swap");

/* ROOT COLORS */
::selection {
  color: var(--white);
  background: var(--black);
}

:root {
  --blue: #40476d;
  --red: #ff312e;
  --black: #0e0f19;
  --white: #fefffe;
}

html {
  min-width: 290px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Iceland", cursive;
  font-size: 1rem;
}

button {
  transition: transform 0.3s linear;
  border-radius: 25px;
  outline: none;
  border: 6px solid var(--black);
  color: var(--black);
}

button:hover,
button:focus {
  transform: scale(0.96);
  border: 6px solid var(--red);
}

body {
  background-image: linear-gradient(
    -225deg,
    #4b271b 0%,
    #e3673f 48%,
    #967469 100%
  );
  color: var(--black);
}

/* TABATA LANDING */
.tabata-container {
  height: 100vh;
  width: 100%;
  display: grid;
  grid-template-columns: 7fr 3fr;
}

/* APPLYING FLEXBOX AND CENTERING NUMBERS */
#rest-time,
#rounds-left,
#full-time-left {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 5rem;
  font-family: "Stick No Bills", sans-serif;
}

#menu-worktime-resttime-container,
#rest-time,
#full-time-left,
#rounds-left {
  border: 5px solid var(--black);
}

#menu-worktime-resttime-container {
  width: 100%;
  height: 100%;
  position: relative;
}

/* INDIVIDUAL ELEMENTS */

#rest-time {
  width: 150px;
  height: 80px;
  position: absolute;
  right: -3px;
  top: -5px;
  padding: 4rem;
}

#work-time {
  position: absolute;
  top: 50%;
  left: 50%;
  justify-content: center;
  align-items: center;
  transform: translate(-50%, -50%);
  font-family: "Stick No Bills", sans-serif;
  font-size: 12rem;
}

#buttons-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: absolute;
  bottom: 50px;
  right: 50%;
  transform: translate(50%, 0);
  width: 50%;
}

#start,
#stop {
  margin: 5px;
  width: 45%;
  font-size: 3rem;
}

#reset {
  margin-top: 3px;
  width: 93%;
  font-size: 3rem;
}

/* RIGHT SIDE OF THE GRID */

#full-time-left,
#rounds-left {
  width: 100%;
  height: 50%;
}

#is-hidden {
  display: none;
}

/* MENU */

.menu {
  height: 100vh;
  width: 100%;
  display: grid;
  grid-auto-rows: 1fr;
}

input {
  width: 150px;
  font-size: 4rem;
  margin: 5px;
}

#button-main {
  position: absolute;
  margin: 5px;
  padding: 5px;
  width: 300px;
  font-size: 3rem;
}

#menu-button {
  margin: 5px;
  padding: 5px;
  width: 300px;
  font-size: 3rem;
}

#set-work-time,
#set-rest-time,
#set-rounds,
#skontat-cemo {
  border: 1px solid var(--black);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 4rem;
  text-align: center;
}

#logo {
  height: 200px;
}

.menu-box {
  transition: background-color 1s ease-in-out;
  transition-delay: 0.2s;
}

.menu-box:hover,
.menu-box:focus-within {
  background-color: var(--black);
  color: var(--red);
}

/* ALERTS */

.alert {
  position: absolute;
  text-align: center;
  top: 50%;
  left: 50%;
  padding: 1rem 2rem;
  border-radius: 10px;
  transform: translate(-50%, -50%);
  animation: alert 1.2s linear;
  font-size: 2rem;
  color: var(--white);
  z-index: 2000;
}

.success {
  background-color: green;
}

.failure {
  background-color: var(--red);
}

/* ALERT ANIMATIONS */

@keyframes alert {
  0% {
    opacity: 0;
  }
  25% {
    opacity: 0.25;
  }
  50% {
    opacity: 0.5;
  }

  75% {
    opacity: 0.75;
  }
  100% {
    opacity: 1;
  }
}

@media only screen and (max-width: 700px) {
  #button-main,
  #menu-button {
    width: 80px;
    font-size: 1rem;
  }

  #set-work-time,
  #set-rest-time,
  #set-rounds,
  #skontat-cemo {
    font-size: 2rem;
  }

  input {
    width: 60px;
    font-size: 1rem;
    margin: 5px;
  }

  #start,
  #stop,
  #reset {
    font-size: 1rem;
    font-weight: bolder;
  }

  #rest-time {
    padding: 1rem;
  }

  .alert {
    font-size: 2rem;
    color: var(--white);
    z-index: 50;
  }
}

@media only screen and (max-width: 360px) {
  #rest-time,
  #rounds-left,
  #full-time-left {
    font-size: 3rem;
  }

  #work-time {
    font-size: 8rem;
  }

  #rest-time {
    width: 100px;
  }
}

@media only screen and (max-height: 575.98px) and (orientation: landscape) {
  #buttons-container {
    flex-direction: row;
  }

  #button-main,
  #menu-button {
    width: 80px;
    font-size: 1rem;
  }

  #start,
  #stop,
  #reset {
    font-size: 1rem;
    padding: 5px 20px;
    font-weight: bolder;
  }

  #work-time {
    font-size: 6rem;
  }
}
