@import "../../global.css";

header{
  height: 15vh;
  width: 100%;
  background-color: var(--header-color);
  display: flex;
  flex-direction: row;
  box-shadow: 1px 1px 7px #465058;
}

main{
  height: 78vh;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: row;
}

footer{
  height: 7vh;
  width: 100%;
  background-color: var(--footer-color);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

/* HEADER */

#logo, #date, #current-time, #name{
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

#logo, #date{
  width: 33vw;
}

#logo img{
  height: 13vh;
}

#name{
  width: 70%
}

#current-time{
  width: 34vw;
  font-size: 120px;
  color: var(--headre-text-color);
}

#date{
  flex-direction: column;
  font-size: 36px;
  text-transform: capitalize;
  color: var(--headre-text-color);
}

/* MAIN */
#first-time{
  background-color: white;
  border-radius: 20px;
  width: 33vw;
  height: calc(100% - 20px);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.6), 0 2px 10px 0 rgba(0, 0, 0, 0.6)!important;
  margin-right: 20px;
  flex-shrink: 0;
}

.item-salah, .item-sun{
  display: flex;
  justify-content: center;
  align-items: center;
  width: calc(100% - 20px);
  flex-direction: row;
  flex-grow: 1;
}

.item-salah p, .item-sun p{
  text-align: center;
  width: 50%;
}

.item-salah p{
  font-size: 56px;
  font-weight: 900;
  color: var(--salah-color);
}

.item-sun p{
  font-size: 42px;
  color: var(--sun-color);
}

.runsalah{
  font-family: 'Runsalah'
}

.item-sun-position{
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  width: calc(100% - 20px);
}

.item-sun-position p{
  text-align: center;
  flex-grow: 1;
  color: var(--sun-color);
  font-size: 40px;
}

#textFooter{
  font-size: 40px;
  font-weight: 900;
  color: var(--salah-color);
  white-space: nowrap;
  animation: Scroll 40s linear infinite;
  text-overflow: ellipsis;
}

@keyframes Scroll {
  0% {
    transform: translateX(100vw)
  }

  100% {
    transform: translateX(-100%)
  }

}

.hidden{
  display: none;
}

#image{
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  flex-grow: 1;
  flex-basis: 33vw;
}

#image img{
  max-height: calc(100% - 40px);
  max-width: calc(100% - 10px);
  margin: 5px;
  animation: fade 800ms ease-in-out;
  background-color: #ffffff;
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.4), 0 2px 10px 0 rgba(0, 0, 0, 0.4)!important;
  border-radius: 20px;
}

@keyframes fade {
  from {transform: translateX(100%)} 
  to {transform: translateX(0)}
}

#containProgress{
  height: 20px;
  width: calc(100% - 20px);
  position: absolute;
  top: 5px;
  margin: 1px;
  z-index: 10;
  display: flex;
  flex-direction: row;
}

.progress{
  height: 100%;
  border: solid 2px var(--color-main);
  margin: 0 10px;
  overflow: hidden;
  flex-grow: 1;
  border-radius: 10px;
}

.progress div{
  height: 100%;
  background-color: var(--progress-color);
}

.progress-finish{
  width: 100%;
}

.progress-current{
  animation: moveProgress 15s linear infinite;
}

.progress-wait{
  width: 0%;
}

@keyframes moveProgress{
  from {width: 0%}
  to {width: 100%}
}

/* NEWS */
#message{
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  flex-grow: 1;
  flex-shrink: 0;
  flex-basis: 33vw;
}

/*flex-shrink: 0;
  flex-grow: 1;
  flex-basis: 33vw;
*/
#message p{
  width: calc(100% - 60px);
  background: white;
  margin: 10px;
  padding: 20px;
  text-align: center;
  font-size: 45px;
  color: var(--salah-color);
  border-radius: 20px;
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.6), 0 2px 10px 0 rgba(0, 0, 0, 0.6) !important;
}

.witdh_1{
  width: 66vw;
}

.width_2{
  width: 33vw;
}

@media screen and (max-width: 500px) {
  header{
    height: auto;
    flex-direction: column;
  }

  #logo img{
    height: 50px;
  }

  #logo, #date, #current-time{
    width: auto;
  }

  #current-time, #date{
    font-size: 25px;
  }

  #message, #image{
    flex-basis: auto;
  }

  #message p{
    font-size: 25px;
  }

  main{
    height: auto;
    flex-direction: column;
  }
 
  #first-time{
    width: 90%;
    margin: 10px 0;
  }

  .item-salah p, .item-sun p, .item-sun-position p{
    font-size: 25px;
  }

  footer{
    position: relative;
  }

}

