/* ─────────────────────────────────────────────────────────────────────────
   Sección Videos (render-videos.php + js/videos-player.js).
   Todo lo demás (artículos, contenedor, filas, chips, filtros) es el CSS del
   listado del pool: aquí el panel corto de la wave, la isla del vídeo y los
   mensajes.
   ───────────────────────────────────────────────────────────────────────── */

/* Panel bajo la fila: solo la wave (80px), como el audio. */
li.pdp-video-open > .pdp-video-player {
    display: block;
    height: auto;
    min-height: 80px;
}

/* Respaldo sin pista de audio: barra de progreso pinchable. */
.pdp-video-progress {
    position: relative;
    height: 6px;
    margin: 37px 0;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
}

.pdp-video-progress > span {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0;
    border-radius: 3px;
    background: #fff;
}

/* Isla flotante del vídeo: encima de los widgets de la barra lateral, con su
   misma anchura (left/width/top los pone videos-player.js). */
.pdp-video-island {
    position: fixed;
    z-index: 1035;
    display: none;
    top: 16px;
    left: 16px;
    width: 360px;
    overflow: hidden;
    border-radius: 16px;
    background: #0b0b29;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.pdp-video-island.is-open {
    display: block;
}

/* Sin barra lateral (pantallas estrechas): acoplada abajo. */
.pdp-video-island.is-docked {
    top: auto;
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    max-width: 480px;
}

.pdp-video-island__screen {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

.pdp-video-island__video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    cursor: pointer;
}

/* Pausa y cerrar: discretos, más visibles al pasar por encima. */
.pdp-video-island__actions {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 4;
    display: flex;
    gap: 6px;
    opacity: 0.55;
    transition: opacity 0.2s ease;
}

.pdp-video-island:hover .pdp-video-island__actions,
.pdp-video-island:focus-within .pdp-video-island__actions {
    opacity: 1;
}

.pdp-video-island__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    color: rgba(255, 255, 255, 0.9);
    font-size: 11px;
    cursor: pointer;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    transition: background 0.2s ease;
}

.pdp-video-island__btn:hover,
.pdp-video-island__btn:focus-visible {
    background: rgba(0, 0, 0, 0.75);
    outline: none;
}

.pdp-video-island__msg {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 3;
    align-items: center;
    justify-content: center;
    padding: 16px 44px 16px 16px;
    text-align: center;
    font-size: 13px;
    color: rgba(223, 217, 241, 0.9);
    background: rgba(11, 11, 41, 0.9);
}

.pdp-video-island.has-error .pdp-video-island__msg {
    display: flex;
}

.pdp-video-island__title {
    padding: 8px 12px;
    font-size: 12px;
    line-height: 1.4;
    color: rgba(223, 217, 241, 0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Paginación de la Vista de carpetas: como la de la Vista de publicaciones
   (.pagination-nav de render-opendrive-list.php), con la página en medio. */
/* .pagination-nav.pdp-videos-pager: el <style> en línea de la Vista de
   publicaciones define .pagination-nav más abajo en la página y ganaría. */
.pagination-nav.pdp-videos-pager {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    margin: 24px 0 8px;
    padding: 0 15px;
}

/* Columnas fijas: la página siempre al centro aunque falte un botón. */
.pagination-nav.pdp-videos-pager .prev-page { grid-column: 1; justify-self: start; margin: 0; }
.pagination-nav.pdp-videos-pager .pdp-videos-pager__info { grid-column: 2; }
.pagination-nav.pdp-videos-pager .next-page { grid-column: 3; justify-self: end; margin: 0; }

.pdp-videos-pager .nav-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid var(--color-primary);
    border-radius: 4px;
    background-color: var(--color-primary);
    color: #fff;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pdp-videos-pager .nav-button:hover {
    border-color: #fff;
    background-color: #fff;
    color: #000;
}

.pdp-videos-pager__info {
    font-size: 13px;
    color: rgba(223, 217, 241, 0.7);
    white-space: nowrap;
}

/* Formato sin vista previa o error: una línea discreta en el panel. */
.pdp-video-player__msg {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(223, 217, 241, 0.85);
    font-size: 0.85em;
}

.pdp-video-player__msg i {
    color: #3d88fb;
}

/* Columnas: formato (hueco de género) y tamaño (hueco de Key). */
.opendrive-file-info .pdp-video-format {
    letter-spacing: 0.04em;
}

.opendrive-file-info .pdp-video-size {
    color: rgba(223, 217, 241, 0.75);
}

/* Estados vacíos / errores del listado. */
.pdp-videos-msg {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 40px 20px;
    text-align: center;
    color: rgba(223, 217, 241, 0.85);
    font-size: 15px;
}

.pdp-videos-msg i {
    font-size: 28px;
    color: #e6564e;
}

.pdp-videos-msg__admin {
    margin: -24px 0 24px;
    text-align: center;
    font-size: 13px;
    opacity: 0.8;
}

.pdp-videos-msg__admin a {
    color: #3d88fb;
}

/* Buscador, pestaña Videos: aviso de «primeros N resultados». */
.pdp-videos-search-note {
    margin: 14px 0 0;
    text-align: center;
    font-size: 13px;
    color: rgba(223, 217, 241, 0.7);
}
