/**
 * Persistent Stream Player Stylesheet
 */

/* Main player container */
.persistent-stream-player {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #222;
    color: #fff;
    z-index: 99999;
    transition: all 0.3s ease;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Player container */
.player-container {
    padding: 10px 15px;
    display: flex;
    align-items: center;
    height: 45px;
}

/* Player controls */
.player-controls {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 10px;
}

/* Player buttons */
.player-button {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

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

.player-button:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(66, 153, 225, 0.5);
}

/* Stream info */
.player-stream-info {
    flex: 1;
    margin: 0 15px;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

#psp-stream-title {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#psp-stream-status {
    font-size: 11px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.5px;
    transition: color 0.3s;
}

#psp-stream-status.status-live {
    color: #1db954;
    position: relative;
    padding-left: 12px;
}

#psp-stream-status.status-live:before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background-color: #1db954;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

#psp-stream-status.status-error {
    color: #ff5252;
}

/* Live indicator pulse animation */
@keyframes pulse {
    0% {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
    50% {
        opacity: 0.5;
        transform: translateY(-50%) scale(1.15);
    }
    100% {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
}

/* Volume controls */
.player-volume {
    display: flex;
    align-items: center;
    margin-right: 10px;
}

.volume-slider {
    width: 70px;
    height: 6px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    margin-left: 5px;
}

.volume-level {
    height: 100%;
    background-color: #1db954;
    width: 70%;
    border-radius: 3px;
    position: absolute;
    top: 0;
    left: 0;
}

/* Different player positions */
.player-position-top {
    top: 0;
    bottom: auto;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.player-position-bottom-left {
    bottom: 20px;
    left: 20px;
    width: 320px;
    border-radius: 10px;
}

.player-position-bottom-right {
    bottom: 20px;
    left: auto;
    right: 20px;
    width: 320px;
    border-radius: 10px;
}

/* Minimized player state */
.player-minimized .player-container {
    height: 30px;
    padding: 2px 15px;
}

.player-minimized .player-volume,
.player-minimized #psp-stream-status {
    display: none;
}

/* Light theme */
.player-theme-light {
    background-color: #f5f5f5;
    color: #333;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.player-theme-light .player-button {
    color: #333;
}

.player-theme-light .volume-slider {
    background-color: rgba(0, 0, 0, 0.1);
}

.player-theme-light #psp-stream-status {
    color: rgba(0, 0, 0, 0.5);
}

.player-theme-light #psp-stream-status.status-live {
    color: #1d9950;
}

.player-theme-light #psp-stream-status.status-error {
    color: #d32f2f;
}

/* Mobile optimizations */
@media (max-width: 767px) {
    .player-controls {
        gap: 5px;
    }
    
    .player-stream-info {
        margin: 0 8px;
    }
    
    .volume-slider {
        width: 50px;
    }
    
    .player-position-bottom-left,
    .player-position-bottom-right {
        width: 280px;
    }
}