yurba-ap {
    --y-ap-bg:     #ffffff;
    --y-ap-text:   #1c1c1e;
    --y-ap-muted:  rgba(0, 0, 0, .4);
    --y-ap-accent: #4e7cff;
    --y-ap-track:  rgba(0, 0, 0, .08);
    display: block;
    background: var(--y-ap-bg);
}

.y-ap {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--y-ap-bg);
    padding: 14px 16px;
}

.y-ap__info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.y-ap__info[hidden] {
    display: none;
}

.y-ap__cover {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    background: var(--y-ap-track);
}

.y-ap__cover[hidden] {
    display: none;
}

.y-ap__meta {
    flex: 1;
    min-width: 0;
}

.y-ap__author {
    font-size: 12px;
    color: var(--y-ap-muted);
    margin: 0 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.y-ap__title {
    font-size: 14px;
    font-weight: 700;
    color: var(--y-ap-text);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.y-ap__side-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.y-ap__popup-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.y-ap__popup {
    position: absolute;
    top: calc(100% + 8px);
    right: -8px;
    background: var(--y-ap-bg);
    border-radius: 10px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, .13);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity .15s, transform .15s;
    z-index: 10;
    overflow: hidden;
    width: max-content;
}

.y-ap__popup.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.y-ap__vol-popup {
    padding: 10px 14px;
}

.y-ap__slider--volume {
    width: 120px;
    display: block;
}

.y-ap__speed-popup.y-ap__popup {
    padding: 10px 14px;
}

.y-ap__slider--speed {
    width: 120px;
    display: block;
}

.y-ap__speed {
    font-size: 11px;
    font-weight: 600;
    color: var(--y-ap-muted);
    cursor: pointer;
    flex-shrink: 0;
    transition: color .15s;
    user-select: none;
    letter-spacing: .02em;
    min-width: 32px;
}

.y-ap__speed:hover {
    color: var(--y-ap-text);
}

.y-ap__btn {
    cursor: pointer;
    color: var(--y-ap-muted);
    display: flex;
    align-items: center;
    flex-shrink: 0;
    transition: color .15s;
}

.y-ap__btn:hover {
    color: var(--y-ap-text);
}

/* Controls */

.y-ap__player-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.y-ap__btn-prev,
.y-ap__btn-next {
    cursor: pointer;
    color: var(--y-ap-muted);
    display: flex;
    align-items: center;
    flex-shrink: 0;
    transition: color .15s;
}

.y-ap__btn-prev:hover,
.y-ap__btn-next:hover {
    color: var(--y-ap-text);
}

.y-ap__btn-prev[hidden],
.y-ap__btn-next[hidden] {
    display: none;
}

.y-ap__btn-prev .material-symbols-rounded,
.y-ap__btn-next .material-symbols-rounded {
    font-size: 22px;
    font-variation-settings: 'FILL' 1;
}

.y-ap__play {
    width: 40px;
    height: 40px;
    background: var(--y-ap-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    color: #ffffff;
    transition: opacity .15s;
}

.y-ap__play:hover {
    opacity: .85;
}

.y-ap__play .material-symbols-rounded {
    font-size: 24px;
    font-variation-settings: 'FILL' 1;
}

.y-ap__progress {
    display: flex;
    align-items: center;
    gap: 8px;
}

.y-ap__time {
    font-size: 11px;
    color: var(--y-ap-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    flex-shrink: 0;
}

.y-ap__track-wrap {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.y-ap__buffered {
    position: absolute;
    left: 0;
    height: 4px;
    background: rgba(0, 0, 0, .12);
    border-radius: 4px;
    width: 0;
    pointer-events: none;
}

.y-ap__icon {
    cursor: pointer;
    color: var(--y-ap-muted);
    display: flex;
    align-items: center;
    flex-shrink: 0;
    transition: color .15s;
}

.y-ap__icon:hover {
    color: var(--y-ap-text);
}

.y-ap__icon .material-symbols-rounded {
    font-size: 18px;
    font-variation-settings: 'FILL' 1;
}

.y-ap__slider {
    -webkit-appearance: none;
    appearance: none;
    background: var(--y-ap-track);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    height: 4px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.y-ap__slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 0;
    height: 0;
    background: var(--y-ap-accent);
    border-radius: 50%;
    border: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
    transition: width .15s, height .15s;
    position: relative;
    z-index: 1;
}

.y-ap__slider:hover::-webkit-slider-thumb {
    width: 14px;
    height: 14px;
}

.y-ap__slider::-moz-range-thumb {
    width: 0;
    height: 0;
    background: var(--y-ap-accent);
    border-radius: 50%;
    border: none;
    transition: width .15s, height .15s;
}

.y-ap__slider:hover::-moz-range-thumb {
    width: 14px;
    height: 14px;
}

.y-ap__slider--time {
    width: 100%;
}
