/* page styles */
:root {
  --primary-light: #8abdff;
  --primary: #6d5dfc;
  --primary-dark: #5b0eeb;
  --white: #ffffff;
  --greyLight-1: #e4ebf5;
  --greyLight-2: #c8d0e7;
  --greyLight-3: #bec8e4;
  --greyDark: #909ab1;
  --greyLate: grey;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: inherit;
}

html {
  box-sizing: border-box;
  font-size: 65%;
  overflow-y: scroll;
  background: var(--greyLight-1);
  font-family: "Poppins", sans-serif;
}

/* FOR HIDDEN RADIO PLAYER AND OTHER ELEMENTS */
.visually-hidden {
  visibility: hidden;
  position: absolute;
}

.container {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--greyLight-1);
}

.components {
  width: 90rem;
  height: 60rem;
  border-radius: 3rem;
  box-shadow: 0.8rem 0.8rem 1.4rem var(--greyLight-2),
    -0.2rem -0.2rem 1.8rem var(--white);
  padding: 4rem;
  display: grid;
  grid-template-columns: 25rem 1fr 25rem;
  grid-template-rows: 7rem 1fr 10rem;
  grid-column-gap: 2.5rem;
  grid-row-gap: 2.5rem;
  align-items: center;
}

/* RADIO LOGO */
.logo {
  grid-column: 1/2;
  grid-row: 1/2;
  height: 13rem;
  cursor: pointer;
}
.logo img {
  max-width: 100%;
  max-height: 100%;
}

/*  PLAY BUTTON  */
.circle {
  grid-column: 1;
  grid-row: 3/4;
  width: 9rem;
  height: 100%;
  justify-self: center;
  border-radius: 1rem;
  display: grid;
  grid-template-rows: 1fr;
  justify-items: center;
  align-items: center;
}
.circle__btn {
  grid-row: 1/2;
  grid-column: 1/2;
  width: 6rem;
  height: 6rem;
  display: flex;
  margin: 0.6rem;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  font-size: 3.2rem;
  color: var(--primary);
  z-index: 300;
  background: var(--greyLight-1);
  box-shadow: 0.3rem 0.3rem 0.6rem var(--greyLight-2),
    -0.2rem -0.2rem 0.5rem var(--white);
  cursor: pointer;
  position: relative;
}
.circle__btn.shadow {
  box-shadow: inset 0.2rem 0.2rem 0.5rem var(--greyLight-2),
    inset -0.2rem -0.2rem 0.5rem var(--white);
}
.circle__btn .play {
  position: absolute;
  opacity: 0;
  transition: all 0.2s linear;
}
.circle__btn .play.visibility {
  opacity: 1;
}
.circle__btn .stop {
  position: absolute;
  transition: all 0.2s linear;
}
.circle__btn .stop.visibility {
  opacity: 0;
}
.circle__back-1,
.circle__back-2 {
  grid-row: 1/2;
  grid-column: 1/2;
  width: 6rem;
  height: 6rem;
  border-radius: 50%;
  filter: blur(1px);
  z-index: 100;
}
.circle__back-1 {
  box-shadow: 0.4rem 0.4rem 0.8rem var(--greyLight-2),
    -0.4rem -0.4rem 0.8rem var(--white);
  background: linear-gradient(
    to bottom right,
    var(--greyLight-2) 0%,
    var(--white) 100%
  );
  -webkit-animation: waves 4s linear infinite;
  animation: waves 4s linear infinite;
}
.circle__back-1.stopped {
  -webkit-animation-play-state: paused;
  animation-play-state: paused;
}
.circle__back-2 {
  box-shadow: 0.4rem 0.4rem 0.8rem var(--greyLight-2),
    -0.4rem -0.4rem 0.8rem var(--white);
  -webkit-animation: waves 4s linear 2s infinite;
  animation: waves 4s linear 2s infinite;
}
.circle__back-2.stopped {
  -webkit-animation-play-state: paused;
  animation-play-state: paused;
}

/*  SEARCH  */
.search {
  grid-column: 2/3;
  grid-row: 1/2;
  position: relative;
  display: flex;
  align-items: center;
  justify-self: center;
  justify-content: end;
}
.search__input {
  width: 23rem;
  height: 4rem;
  border: none;
  border-radius: 1rem;
  font-size: 1.6rem;
  padding-left: 1.5rem;
  padding-right: 3.8rem;
  box-shadow: inset 0.2rem 0.2rem 0.5rem var(--greyLight-2),
    inset -0.2rem -0.2rem 0.5rem var(--white);
  background: none;
  font-family: inherit;
  color: var(--greyDark);
  appearance: none;
  -webkit-appearance: none;
}
.search__input::-moz-placeholder {
  color: var(--greyDark);
}
.search__input:-ms-input-placeholder {
  color: var(--greyDark);
}
.search__input::placeholder {
  color: var(--greyDark);
}
.search__input:focus {
  outline: none;
  box-shadow: 0.3rem 0.3rem 0.6rem var(--greyLight-2),
    -0.2rem -0.2rem 0.5rem var(--white);
}
.search__input:focus + .search__icon {
  color: var(--primary);
}
.search__icon {
  height: 2rem;
  position: absolute;
  font-size: 2rem;
  padding: 0 1rem;
  display: flex;
  color: var(--greyDark);
  transition: 0.3s ease;
  cursor: pointer;
}
button.search__icon {
  background: transparent;
  border: 0;
}

/*  ICONS  */
.icon {
  grid-column: 3/4;
  grid-row: 1/2;
  display: flex;
  justify-content: space-between;
}
#flag,
.icon__favorites,
.icon__country,
.icon__settings,
.icon__mute {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  box-shadow: 0.3rem 0.3rem 0.6rem var(--greyLight-2),
    -0.2rem -0.2rem 0.5rem var(--white);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  cursor: pointer;
  color: var(--greyDark);
  transition: all 0.5s ease;
}
.selected,
.icon__favorites:active,
.icon__country:active,
.icon__settings:active,
.icon__mute:active {
  box-shadow: inset 0.2rem 0.2rem 0.5rem var(--greyLight-2),
    inset -0.2rem -0.2rem 0.5rem var(--white);
  color: var(--primary);
}
.icon__favorites:hover,
.icon__country:hover,
.icon__settings:hover,
.icon__mute:hover {
  color: var(--primary);
}

/*  STATUS MESSAGE  */
.status-live {
  grid-column: 2;
  grid-row: 3/4;
  justify-self: center;
  font-size: 1.5rem;
  color: var(--greyDark);
  display: flex;
  align-items: center;
  justify-content: center;
}

/*  VOLUME SLIDER  */
.slider {
  grid-column: 3/4;
  grid-row: 3/4;
  align-self: center;
  display: flex;
  flex-direction: column;
}
.slider__box {
  width: 100%;
  height: 1rem;
  cursor: pointer;
  box-shadow: inset 0.2rem 0.2rem 0.5rem var(--greyLight-2),
    inset -0.2rem -0.2rem 0.5rem var(--white);
  border-radius: 1rem;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
.slider__btn {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--white);
  position: absolute;
  box-shadow: 0px 0.1rem 0.3rem 0px var(--greyLight-3);
  z-index: 200;
  display: flex;
  justify-content: center;
  align-items: center;
}
.slider__btn:hover ~ .slider__tooltip {
  opacity: 1;
}
.slider__btn::after {
  content: "";
  position: absolute;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  box-shadow: inset 0.2rem 0.2rem 0.5rem var(--greyLight-2),
    inset -0.2rem -0.2rem 0.5rem var(--white);
}
.slider__color {
  height: 100%;
  width: 50%;
  position: absolute;
  left: 0;
  z-index: 100;
  border-radius: inherit;
  background: var(--primary);
  background: linear-gradient(
    -1deg,
    var(--primary-dark) 0%,
    var(--primary) 50%,
    var(--primary-light) 100%
  );
}
.slider__tooltip {
  position: absolute;
  top: 2.6rem;
  height: 2.5rem;
  width: 3rem;
  border-radius: 0.6rem;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
  color: var(--primary);
  box-shadow: 0.3rem 0.3rem 0.6rem var(--greyLight-2),
    -0.2rem -0.2rem 0.5rem var(--white);
  opacity: 0;
  transition: opacity 0.3s ease;
}

@-webkit-keyframes waves {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

@keyframes waves {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

/* carousel styles */
.ax-hidden {
  visibility: hidden;
  position: absolute;
}

.carousel {
  grid-column: 1/4;
  grid-row: 2/3;
  --carousel-height: 25rem;
  --carousel-width: 100rem;
  --carousel-item-height: 12rem;
  --carousel-item-width: 12rem;
}

.carousel-container {
  align-items: center;
  display: flex;
  min-height: var(--carousel-height);
  margin: 0 auto;
  max-width: var(--carousel-width);
  position: relative;
}

.carousel-item {
  height: var(--carousel-item-height);
  opacity: 0;
  padding: 1rem;
  position: absolute;
  transform: translateX(-50%);
  transition: all 0.3s ease-in-out;
  width: var(--carousel-item-width);
  border-radius: 20px;
  z-index: 0;
  background-color: var(--greyLight-2);
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  color: var(--greyLate);
}

/* STATION FAVICON */
img {
  max-width: 50%;
}

.carousel-item-4 {
  left: 15%;
  opacity: 0.4;
  font-size: 1rem;
}

.carousel-item-2,
.carousel-item-5 {
  height: calc(var(--carousel-item-height) * 1.5);
  opacity: 1;
  width: calc(var(--carousel-item-width) * 1.5);
  z-index: 1;
  font-size: 1.2rem;
}

.carousel-item-5 {
  left: 30%;
}

.carousel-item-1 {
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.6),
    0 0 60px rgba(255, 255, 255, 0.45), 0 0 110px rgba(255, 255, 255, 0.25),
    0 0 100px rgba(255, 255, 255, 0.1);
  height: calc(var(--carousel-item-height) * 2);
  opacity: 1;
  left: 50%;
  width: calc(var(--carousel-item-width) * 2);
  z-index: 2;
  font-size: 1.6rem;
}
.carousel-item-1:hover {
  cursor: pointer;
}

.carousel-item-2 {
  left: 70%;
}

.carousel-item-3 {
  left: 85%;
  opacity: 0.4;
  font-size: 1rem;
}

.carousel-controls {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0;
}

/* carousel button styles */
.carousel-control {
  background-color: transparent;
  border: none;
  color: var(--greyDark);
  cursor: pointer;
  margin: 0 1.5rem;
  transform: scale(1.25);
  transition: transform 0.2s ease-out, color 0.2s ease-out;
}

.carousel-control:hover {
  transform: scale(1.5);
  color: var(--primary);
}

/* Ionicon inside controls */
.carousel-control ion-icon {
  font-size: 3rem;
}

/* SPINNER LOADING */
.loader {
  background-image: url("./images/spinner.gif");
  background-size: cover;
  height: 100px;
  width: 100px;
  margin: auto;
}

/* IF NO FAVORITES */
.empty-favorites {
  background-image: url("./images/radio-4-256.png");
  background-size: cover;
  height: 200px;
  width: 200px;
  margin: auto;
}
.empty-favorites p {
  color: var(--greyDark);
  position: relative;
  font-size: 2rem;
  text-align: center;
  font-weight: bold;
  padding: 100% 0;
}

/* country list dropdown */
select {
  position: absolute;
  opacity: 0;
  appearance: none;
  cursor: pointer;
  width: 4rem;
  height: 4rem;
  text-align: center;
  border-radius: 50%;
}

/* Server URL page */
.server-url {
  font-size: 2rem;
  color: var(--greyDark);
}
label {
  font-size: 1.7rem;
  vertical-align: text-top;
}
legend {
  padding: 1rem;
}
fieldset {
  border-radius: 10px;
}
.radio {
  margin: 1rem;
  width: 2rem;
  height: 2rem;
  background: var(--greyDark);
  transition: 0.5s ease;
  cursor: pointer;
}
#server-submit {
  border: none;
  margin: 2rem;
  font-size: 2rem;
  width: 15rem;
  height: 4rem;
  border-radius: 1rem;
  justify-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.3s ease;
  background: var(--primary);
  box-shadow: inset 0.2rem 0.2rem 1rem var(--primary-light),
    inset -0.2rem -0.2rem 1rem var(--primary-dark),
    0.3rem 0.3rem 0.6rem var(--greyLight-2), -0.2rem -0.2rem 0.5rem var(--white);
  color: var(--greyLight-1);
}

/* MEDIA STYLES */
@media screen and (max-width: 990px) {
  html {
    font-size: 50%;
  }
  .carousel-control {
    border: none;
  }
}
@media screen and (max-width: 750px) {
  html {
    font-size: 40%;
  }
}
@media screen and (max-width: 600px) {
  html {
    font-size: 30%;
  }
}
@media screen and (max-width: 450px) {
  html {
    font-size: 60%;
  }
  .components {
    width: 95%;
    height: 85vh;
    padding: 2rem;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 2fr 1fr 1fr 3fr 2fr;
    grid-column-gap: 1rem;
    grid-row-gap: 1rem;
  }
  .logo {
    grid-column: 1/3;
    grid-row: 1/2;
    justify-self: center;
    height: 12rem;
  }
  .search {
    grid-column: 1/3;
    grid-row: 2/3;
    padding: 0.7rem;
  }
  .icon {
    grid-column: 1/3;
    grid-row: 3/4;
    justify-content: space-around;
  }
  .circle {
    grid-column: 1/3;
    grid-row: 5/6;
  }
  .status-live {
    position: absolute;
    top: 9rem;
    right: 4rem;
  }
  .slider {
    display: none;
  }
  .carousel {
    grid-column: 1/3;
    grid-row: 4/5;
  }
  .carousel-control {
    margin: 2rem 3rem;
  }
}
@media screen and (max-width: 380px) {
  html {
    font-size: 50%;
  }
  .components {
    padding: 1rem;
    height: 90vh;
  }
  .icon {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
  }
  .icon__country {
    display: flex;
    align-items: center;
  }
  .carousel-item {
    font-size: 1.2rem;
  }
}
