/* messages */
.live-message,
.live-error,
.live-success,
.live-event-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;

    text-align: center;
    font-size: var(--font-size-lg);
    padding: 0.5rem 1rem;

    pointer-events: none;
}

.live-error {
    color: var(--color-error);
}

.live-success {
    color: var(--color-success);
}

/* status */
.live-status {
    position: relative;
    margin-left: auto;

    background: var(--color-success);
    color: #fff;

    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
}

.live-status.connected {
    background: var(--color-success);
}

.live-status.disconnected {
    background: var(--color-error);
}

.live-status.connecting {
    background: var(--color-warning);
}

/* bouton fullscreen */
.fullscreen-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: auto;
    height: 24px;
    z-index: 100;
    cursor: pointer;
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.25s ease;
    background-color:rgba(0,0,0,0.5);
    padding: 3px;
}

.fullscreen-btn img {
    width: 24px;
}

/* fullscreen sans footer visible */
#live-container:fullscreen .fullscreen-btn {
    bottom: 10px;
}

/* fullscreen avec footer visible */
#live-container:fullscreen.show-controls .fullscreen-btn {
    bottom: 70px; /* hauteur footer */
}

/* bouton caché en fullscreen */
#live-container:fullscreen .fullscreen-btn {
    opacity: 0;
    pointer-events: none;
    transform: translateY(0);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

#live-container:fullscreen.show-controls .fullscreen-btn {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* warning wake lock */
.wake-lock-warning {
    position: fixed;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);

    background: var(--color-warning);
    color: #111;

    padding: 10px 16px;
    border-radius: 8px;

    z-index: 999;
}

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

/* Boutons */
.play-btn,
.stop-btn {
    width: 36px;
    height: 36px;

    display: flex;
    justify-content: center;
    align-items: center;

    cursor: pointer;
}

/* Icônes */
.play-btn img,
.stop-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.play-btn:hover,
.stop-btn:hover {
    opacity: 0.7;
}

.icon {
    width: 100%;
    height: 100%;
    display: block;
}

.icon path,
.icon rect {
    fill: var(--controls-color);
}

.live-color-recent {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
    margin-top: 8px;
}

.live-color-recent-item {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.1);
}