/* mp3player.css */

.mp3-player {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #ffffff;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    max-width: 100%; /* Ensures the player doesn't exceed the screen width */
    flex-wrap: nowrap;
}

.mp3-player button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
    color: #333;
    padding: 0 10px;
    width: 40px; /* Fixed width to prevent shifting */
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.mp3-player button:focus {
    outline: none;
}

.mp3-player span {
    min-width: 50px;
    text-align: center;
}

.seek-bar {
    flex: 1;
    appearance: none;
    height: 5px;
    background: #ddd;
    border-radius: 5px;
    cursor: pointer;
    position: relative;
    width: 100%; /* Allow seek bar to take up available space */
}

.seek-bar::-webkit-slider-thumb {
    appearance: none;
    width: 10px;
    height: 10px;
    background: #333;
    border-radius: 50%;
    position: relative;
    z-index: 2;
}

.seek-bar::-moz-range-thumb {
    width: 10px;
    height: 10px;
    background: #333;
    border-radius: 50%;
    position: relative;
    z-index: 2;
}

.seek-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: var(--seek-progress, 0%);
    height: 100%;
    background: #333;
    border-radius: 5px;
    z-index: 1;
}

.volume-slider-container {
    position: absolute;
    bottom: 40px; /* Position above the volume button */
    right: 10px; /* Adjust to fit within the container */
    width: 100px; /* Adjust width as needed */
    height: 30px; /* Adjust height as needed */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff; /* Ensure background color to make it visible */
    border: 1px solid #ddd; /* Border to make it visible */
    padding: 5px; /* Padding for aesthetics */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Subtle shadow for better visibility */
    z-index: 3; /* Ensure it's on top */
}

.volume-slider {
    appearance: none;
    width: 100%; /* Full width */
    height: 5px;
    background: #ddd;
    border-radius: 5px;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    appearance: none;
    width: 10px;
    height: 10px;
    background: #333;
    border-radius: 50%;
}

.volume-slider::-moz-range-thumb {
    width: 10px;
    height: 10px;
    background: #333;
    border-radius: 50%;
}

.volume-slider::-ms-thumb {
    width: 10px;
    height: 10px;
    background: #333;
    border-radius: 50%;
}

.volume-slider::-webkit-slider-runnable-track {
    background: #ddd;
    border-radius: 5px;
}

.volume-slider::-moz-range-track {
    background: #ddd;
    border-radius: 5px;
}

.volume-slider::-ms-track {
    background: #ddd;
    border-radius: 5px;
    border: none;
    color: transparent;
}
