/* =========================================================
   ThetaSound Global Player v4
========================================================= */

body {
  padding-bottom: 104px;
}

/* Hide previous local players / old home player */
body.theta-global-player-enabled .theta-catalog-player,
body.theta-global-player-enabled .sticky-player,
body.theta-global-player-enabled .theta-player,
body.theta-global-player-enabled .theta-sticky-player,
body.theta-global-player-enabled #theta-player,
body.theta-global-player-enabled #sticky-player {
  display: none !important;
}

/* AJAX page transition */
.theta-global-page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  z-index: 100001;
  background: linear-gradient(90deg, #9be8ff, #b49cff);
  box-shadow: 0 0 18px rgba(155,232,255,.55);
  opacity: 0;
  transition: width .35s ease, opacity .2s ease;
}

.theta-global-page-loader.is-loading {
  width: 68%;
  opacity: 1;
}

.theta-global-page-loader.is-done {
  width: 100%;
  opacity: 0;
}

main.theta-main {
  transition: opacity .22s ease, transform .22s ease;
}

body.theta-page-transition main.theta-main {
  opacity: .2;
  transform: translateY(8px);
}

.theta-global-player {
  position: fixed;
  left: 24px;
  right: 24px;
  bottom: 22px;
  z-index: 99999;
  display: grid;
  grid-template-columns: 58px minmax(150px,1fr) auto auto auto minmax(240px,2fr) 128px auto auto auto auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 0% 0%, rgba(155,232,255,.10), transparent 34%),
    rgba(8,8,14,.88);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow:
    0 34px 120px rgba(0,0,0,.72),
    0 0 44px rgba(155,232,255,.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transform: translateY(130%);
  opacity: 0;
  pointer-events: none;
  transition: transform .35s ease, opacity .35s ease, width .25s ease, left .25s ease;
}

.theta-global-player.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.theta-global-player-cover-link {
  display: block;
  text-decoration: none;
  border-radius: 14px;
}

.theta-global-player-cover {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  background: #111 center/cover no-repeat;
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 10px 28px rgba(0,0,0,.45);
  transition: .25s ease;
}

.theta-global-player-cover-link:hover .theta-global-player-cover {
  border-color: rgba(155,232,255,.50);
  box-shadow:
    0 10px 28px rgba(0,0,0,.45),
    0 0 24px rgba(155,232,255,.18);
}

.theta-global-player-info {
  min-width: 0;
}

.theta-global-player-info strong {
  display: block;
  color: #fff !important;
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.theta-global-player-info span {
  display: block;
  margin-top: 4px;
  color: #aeb0c2 !important;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.theta-global-player-btn,
.theta-global-player-main,
.theta-global-player-close {
  border: 1px solid rgba(155,232,255,.35);
  background: rgba(255,255,255,.045);
  color: #fff;
  cursor: pointer;
  transition: .25s ease;
}

.theta-global-player-btn {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  font-size: 22px;
  line-height: 1;
}

.theta-global-player-main {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  font-size: 15px;
}

.theta-global-player-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  border-color: rgba(255,255,255,.18);
}

.theta-global-player-btn:hover,
.theta-global-player-main:hover,
.theta-global-player-close:hover {
  border-color: rgba(155,232,255,.85);
  color: #9be8ff;
  box-shadow: 0 0 24px rgba(155,232,255,.18);
}

/* Legacy progress hidden; waveform is the active seekbar */
.theta-global-player-progress {
  display: none !important;
}

.theta-global-waveform {
  position: relative;
  height: 44px;
  border-radius: 14px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 0%, rgba(155,232,255,.10), transparent 55%),
    rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.10);
  cursor: pointer;
}

.theta-global-waveform canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: .68;
}

.theta-global-waveform-progress {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: linear-gradient(90deg, rgba(155,232,255,.26), rgba(180,156,255,.18));
  mix-blend-mode: screen;
  pointer-events: none;
}

.theta-global-volume {
  display: flex;
  align-items: center;
  gap: 9px;
}

.theta-global-volume-btn {
  width: 38px;
  height: 38px;
  font-size: 14px;
}

.theta-global-volume input[type="range"] {
  width: 84px;
  accent-color: #9be8ff;
}

.theta-global-player-time {
  color: #aeb0c2 !important;
  font-size: 12px;
  min-width: 42px;
}

.theta-global-minimize {
  width: 38px;
  height: 38px;
  font-size: 16px;
}

.theta-is-playing .theta-track-row-play,
.theta-is-playing .theta-track-play {
  color: #9be8ff !important;
  border-color: rgba(155,232,255,.85) !important;
  box-shadow: 0 0 24px rgba(155,232,255,.18);
}

/* Compact mode */
.theta-global-player.is-minimized {
  left: auto;
  right: 24px;
  bottom: 22px;
  width: min(420px, calc(100vw - 48px));
  grid-template-columns: 46px 1fr auto auto;
  gap: 10px;
  border-radius: 22px;
}

.theta-global-player.is-minimized .theta-global-player-cover,
.theta-global-player.is-minimized .theta-global-player-cover-link {
  width: 46px;
  height: 46px;
}

.theta-global-player.is-minimized #theta-global-prev,
.theta-global-player.is-minimized #theta-global-next,
.theta-global-player.is-minimized .theta-global-waveform,
.theta-global-player.is-minimized .theta-global-volume,
.theta-global-player.is-minimized .theta-global-player-time,
.theta-global-player.is-minimized .theta-global-player-close {
  display: none !important;
}

.theta-global-player.is-minimized #theta-global-minimize {
  transform: rotate(180deg);
}

.theta-global-player.is-minimized .theta-global-player-main {
  width: 44px;
  height: 44px;
}

@media (max-width: 900px) {
  body {
    padding-bottom: 92px;
  }

  .theta-global-player {
    left: 12px;
    right: 12px;
    bottom: 12px;
    grid-template-columns: 48px 1fr auto auto;
    gap: 10px;
    padding: 12px;
    border-radius: 20px;
  }

  .theta-global-player-cover,
  .theta-global-player-cover-link {
    width: 48px;
    height: 48px;
    border-radius: 12px;
  }

  .theta-global-player-info strong {
    font-size: 13px;
  }

  .theta-global-player-info span {
    font-size: 11px;
  }

  .theta-global-player-btn:not(#theta-global-minimize),
  .theta-global-waveform,
  .theta-global-volume,
  .theta-global-player-time,
  #theta-global-minimize {
    display: none !important;
  }

  .theta-global-player-main {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  .theta-global-player-close {
    width: 32px;
    height: 32px;
  }
}


/* =========================================================
   v4 Queue
========================================================= */

.theta-global-queue-btn {
  width: 38px;
  height: 38px;
  font-size: 18px;
}

.theta-global-queue {
  position: absolute;
  right: 14px;
  bottom: calc(100% + 14px);
  width: min(420px, calc(100vw - 48px));
  max-height: 460px;
  overflow: hidden;
  border-radius: 22px;
  background:
    radial-gradient(circle at 0% 0%, rgba(155,232,255,.12), transparent 36%),
    rgba(8,8,14,.96);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 30px 100px rgba(0,0,0,.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: .25s ease;
}

.theta-global-queue.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.theta-global-queue-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 16px 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.theta-global-queue-head strong {
  color: #fff !important;
  font-size: 13px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.theta-global-queue-head button {
  border: 1px solid rgba(155,232,255,.22);
  background: rgba(255,255,255,.04);
  color: #9be8ff;
  border-radius: 999px;
  padding: 7px 12px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.theta-global-queue-list {
  max-height: 386px;
  overflow-y: auto;
  padding: 10px;
}

.theta-global-queue-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 9px;
  border-radius: 14px;
  cursor: pointer;
  transition: .22s ease;
}

.theta-global-queue-item:hover,
.theta-global-queue-item.is-active {
  background: rgba(155,232,255,.08);
}

.theta-global-queue-cover {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #111 center/cover no-repeat;
}

.theta-global-queue-info {
  min-width: 0;
}

.theta-global-queue-info strong {
  display: block;
  color: #fff !important;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.theta-global-queue-info span {
  display: block;
  color: #aeb0c2 !important;
  font-size: 11px;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.theta-global-queue-remove {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.68);
  cursor: pointer;
}

.theta-add-to-queue {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 5;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(155,232,255,.48);
  background: rgba(3,3,5,.72);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(8px);
  opacity: 0;
  transform: translateY(8px);
  transition: .25s ease;
}

[data-audio]:hover .theta-add-to-queue {
  opacity: 1;
  transform: translateY(0);
}

.theta-add-to-queue.is-added {
  color: #9be8ff;
  border-color: rgba(155,232,255,.9);
  box-shadow: 0 0 24px rgba(155,232,255,.18);
}

.theta-global-player.is-minimized .theta-global-queue-btn,
.theta-global-player.is-minimized .theta-global-queue {
  display: none !important;
}

@media (max-width: 900px) {
  .theta-global-queue-btn,
  .theta-global-queue {
    display: none !important;
  }

  .theta-add-to-queue {
    opacity: 1;
    transform: none;
    width: 34px;
    height: 34px;
  }
}
