/* Import the font */
@import url('https://fonts.googleapis.com/css2?family=Lato&display=swap');

/* --- GLOBAL SCOPED RESET --- */
.player-wrapper * {
    box-sizing: border-box;
}

/* --- MAIN WRAPPER --- */
.player-wrapper {
    background-image: linear-gradient(0deg, rgba(247, 247, 247, 1) 23.8%, rgba(252, 221, 221, 1) 92%);
    padding: 50px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Lato', sans-serif;
    width: 100%;
    max-width: 100%;
    margin: 20px auto;
    border-radius: 10px;
}

/* --- MUSIC PLAYER WIDGET --- */
.music-container {
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 20px 20px 0 rgba(252, 169, 169, 0.6);
    display: flex;
    /* CHANGED: The main container is now always a column */
    flex-direction: column; 
    align-items: center;
    padding: 20px 30px;
    position: relative;
    margin: 20px 0;
    z-index: 10;
    width: 100%;
}

.img-container {
    /* No longer needs absolute positioning context */
    position: relative;
    width: 110px;
    height: 110px;
    margin-bottom: 20px; /* Always have a margin below the image */
}

.img-container img {
    border-radius: 50%;
    object-fit: cover;
    height: 100%; /* Fill the container */
    width: 100%;
    max-width: none;
    padding: 0;
    margin: 0;
    border: none;
    box-shadow: none;
}

/* --- UPDATED: Music Info Styles for Expand/Collapse Animation --- */
.music-info {
    /* REMOVED: No longer absolutely positioned */
    width: 100%;
    text-align: center;
    
    /* HIDE BY DEFAULT using max-height and opacity */
    max-height: 0;
    opacity: 0;
    overflow: hidden; /* Crucial for the max-height trick */
    
    /* DEFINE THE TRANSITION for a smooth animation */
    transition: max-height 0.5s ease-out, opacity 0.3s ease-in, margin-top 0.5s ease-out;
}

/* SHOW when the player has the 'play' class */
.music-container.play .music-info {
    max-height: 100px; /* Expand to a height large enough for the content */
    opacity: 1;
    margin-top: -10px; /* Optional: Pulls it a bit closer to the image */
    margin-bottom: 15px; /* Push the controls down */
}

.music-info h4 {
    margin: 0 0 5px 0;
    line-height: 1.2;
    font-size: 16px;
}

.progress-container {
    background: #e4e4e4;
    border-radius: 5px;
    cursor: pointer;
    margin: 10px 0 2px;
    height: 4px;
    width: 100%;
}

.progress {
    background-color: #fe8daa;
    border-radius: 5px;
    height: 100%;
    width: 0%;
    transition: width 0.1s linear;
}

.time-container {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #555;
}

/* --- Navigation & Controls --- */
.navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    width: 100%; /* Take full width for better spacing */
}

.action-btn {
    background-color: transparent; /* Cleaner look */
    border: 0;
    color: #dfdbdf;
    font-size: 20px;
    cursor: pointer;
    padding: 10px;
    margin: 0 20px;
    border-radius: 0;
    box-shadow: none;
    line-height: 1;
}

.action-btn.action-btn-big {
    color: #cdc2d0;
    font-size: 30px;
}

.action-btn:focus {
    outline: 0;
    box-shadow: none;
}


/* --- PLAYLIST (No changes needed here) --- */
.playlist-container {
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 20px 20px 0 rgba(252, 169, 169, 0.6);
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
}
/* ... all other playlist styles remain the same ... */

#playlist { list-style-type: none; padding: 0; margin: 0; }
#playlist li { padding: 12px 15px; cursor: pointer; border-bottom: 1px solid #f0f0f0; transition: background-color 0.2s ease-in-out; display: flex; justify-content: space-between; align-items: center; margin: 0; list-style: none; background: none; }
#playlist li:last-child { border-bottom: none; }
#playlist li:hover { background-color: #f5f5f5; }
#playlist li.playing { background-color: #fe8daa; color: #fff; font-weight: bold; }

/* --- RESPONSIVE STYLES (Simplified) --- */
/* The player is now naturally vertical, so fewer mobile overrides are needed */
@media (max-width: 600px) {
    .player-wrapper {
        padding: 20px 10px;
    }

    .music-container {
        padding: 20px;
    }

    .img-container {
        width: 150px;
        height: 150px;
    }
}


/* ... at the end of css/music-player-style.css ... */

/* --- AD WIDGET AREA STYLES --- */

/* Styling for the top and bottom ad containers */
.wmp-ad-widget-area {
    padding: 15px;
    margin-bottom: 15px;
    text-align: center;
    background-color: #f0f0f0; /* Light grey background to distinguish it */
    border-radius: 10px;
}

.wmp-ad-widget-area.wmp-ad-bottom {
    margin-top: 15px;
    margin-bottom: 0;
}

/* Styling for the ads injected into the playlist */
.playlist-ad {
    padding: 10px !important;
    cursor: default !important;
    background-color: #f7f7f7 !important;
    border-bottom: 1px solid #ddd !important;
    display: block !important; /* Override flex properties */
}

/* Make sure anything inside a widget behaves well */
.wmp-ad-widget-area .widget,
.playlist-ad .widget {
    margin: 0;
    padding: 0;
}

/* Ensure images from ads are responsive */
.wmp-ad-widget-area img,
.playlist-ad img {
    max-width: 100%;
    height: auto;
}

