/* ==========================================================
   Zagreen Theme Song — Player Widget CSS
   Dark · Futuristic · Menyatu dengan theme WordPress
========================================================== */

/* ---- Outer container ---- */
.zgts-player {
    background: linear-gradient(160deg, #0a0e1a 0%, #0d1425 60%, #080c18 100%);
    border: 1px solid rgba(0, 212, 255, 0.18);
    border-radius: 14px;
    padding: 18px 16px 14px;
    position: relative;
    overflow: hidden;
    font-family: inherit;
    box-shadow:
        0 0 0 1px rgba(0,212,255,0.06),
        inset 0 1px 0 rgba(255,255,255,0.04);
}

/* Decorative corner accent */
.zgts-player::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 60px; height: 60px;
    background: conic-gradient(from 135deg, transparent 45deg, rgba(0,212,255,0.12) 90deg, transparent 135deg);
    border-top-left-radius: 14px;
    pointer-events: none;
}
.zgts-player::after {
    content: '';
    position: absolute;
    bottom: 0; right: 0;
    width: 40px; height: 40px;
    background: conic-gradient(from -45deg, transparent 45deg, rgba(120,0,255,0.1) 90deg, transparent 135deg);
    border-bottom-right-radius: 14px;
    pointer-events: none;
}

/* ---- Visualizer ---- */
.zgts-visualizer {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    height: 32px;
    margin-bottom: 14px;
}

.zgts-bar {
    width: 3px;
    height: 4px;
    border-radius: 2px;
    background: rgba(0, 212, 255, 0.3);
    transition: height 0.1s ease;
}

.zgts-player.is-playing .zgts-bar {
    animation: zgtsBar var(--dur, 0.8s) ease-in-out infinite alternate;
    background: linear-gradient(to top, rgba(0,212,255,0.9), rgba(120,0,255,0.6));
}

@keyframes zgtsBar {
    from { height: 3px; }
    to   { height: var(--peak, 22px); }
}

/* ---- Song info row ---- */
.zgts-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

/* Spinning vinyl disc */
.zgts-disc {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: conic-gradient(
        #0d1a2e 0deg, #1a2a4a 60deg,
        #0a0e1a 120deg, #1e3050 180deg,
        #0d1a2e 240deg, #152235 300deg, #0d1a2e 360deg
    );
    border: 2px solid rgba(0,212,255,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.zgts-player.is-playing .zgts-disc {
    animation: zgtsSpin 4s linear infinite;
}

@keyframes zgtsSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.zgts-disc-inner {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #0a0e1a;
    border: 1.5px solid rgba(0,212,255,0.4);
    box-shadow: 0 0 6px rgba(0,212,255,0.3);
}

/* Song meta */
.zgts-meta { flex: 1; min-width: 0; }

.zgts-song-name {
    margin: 0 0 2px;
    font-size: 14px;
    font-weight: 600;
    color: #e0f4ff;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.zgts-artist {
    margin: 0;
    font-size: 11px;
    color: rgba(0,212,255,0.65);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ---- Progress ---- */
.zgts-progress-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.zgts-time-cur,
.zgts-time-dur {
    font-size: 10px;
    color: rgba(0,212,255,0.55);
    font-variant-numeric: tabular-nums;
    min-width: 28px;
    letter-spacing: 0.5px;
}
.zgts-time-dur { text-align: right; }

.zgts-progress-track {
    flex: 1;
    height: 4px;
    background: rgba(0,212,255,0.12);
    border-radius: 2px;
    position: relative;
    cursor: pointer;
    outline: none;
}

.zgts-progress-track:focus-visible {
    box-shadow: 0 0 0 2px rgba(0,212,255,0.5);
}

.zgts-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(to right, rgba(0,212,255,0.9), rgba(120,0,255,0.8));
    border-radius: 2px;
    transition: width 0.25s linear;
    pointer-events: none;
}

.zgts-progress-thumb {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #00d4ff;
    box-shadow: 0 0 6px rgba(0,212,255,0.7);
    pointer-events: none;
    transition: left 0.25s linear;
}

/* ---- Controls ---- */
.zgts-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 14px;
}

.zgts-btn {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    color: rgba(0,212,255,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, transform 0.15s;
    outline: none;
    line-height: 1;
}

.zgts-btn:hover,
.zgts-btn:focus-visible { color: #00d4ff; }
.zgts-btn:active { transform: scale(0.92); }

.zgts-btn svg { display: block; }

.zgts-btn-play {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0,212,255,0.08);
    border: 1.5px solid rgba(0,212,255,0.3) !important;
    color: #00d4ff;
}

.zgts-btn-play:hover,
.zgts-btn-play:focus-visible {
    background: rgba(0,212,255,0.15);
    border-color: rgba(0,212,255,0.6) !important;
    box-shadow: 0 0 12px rgba(0,212,255,0.25);
}

.zgts-btn-play svg { width: 18px; height: 18px; }
.zgts-btn-vol svg, .zgts-btn-lyric svg { width: 20px; height: 20px; }

.zgts-btn-lyric.is-active { color: #7800ff; }

.zgts-btn-vol.is-muted .zgts-vol-wave1,
.zgts-btn-vol.is-muted .zgts-vol-wave2 { display: none; }

/* ---- Lyric panel ---- */
.zgts-lyric-panel {
    display: none;
    height: 130px;
    position: relative;
    border-top: 1px solid rgba(0,212,255,0.1);
    padding-top: 10px;
    margin-top: 2px;
}

.zgts-lyric-panel.is-visible { display: block; }

.zgts-lyric-scroll {
    height: 100%;
    overflow: hidden;
    position: relative;
}

/* Fade masks top/bottom */
.zgts-lyric-scroll::before,
.zgts-lyric-scroll::after {
    content: '';
    position: absolute;
    left: 0; right: 0;
    height: 28px;
    z-index: 2;
    pointer-events: none;
}
.zgts-lyric-scroll::before {
    top: 0;
    background: linear-gradient(to bottom, #0a0e1a, transparent);
}
.zgts-lyric-scroll::after {
    bottom: 0;
    background: linear-gradient(to top, #0a0e1a, transparent);
}

.zgts-lyric-lines {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 20px 8px;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.zgts-lyric-line {
    font-size: 12px;
    line-height: 1.5;
    color: rgba(160, 200, 230, 0.35);
    text-align: center;
    transition: color 0.4s, font-size 0.4s, font-weight 0.3s;
    cursor: default;
    padding: 0 4px;
}

.zgts-lyric-line.is-active {
    color: #00d4ff;
    font-size: 13.5px;
    font-weight: 600;
    text-shadow: 0 0 12px rgba(0,212,255,0.5);
}

.zgts-lyric-line.is-prev {
    color: rgba(160, 200, 230, 0.55);
}

.zgts-lyric-loading {
    text-align: center;
    font-size: 11px;
    color: rgba(0,212,255,0.4);
    padding: 20px 0;
    display: none;
}

/* ---- Widget title integration ---- */
.widget .zgts-player { margin-top: 6px; }

/* Inherit sidebar theme color if defined */
.widget-title + .zgts-player,
h2.widgettitle + .zgts-player,
h3.widgettitle + .zgts-player {
    margin-top: 8px;
}
