.container {
  align-items: center;
  bottom: 0;
  color: #FFF;
  display: flex;
  font-family: Inter, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  height: 100%;
  justify-content: center;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  width: 100%;

  --layer-title: 1;
  --layer-controls: 2;
  --layer-info: 4;

  --color-highlight: #3784eb;

  --color-text: #FFF;
  --color-text-highlight: #5e9ff3;

  --color-button: #FFF;

  --color-menu-background: rgba(227, 227, 227, 70%);
  --color-menu-button-active: #FFF;
  --color-menu-button-focused: rgba(255, 255, 255, 75%);
  --color-menu-text: #282828;
  --color-menu-text-secondary: #666;

  --content-image-size: 150px;

  &--default-controls {
    pointer-events: none;
    user-select: none;
  }
}

.autohide {
  cursor: none;

  &:not(:has(:focus-visible)) {
    .bottom-controls-container--autohide {
      opacity: 0;
      pointer-events: none;
      user-select: none;
    }
  }
}

.icon-button {
  align-items: center;
  color: var(--color-button);
  display: flex;
  height: 100%;
  padding: 5px;
  transition: color 0.15s ease;
  width: auto;

  svg {
    height: 100%;
    max-width: 100%;
    width: auto;
  }

  &:disabled {
    opacity: 0.5;
  }

  &--drop-shadow-focus {
    opacity: 0.6;
    transition: opacity 0.25s ease;

    &:hover,
    &:focus-visible {
      opacity: 1;
    }

    &:disabled {
      opacity: 0.1;
    }

    &:focus-visible {
      filter: drop-shadow(0 0 5px #FFF);
    }
  }

  &-active,
  &--circle-focus {
    border-radius: 100%;
    transition: background-color 0.25s ease, color 0.25s ease, filter 0.25s ease;

    &.icon-button-active,
    &:focus-visible {
      background-color: #FFF;
      color: #000;
      filter: drop-shadow(0 0 5px #FFF);

      * {
        color: #000;
      }
    }
  }
}

.text-button {
  border-radius: 5px;
  padding: 5px 10px;
  transition: background-color 0.25s ease, color 0.5s ease, filter 0.25s ease;

  &--active,
  &:hover,
  &:focus-visible {
    background-color: #FFF;
    color: #000;
    filter: drop-shadow(0 0 5px #FFF);
  }
}

.bottom-controls-container {
  animation: 0.5s fadein ease;
  bottom: 0;
  max-width: 100%;
  padding: 0 50px 30px;
  position: absolute;
  transition: opacity 0.5s ease;
  width: 100%;
  z-index: var(--layer-controls);
}

.bottom-controls-gradient {
  background: linear-gradient(transparent, rgba(0,0,0,100%));
  bottom: 0;
  height: 150%;
  left: 0;
  pointer-events: none;
  position: absolute;
  right: 0;
  user-select: none;
  z-index: 0;
}

.center-play-button {
  height: 125px;
  position: relative;
  transition: opacity 0.5s ease;
  width: 125px;
  z-index: var(--layer-controls);

  &--hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    user-select: none;
  }
}

.title-container {
  align-items: center;
  display: flex;
  gap: 20px;
  margin-bottom: 10px;
  position: relative;
  width: 100%;

  .title {
    font-size: 32px;
  }

  .menu-control-container {
    margin-right: -8px;
  }
}

.time-container {
  align-items: center;
  display: flex;
  margin-top: 10px;
  position: relative;
}

.live-indicator {
  background: #F00;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 600;
  padding: 3px 10px;
  position: relative;
  text-transform: uppercase;
  transition: opacity 0.25s ease, background 0.15s ease, color 0.15s ease;
  user-select: none;
  width: max-content;

  &--faded {
    background: #333;
    opacity: 0.75;
  }

  &:hover {
    opacity: 1;
  }
}


.bottom-controls {
  align-items: flex-end;
  display: flex;
  height: 65px;
  justify-content: center;
  position: relative;
}

.center-buttons {
  align-items: center;
  display: flex;
  gap: 15px;
  height: 100%;
  margin-bottom: 10px;

  .icon-button {
    height: 75%;
  }

  .play-pause-button {
    height: 100%;
  }

  .track-button {
    padding: 13px;
  }
}

.bottom-left-controls,
.bottom-right-controls {
  align-items: center;
  display: flex;
  gap: 10px;
  height: 35px;
  position: absolute;
}

.bottom-left-controls {
  left: -10px;
}

.bottom-right-controls {
  right: -10px;
}

/* Info box */
.info-box-container {
  animation: 0.5s fadein ease;
  bottom: 30px;
  display: grid;
  gap: 20px;
  height: max-content;
  left: 50px;
  position: absolute;
  right: 50px;
  z-index: var(--layer-info);
}

.info-box {
  align-items: center;
  backdrop-filter: blur(5px);
  background: rgba(10, 10, 10, 70%);
  border-radius: 7px;
  box-shadow: 0 0 32px 0 rgba(0, 0, 0, 100%);
  display: flex;
  gap: 30px;
  padding: 15px 30px 15px 15px;
}

.info-box-image-container {
  border-radius: 5px;
  height: var(--content-image-size);
  min-height: var(--content-image-size);
  min-width: var(--content-image-size);
  overflow: hidden;
  width: var(--content-image-size);
}

.info-box-image {
  height: 100%;
  object-fit: cover;
  object-position: center;
  width: 100%;
}

.info-box-text {
  align-content: start;
  display: grid;
  flex-grow: 1;
  gap: 10px;
  height: 100%;

  &--top-padding {
    padding-top: 10px;
  }
}

.info-box-headers {
  display: flex;
  flex-wrap: wrap;
  font-size: 16px;
  font-weight: 600;
  gap: 20px;
}

.info-box-description {
  font-size: 18px;
}

.info-box-title {
  font-size: 24px;
  font-weight: 600;
}

.info-box-button {
  align-items: center;
  background: #FFF;
  border-radius: 5px;
  color: #000;
  display: flex;
  font-weight: 500;
  gap: 15px;
  padding: 5px 10px;
  transition: background-color 0.25s ease, color 0.25s ease, filter 0.25s ease;
  width: max-content;

  &:hover,
  &:focus,
  &:focus-visible {
    filter: drop-shadow(0 0 5px #FFF);
  }

  &--restart {
    height: 50px;
    padding-left: 20px;
    padding-right: 30px;
  }
}

/* Menus */

.menu-control-container {
  position: relative;
  z-index: var(--layer-menu);

  .icon-button {
    height: 45px;
    padding: 10px;
    width: 45px;
  }
}

/* Misc */

.spacer {
  flex-grow: 1;
}

.watermark {
  height: auto;
  pointer-events: none;
  position: absolute;
  right: 50px;
  top: 20px;
  user-select: none;
  width: 70px;
  z-index: var(--layer-title);
}

:global(.__eluvio-player--size-lg) {
  .info-box-title {
    font-size: 20px;
  }

  .info-box-description {
    font-size: 16px;
  }

  .info-box-container {
    left: 30px;
    right: 30px;
  }

  .center-play-button {
    height: 100px;
    width: 100px;
  }
}

:global(.__eluvio-player--size-md),
:global(.__eluvio-player--size-sm) {
  .center-play-button {
    display: none;
  }

  .bottom-controls-container {
    padding: 15px 30px 30px;
  }

  .bottom-controls {
    height: max-content;
    padding-bottom: 20px;
  }

  .bottom-left-controls,
  .bottom-right-controls {
    bottom: 0;
  }

  .center-buttons {
    height: 50px;
  }

  .title {
    font-size: 16px;
  }

  .text-button {
    font-size: 12px;
  }

  .menu-control-container {
    position: unset;

    .icon-button {
      height: 30px;
      padding: 5px;
      width: 30px;
    }
  }

  .menu {
    max-height: calc(var(--portal-height) - 250px)!important;
  }

  .info-box-container {
    left: 15px;
    max-width: calc(var(--portal-width) - 30px);
    right: 15px;
  }

  .info-box {
    padding-bottom: 75px;
  }

  .info-box-button--restart {
    bottom: 15px;
    font-size: 12px;
    height: auto;
    left: 15px;
    padding-inline: 10px;
    position: absolute;
    width: 150px;
  }

  .info-box-title {
    font-size: 20px;
  }

  .info-box-description {
    font-size: 16px;
  }

  .watermark {
    right: 30px;
  }
}

:global(.__eluvio-player--size-sm) {
  .info-box {
    align-items: flex-start;
    flex-direction: column;
    justify-content: flex-start;
    max-height: calc(var(--portal-height) - 125px);
    overflow-y: auto;
    padding: 50px 20px;
  }

  .info-box-title {
    font-size: 16px;
  }

  .info-box-headers,
  .info-box-description {
    font-size: 12px;
  }
}


/* Animations */

@keyframes fadein {
  from { opacity: 0; }
  to { opacity: 1; }
}
