/* ================================
   PLAYER DE MÚSICA (LAYOUT NORMAL)
================================ */

.music-player {
  position: fixed;
  top: 10px;     /* distância do topo */
  left: 10px;    /* distância da esquerda */
  transform: none;
  width: 22%; /* controla o tamanho do retângulo em % */
  max-width: 260px; /* controla o tamanho do retângulo */
  border: 2px solid rgba(255, 140, 0, 0.5);
  backdrop-filter: blur(8px);
  padding: 1px 4px;
  border-radius: 10px;
  color: #000000;
  background: linear-gradient(transparent 51%, rgba(255, 255, 255, 0.836) 40%);
  display: flex;
  gap: 8px;
  z-index: 9999;
}

/* CAPA lateral */
.player-cover {
  width: 50px;
  height: 60px;
  border-radius: 10px;
  object-fit: cover;
}

.player-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* BOTÕES SUPERIORES */
.player-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.player-btn {
  background: rgba(255, 255, 255, 0.685);
  border: 1px solid orange;
  padding: 4px 6px;
  border-radius: 8px;
  color: rgb(0, 0, 0);
  font-size: 15px;
  cursor: pointer;
  transition: 0.3s;
}

.player-btn:hover {
  background: rgba(255, 140, 0, 0.35);
}


/* BOTÃO - MUDO*/
#mute-btn {
  font-size: 10px;
  padding: 8px 10px;
}

#volume-bar {
  width: 50px;
  cursor: pointer;
}

/* INFERIOR: TÍTULO E PROGRESSO */
.player-bottom {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  width: 100%;
}

#music-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#progress-bar {
  width: 100%;
  cursor: pointer;
  margin-top: 4px;
}

/* BOTÃO POPUP */
.popup-player-btn {
  background: rgba(255, 255, 255, 0.452);
  border: 1px solid orange;
  color: rgb(0, 0, 0);
  font-size: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s;
  margin-left: 4px; /* espaço entre a barra de volume e o botão ampliar */
}

.popup-player-btn:hover {
  background: rgba(255,140,0,0.35);
}

/* REMOVE A CAPA SOMENTE DO PLAYER NORMAL */
body:not(.popup-player) .music-player .player-cover {
    display: none !important;
}

/* ================================
   PLAYER NO POPUP (LAYOUT VERTICAL)
================================ */

.popup-player .music-player {
    position: relative !important;
    left: 0 !important;
    bottom: 0 !important;
    transform: none !important;

    width: 100% !important;
    max-width: 100% !important;

    border-radius: 14px !important;
    margin-top: 10px !important;

    padding: 20px !important;

    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;

    gap: 15px !important;
    overflow: hidden !important;
}

/* CAPA CENTRALIZADA */
.popup-player .player-cover {
    width: 140px !important;
    height: 160px !important;
    margin-bottom: 10px !important;
    border-radius: 12px !important;
}

/* BLOCO DA DIREITA FICA CENTRALIZADO */
.popup-player .player-right {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

/* CONTROLES CENTRALIZADOS */
.popup-player .player-controls {
    width: 100% !important;
    justify-content: center !important;
    gap: 12px !important;
    margin-top: 5px !important;
}

/* TÍTULO E PROGRESSO CENTRALIZADOS */
.popup-player .player-bottom {
    width: 90% !important;
    text-align: center !important;
    margin-top: 10px !important;
}

.popup-player #progress-bar {
    width: 100% !important;
}

.popup-player #volume-bar {
    width: 110px !important;
}

/* CORREÇÕES POPUP */
.popup-player .music-player {
    box-sizing: border-box !important;
    overflow-x: hidden !important;
}

/* ESCONDE O BOTÃO DE POPUP NO PRÓPRIO POPUP */
.popup-player .popup-player-btn {
    display: none !important;
}

/* ==============================
   CELULAR — PLAYER COMPACTO
============================== */
@media (max-width: 600px) {

    .music-player {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;

        padding: 6px 10px !important;
        gap: 10px !important;

        width: 100% !important;
        max-width: 70% !important;   /* 🔹 NÃO TAMPA O MENU */
        height: auto !important;
        left: 2px !important;       /* mantém à esquerda */
        border-radius: 10px !important;
    }

    .player-cover {
        width: 55px !important;
        height: 55px !important;
        border-radius: 10px !important;
        margin: 0 !important;
    }

    #volume-bar {
        display: none !important;
    }

    #mute-btn {
        display: block !important;
    }

    .popup-player-btn {
        display: none !important;
    }

    .player-btn {
        padding: 6px 8px !important;
        font-size: 14px !important;
        border-radius: 6px !important;
    }

    .player-controls {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 6px !important;
        margin: 0 !important;
        padding: 0 !important;
        width: auto !important;
    }

    .player-right {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        width: 100% !important;
        gap: 4px !important;
    }

    #music-title {
        font-size: 13px !important;
        margin: 0 !important;
        text-align: left !important;
        width: 100% !important;
    }

    #progress-bar {
        width: 100% !important;
        margin: 0 !important;
    }

    .player-bottom {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}

/* BOTÃO INICIAL DO PLAYER */
.player-start {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid orange;
    backdrop-filter: blur(8px);
    color: #fff;
    padding: 12px 18px;
    border-radius: 14px 14px 0 0;
    font-size: 18px;
    cursor: pointer;
    z-index: 999999; /* fica sempre por cima */
}

#header {
    top: 35px !important;   /* 🔹 Ajuste aqui a posição vertical do menu */
}


/* Quando o popup estiver ativo, o botão some */
body.popup-player .player-start {
    display: none;
}