/* Core player layout (default widget) */
.player-wrapper {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    background: var(--main-color, #69456a);
}

/* Fit media container */
.media-container {
    width: 100%;
}

.media-container video,
.media-container audio,
#media-image {
    display: block;
    width: 100%;
    height: auto;
}

/* List styling */
.media-list {
    list-style: none;
    padding: 0;
    margin-top: 0px;
    margin-bottom: 0px;
    background: #f2f2f2;
    border-top: 1px solid #ccc;
}

/* Keep selector at bottom on small screens */
.media-list li {
    padding: 10px;
    border-bottom: 1px solid #ccc;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.media-list li:hover {
    background: #eaeaea;
}

.media-list li.active {
    background: #ddd;
}

.media-image {
    max-width: 100%;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

/* Controls */
.player-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    background: var(--main-color, #69456a);
    color: white;
    flex-wrap: wrap;
}

.player-controls button {
    background: none;
    border: none;
    color: white;
    padding: 5px 10px;
    margin: 0 5px;
    font-size: 16px;
    cursor: pointer;
}

.player-controls button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.player-controls input[type=range] {
    margin: 0 15px;
}

/* Container wraps controls/list */
.container {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.fullscreen {
    overflow: visible !important;
}

input[type=range]{
    -webkit-appearance: none;
}

input[type=range]::-webkit-slider-runnable-track {
    width: 300px;
    height: 5px;
    background: #ddd;
    border: none;
    border-radius: 3px;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    border: none;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: white;
    margin-top: -5.5px;
}

input[type=range]:focus {
    outline: none;
}

input[type=range]:focus::-webkit-slider-runnable-track {
    background: #ccc;
}

/* Popup mode overrides */
.player-popup .player-wrapper {
    border-radius: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.player-popup .media-container {
    position: relative;
    padding-top: 56.25%; /* 16:9 */
    flex: 0 0 auto;
}

.player-popup .media-container video,
.player-popup .media-container audio,
.player-popup #media-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-popup .container {
    flex: 1 1 auto;
}
