@import url("/static/themes.css");


html,body{
  height: 100%;
  width: 100%;
  padding: 0;
  margin: 0;
  background: var(--color-background);
  color: var(--color-text);
}
/* General */
* {
  box-sizing: border-box;
}

svg{
  height: 100%;
  width: 100%;
}

.hide-btn{
  background: transparent;
  border: none;
  color: var(--color-text);
}

/*Layout*/
.content-wrapper{
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.content-header, .content-footer{
  flex: 0 1;
}

.content{
  flex: 1 0;
  overflow: auto;
}

/**/
.tab{
  display: none;
}

.tab.active{
  display: block;
}

.bottom-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;

  padding: 10px 12px;
  gap: 8px;

  background: var(--color-nav-bg);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--color-border);

  z-index: 1000;
}

/* Buttons als gleich große Tabs */
.bottom-nav button {
  flex: 1 1 0;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--color-text);

  padding: 12px 10px;
  border-radius: 12px;

  font: 600 14px/1.1 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  cursor: pointer;

  transition: background-color 160ms ease, color 160ms ease, transform 120ms ease;
}

/* Hover/Focus */
.bottom-nav button:hover {
  background: var(--color-hover);
  color: var(--color-text);
}

.bottom-nav button:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

/* Aktiver Tab */
.bottom-nav button.active {
  background: var(--color-active-bg);
  color: var(--color-text);
  box-shadow: 0 6px 20px var(--color-active-bg);
}

.bottom-nav button:active {
  transform: translateY(1px);
}

/* Animations */
@keyframes progress{
  0%{
    width: 30%;
    transform: translateX(0);
  }
  50%{
    width: 70%;
    transform: translateX(100%);
  }
  100%{
    width: 30%;
    transform: translateX(0);
  }
}

.bar-wrapper{
  display: flex;
  flex-direction: row;
}

.animation-loading{
  width:100%;
  min-height: 10px;
  overflow: hidden;
  position: relative;
}

.active .animation-loading .animation-loading-bar{
  animation: progress 5s infinite ease-in-out;
}

.animation-loading-bar{
  background-color: var(--color-primary);
  width: 0%;
  height: 10px;
}

.animation-progress{
  width: 100%;
}

.animation-progress-bar{
  min-height: 10px;
  width: var(--progress,0%);
  background: var(--color-primary);
}

#logviewer{
  display: none;
  max-height: 30vh;
  width: 100%;
  overflow: auto;
  padding: 5px;
}

#logviewer.expanded{
  display: block;
}

#logvieweropener{
  text-align: center;
  padding: 0;
  margin:0;
  font-size:0.8rem;
}

.margin-center{
  display: block;
  margin: auto;
}

/* Notifications */
.notifications {
  position: absolute;
  top: 0;
  right: 0;
  height:100%;
  width:100%;
  max-width: 200px;
  background: transparent;
  pointer-events: none;
}

.notification {
  width: 90%;
  margin: 5px 5%;
  background-color: var(--color-surface);
  padding: 5px;
  border-radius: 5px;
  position: relative;
  pointer-events: all;
  transform-origin: right;
  transform: scaleX(100%);
  transition: transform .5s ease;
}

.notification .close-btn{
  position: absolute;
  top: 0;
  right: 5px; 
}

.notification.close{
  transform: scaleX(0);
}

.notification.error{
  background: var(--color-error);
}

.notification.warning{
  background: var(--color-warning);
}

.notification.success{
  background: var(--color-success);
}

/* Lists */
.list-view > div{
  padding: 5px 10px;
  display: flex;
  align-content: center;
  justify-content: flex-end;
}

.list-view > div:nth-child(2n){
  background: var(--color-background-contrast);
}

.list-view > div span{
  flex: 1 1 0;
}

.list-view > div button{
  flex: 0 0 auto;
  align-self: anchor-center;
}

.list-view > div.dragenter{
  border-top: solid 5px var(--color-primary);
}

.list-view > div.dragenterdown{
  border-bottom: solid 5px var(--color-primary);
}

/* Modifications for Queue*/
.queue-item{
  border-top: solid 5px transparent;
  border-bottom: solid 5px transparent;
}

.queue-item.playing{
  color:var(--color-primary);
}

.queue-item button, .search-result button{
  padding: 0;
  height: 1.7rem;
  width: 1.7rem;
  margin: 0 5px;
}

#queue > div.dragging {
  opacity: 0.4;
}

/* Modifications for Search */
.list-view .song-info{
  flex: 1 1 0;
  align-self: anchor-center;
}

.list-view .song-info span{
  margin-right: 5px;
}

.list-view .title::after{
  margin-left: 5px;
  content: "---";
}

.list-view .duration::before{
  content: "(";
}

.list-view .duration::after{
  content: ")";
}

/* Settings */
#tab-settings #theme-btns button{
  background: var(--color-background);
  color: var(--color-primary);
  border: solid 3px var(--color-border);
  margin: 4px;
  padding: 5px 20px;
  border-radius: 25px;
}

/* Subsonic Login Modal */
.btn-outline{
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-border);
  border-radius: 25px;
  padding: 8px 18px;
  cursor: pointer;
  font: 600 14px/1.1 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.modal-overlay{
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  transition: opacity .2s ease;
}

.modal-overlay.active{
  display: flex;
  opacity: 1;
}

.modal-box{
  background: var(--color-surface);
  color: var(--color-text);
  width: 90%;
  max-width: 360px;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  transform: translateY(10px) scale(.98);
  transition: transform .2s ease;
}

.modal-overlay.active .modal-box{
  transform: translateY(0) scale(1);
}

.modal-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.modal-header h3{
  margin: 0;
  font-size: 1.1rem;
}

.modal-header .close{
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  opacity: .7;
}

.modal-header .close:hover{
  opacity: 1;
}

.modal-body{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-field{
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: .85rem;
  opacity: .85;
}

.modal-field input{
  background: var(--color-background);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 1rem;
  opacity: 1;
}

.modal-toggle{
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .9rem;
  cursor: pointer;
}

.modal-field-group{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ping-result{
  font-size: .85rem;
  min-height: 1.2em;
}

.ping-result.success{
  color: var(--color-success);
}

.ping-result.error{
  color: var(--color-error);
}

.modal-footer{
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.modal-footer button{
  flex: 1 1 0;
  border: none;
  border-radius: 10px;
  padding: 10px;
  font-weight: 600;
  cursor: pointer;
}

button:disabled{
  filter: brightness(50%);
}

.btn-primary{
  background: var(--color-primary);
  color: var(--color-background);
}

.btn-primary-svg{
  background: var(--color-background);
  color: var(--color-primary);
}

.btn-secondary{
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-cancel{
  background: transparent;
  color: var(--color-error);
}

.marquee{
  display: inline-block;
  width: max-content;
  padding-left: 0%;
  will-change: transform;
  animation: marquee var(--dur,5s) linear infinite;
}

@keyframes marquee{
  0%{
    transform: translateX(0);
  }
  40%{
    transform: translateX(0);
  }
  100%{
    transform: translateX(-100%);
  }
}

.player-view{
  background: transparent;
  display: flex;
  flex-direction: row;
  margin: 5px min(15px,5%);
  border-radius: 5px;
  box-shadow: var(--color-primary) 0 0 10px 0;
}

.player-view button{
  height: 80%;
  margin: 0 5px;
}

.player-view button.active{
  color: var(--color-primary);
}

.songInfo{
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  margin: 0.5rem;
  max-width: 20%;
  min-width: 20%;
  text-wrap: nowrap;
  overflow: hidden;
}

.songInfo div{
  min-height: 1em;
}

.songInfo .bottom{
  font-size: 0.75rem;
}

.player-split-h{
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  max-width: 700px;
  max-height: 100px;
}

.player-time{
  display: flex;
  flex-direction: row;
}

.player-time input[type="range"]{
  flex-grow: 1;
  margin: 0 5px;
}

.player-controls{
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  flex: 1 1 auto;
  max-height: 50px;
}

.player-controls button.play-control .svg-play{
  display: none;
}

.player-controls button.play-control .svg-pause{
  display: block;
}

.player-controls button.play-control.pause .svg-play{
  display: block;
}

.player-controls button.play-control.pause .svg-pause{
  display: none;
}

.player-buttons{
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  width: 20%;
  padding: 3px;
}

.player-view.expanded{
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  margin: 0;
  padding: 10px;
  width: 100vw;
  height: 100vh;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: var(--color-background);
}

.player-view.expanded #expandBtn{
  transform: rotate(180deg);
}

.player-view.expanded #playerimage{
  background-size: cover;
  background-position-x: 50%;
  flex: 1 1 auto;
  aspect-ratio: 1/1;
  max-height: 100vw;
}

@keyframes rotate {
  0%{
    transform: rotate(0deg);
  }

  100%{
    transform: rotate(360deg);
  }
}

.player-view.expanded #playerimage.round{
  border-radius: 50%;
  border: solid 3px var(--color-dominant);
  display: flex;
  justify-content: center;
  align-items: center;
  animation-play-state: paused;
  animation: rotate 15s linear infinite paused;
}

.player-view.expanded.playing #playerimage.round{
  animation-play-state: running;
}

.player-view.expanded #playerimage.round span{
  display: block;
  height: 50px;
  width: 50px;
  background: var(--color-background);
  border-radius: 50%;
  border: solid 3px var(--color-dominant);
}

.player-view.expanded .player-split-h{
  width: 90%;
}

.player-view.expanded .songInfo{
  font-size: 1.5rem;
  width: 75%;
  text-align: center;
  max-width: 75%;
}

.player-view.expanded .songInfo .bottom{
  font-size: 0.9rem;
}

.player-view.expanded .player-buttons{
  height: 7%;
  min-height: 30px;
}

/* Search */
#searchForm{
  display: flex;
  padding: 10px;
  margin: auto;
  width: 90%;
  max-width: 700px;
  border-radius: 20px;
  border: solid 3px var(--color-primary);
}


#searchForm input[type="text"]{
  outline: none;
  background: var(--color-background);
  color: var(--color-text);
  border: none;
  border-bottom: solid 3px currentColor;
  flex: 1 1 auto;
}

#searchForm input[type="text"]:focus{
  border-bottom-color: var(--color-primary);
}

#searchForm input, #searchForm select{
  border: none;
  background: transparent;
  color: var(--color-text);
}