/* Mux Player Decode Error Fixes */

/* Disable hardware acceleration for Mux player to prevent decode errors */
mux-player {
    /* Force software decoding to prevent PIPELINE_ERROR_DECODE */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: auto;
}

/* Ensure proper video element styling */
mux-player video {
    /* Disable hardware acceleration */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: auto;

    /* Ensure proper rendering */
    object-fit: contain;
    width: 100%;
    height: 100%;
}

/* Fallback for decode errors */
.mux-player-error {
    background-color: #f3f4f6;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    color: #6b7280;
}

.mux-player-error h3 {
    color: #374151;
    margin-bottom: 0.5rem;
}

.mux-player-error p {
    margin-bottom: 1rem;
}

.mux-player-error button {
    background-color: #3b82f6;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
}

.mux-player-error button:hover {
    background-color: #2563eb;
}

/* Loading state for Mux player */
.mux-player-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000;
    color: white;
    min-height: 200px;
}

.mux-player-loading .spinner {
    width: 2rem;
    height: 2rem;
    border: 2px solid #ffffff40;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

