/**
 * myMediaCaster Phoenix Styles
 */

/* Global Reset and Font Fix */
* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: #fff;
  font-family: 'Roboto', 'Helvetica', 'Arial', sans-serif;
}

/* MDL Layout fixes */
.demo-layout.mdl-layout {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.mdl-layout__content {
  display: flex !important;
  flex-direction: column;
  height: 100%;
  width: 100%;
  position: relative;
  overflow: hidden;
}

/* 
 * CRITICAL: Hide un-upgraded MDL elements to prevent the "dump" layout
 */
.mdl-layout__drawer:not(.is-upgraded),
.mdl-menu__container:not(.is-upgraded),
.mdl-layout__header:not(.is-upgraded) {
    display: none !important;
}

/* Drawer Header Styling */
.demo-drawer-header {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  height: 151px;
}

.demo-avatar {
  width: 48px;
  height: 48px;
  border-radius: 24px;
  margin-bottom: 16px;
}

.demo-navigation .mdl-navigation__link {
  display: flex !important;
  align-items: center;
  color: rgba(255, 255, 255, 0.56) !important;
  font-weight: 500;
  padding: 16px 40px !important;
}

.demo-navigation .mdl-navigation__link:hover {
  background-color: #00BCD4 !important;
  color: #37474F !important;
}

.demo-navigation .mdl-navigation__link .material-icons {
  margin-right: 32px;
}

/* Logo Bar (Top) */
.folded-menu {
  flex: 0 0 48px;
  height: 48px;
  background-color: #F2F2F2;
  border-bottom: 1px solid #CCCCCC;
  display: flex;
  align-items: center;
  z-index: 5;
  padding-left: 10px;
}

/* Layout Area between Logo Bar and Footer */
.main-content-area {
  display: flex;
  flex-direction: row;
  overflow: hidden;
  width: 100%;
  flex: 1; /* Take all remaining vertical space */
}

/* Video Player Panel */
.video-player-panel {
  flex: 1;
  background-color: #000;
  position: relative;
  overflow: hidden;
  display: flex;
}

.media-player-holder {
  width: 100%;
  height: 100%;
  display: flex;
}

iframe#player1 {
  width: 100%;
  height: 100%;
  border: none;
}

/* Playlist/Queue Panel */
.playlist-panel {
  flex: 0 0 320px;
  width: 320px;
  border-left: 1px solid #B6B4B6;
  background-color: #fff;
  z-index: 4;
  display: flex;
  flex-direction: column;
  height: 100%; /* Fill main-content-area height */
}

.tab-bar-queue {
  flex: 0 0 50px; /* Fixed height */
  height: 50px;
  display: flex;
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
  align-items: stretch;
  background-color: #fff;
}

.tab-label {
  flex: 1;
  text-align: center;
  text-transform: uppercase;
  font-size: 13px;
  font-weight: bold;
  color: #4D4D4D;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 2px solid transparent;
}

.tab-label.selected {
  border-bottom: 2px solid rgb(64,196,255);
  color: #212121;
}

.queue-items-container {
  flex: 1; /* Take remaining vertical space in side panel */
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.queue-toolbar {
  flex: 0 0 48px; /* Fixed height */
  height: 48px;
  padding: 0 16px;
  border-bottom: 1px solid #E0E0E0;
  display: flex;
  align-items: center;
  background-color: #fff;
}

.queue-toolbar button {
    text-transform: uppercase;
    font-size: 13px;
    font-weight: 500;
    color: #424242;
    padding: 0;
    min-width: 0;
}

.queue-toolbar .material-icons {
    margin-right: 8px;
}

#queue-list-container {
  overflow-y: auto;
  flex: 1;
  background-color: #fff;
}

/* Queue Items UI */
.queue-item {
  padding: 12px 16px;
  border-bottom: 1px solid #EEEEEE;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.queue-item:hover {
  background-color: #F5F5F5;
}

.queue-albumn-art {
    width: 40px;
    height: 40px;
    min-width: 40px;
    margin-right: 16px;
    background-color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    overflow: hidden;
}

.queue-albumn-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.queue-item-part {
  flex: 1;
  overflow: hidden;
}

.media-name {
  font-size: 14px;
  font-weight: 500;
  color: #424242;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-author {
  font-size: 12px;
  color: #757575;
}

.media-duration {
  font-size: 12px;
  color: #757575;
  margin-left: 12px;
}

/* Fixed Footer Toolbar */
.footer-toolbar {
  flex: 0 0 80px; /* Fixed height */
  height: 80px;
  background-color: #F2F2F2;
  box-shadow: 0 -1px 3px rgba(0,0,0,.12);
  display: flex !important;
  align-items: center;
  padding: 0 24px;
  z-index: 10;
  position: relative;
}

.footer-toolbar .item {
  flex: 1;
  display: flex;
  align-items: center;
}

.main-media-controls {
  justify-content: center;
  gap: 16px;
}

.right-media-controls {
  justify-content: flex-end;
  gap: 8px;
}

.media-info {
  display: flex;
  align-items: center;
  max-width: 100%;
  overflow: hidden;
}

.media-info img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  margin-right: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.media-info-text {
  overflow: hidden;
}

.media-info-text .title {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #212121;
  font-size: 14px;
}

.media-info-text .author {
  font-size: 12px;
  color: #616161;
}

/* SeekBar */
#track-range {
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 11;
  padding: 0;
}

/* Main Logo Styling */
#main-logo {
  margin-left: 10px;
  font-size: 18px;
  color: #606060;
  cursor: default;
  display: flex;
  align-items: center;
}

#main-logo em {
  font-style: normal;
  background: #606060;
  color: #fff;
  padding: 0 5px;
  border-top-left-radius: 4px;
}

#main-logo strong {
  background: #606060;
  color: #fff;
  padding: 0 2px;
}

#main-logo span {
  background: rgb(64,196,255);
  color: #000;
  padding: 0 5px;
  border-bottom-right-radius: 4px;
}

/* HUD Overlay */
#messages {
  position: absolute;
  top: 10px;
  left: 0px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  padding: 10px;
  z-index: 5;
  font-family: monospace;
  font-size: 11px;
  width: 300px;
  font-weight: bold;
}

#messages span {
    font-weight: normal;
}

/* Utility */
.visuallyhidden {
  position: absolute;
  overflow: hidden;
  clip: rect(0 0 0 0);
  height: 1px; width: 1px;
  margin: -1px; padding: 0; border: 0;
}

/* Fix for File Input */
#frmAddFile {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  opacity: 0;
}

#fileInput {
  width: 100%; height: 100%;
  cursor: pointer;
}

.material-icons {
    font-family: 'Material Icons' !important;
}

.flex-grow-1 {
    flex-grow: 1;
}
