.media-widget {
    display: flex;
    align-items: stretch;
    flex-direction: column;
    padding: 12px 18px 12px 16px;
    background-color: var(--search-background);
    border-radius: 35px;
    corner-shape: superellipse(1.5);
    border: 1px solid var(--glass-border);
    box-shadow: var(--sun-shadow-strong);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 149px;
}

.media-widget[style*="display: none"] {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
    height: 0;
}

.media-widget .app-icon-img {
    position: absolute;
    top: 18px;
    left: 20px;
    width: 28px;
    height: 28px;
    border-radius: 35%;
    z-index: 2;
    mix-blend-mode: luminosity;
    pointer-events: none;
    box-shadow: none;
    corner-shape: superellipse(1.25);
}

.media-widget-device {
    background: var(--overlay-color);
    z-index: 1;
    width: fit-content;
    padding: 4px 10px 4px 8px;
    border-radius: 20px;
    backdrop-filter: var(--edge-refraction-filter) saturate(2) blur(1px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--sun-shadow);
    position: absolute;
    top: 18px;
    right: 20px;
    font-size: 0.7em;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}

.media-widget-device .material-symbols-rounded {
    font-size: 16px;
}

#media-widget-art {
    width: 100%;
    height: 100%;
    position: fixed;
    left: 0;
    top: 0;
    object-fit: cover;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.15s cubic-bezier(.2, 1.3, .64, 1);
    mix-blend-mode: overlay;
    border-radius: inherit;
    corner-shape: inherit;
}

#media-widget-art:active {
    transform: scale(1.04);
    transition: transform 0.1s cubic-bezier(.2, 1.3, .64, 1);
    filter: brightness(1.5);
}

.media-widget-info {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    gap: 6px;
    flex-direction: column;
    margin: 55px 60px 8px 2px;
    z-index: 1;
    pointer-events: none;
}

.media-widget-info .title {
    font-weight: bold;
    font-family: 'Open Runde';
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-left: 4px;
    line-height: 1.25;
}

.media-widget-info .artist {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-left: 4px;
    line-height: 1.25;
}

.media-widget-progress-container {
    display: flex;
    align-items: center;
    padding: 0 68px;
    z-index: 1;
    box-sizing: border-box;
    position: fixed;
    bottom: 8px;
    pointer-events: none;
    justify-content: space-between;
    width: 100%;
    left: 0;
}

.media-widget-time {
    font-size: 10px;
    font-variant-numeric: tabular-nums;
    color: var(--secondary-text-color);
}

#media-widget-progress-bar {
    border-radius: 0;
    overflow: visible;
    margin: 0;
    box-shadow: none;
    border: none;
    flex-grow: 1;
    z-index: 1;
}

#media-widget-progress {
    width: 0%;
    height: 100%;
    background-color: var(--text-color);
    border-radius: 0;
    transition: width 0.2s ease;
    --wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 10'%3E%3Cpath d='M0,5 Q5,10 10,5 T20,5' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' /%3E%3C/svg%3E");
    -webkit-mask-image: var(--wave);
    mask-image: var(--wave);
    -webkit-mask-size: 15px 100%;
    mask-size: 15px 100%;
    -webkit-mask-repeat: repeat-x;
    mask-repeat: repeat-x;
    -webkit-mask-position: 0 center;
    mask-position: 0 center;
    animation: wave-move 1s linear infinite;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

@keyframes wave-move {
    0% {
        -webkit-mask-position: 0 center;
        mask-position: 0 center;
    }

    100% {
        -webkit-mask-position: -15px center;
        mask-position: -15px center;
    }
}

.media-widget-controls {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
}

.media-widget-controls button {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

#media-widget-play-pause {
    background: var(--overlay-color);
    backdrop-filter: var(--edge-refraction-filter) saturate(2) blur(1px);
    box-shadow: var(--sun-shadow);
    border: 1px solid var(--glass-border);
    width: 48px;
    height: 48px;
    border-radius: 25px;
    corner-shape: superellipse(1.5);
    color: var(--text-color);
    position: fixed;
    right: 22px;
    top: 64px;
}