/* ===================================================================
   ADG 3D Engine — Video Panel (PR Company Edition)
   Multi-wall management, stats grid, safe area overlay
   =================================================================== */

/* ── Divider ── */
.vp-divider {
    height: 1px;
    background: var(--separator-light);
    margin: 10px 0;
}

/* ── Wall List ── */
.vp-wall-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 4px 0;
    max-height: 120px;
    overflow-y: auto;
}

.vp-wall-empty {
    font: var(--text-caption);
    color: var(--text-quaternary);
    text-align: center;
    padding: 8px;
}

.vp-wall-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--duration-fast);
    border: 1px solid transparent;
}

.vp-wall-item:hover {
    background: var(--fill-quaternary);
}

.vp-wall-item.active {
    background: var(--accent-dim);
    border-color: var(--accent);
}

.vp-wall-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.vp-wall-name {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font: var(--text-caption);
    padding: 2px 4px;
    border-radius: 3px;
    outline: none;
    min-width: 0;
}

.vp-wall-name:focus {
    background: var(--fill-quaternary);
}

.vp-wall-size {
    font: var(--text-caption);
    color: var(--text-tertiary);
    white-space: nowrap;
    flex-shrink: 0;
}

.vp-wall-del {
    background: none;
    border: none;
    color: var(--text-quaternary);
    cursor: pointer;
    font-size: 14px;
    padding: 0 2px;
    transition: color var(--duration-fast);
    flex-shrink: 0;
}

.vp-wall-del:hover {
    color: var(--color-danger);
}

/* ── Aspect Ratio Buttons ── */
.vp-aspect-btns .aspect-btn {
    font-size: 10px !important;
    padding: 3px 2px !important;
}

/* ── Recommendation Card ── */
.vp-recommendation {
    margin-top: 6px;
}

.vp-rec-card {
    background: var(--fill-quaternary);
    border: 1px solid var(--accent-dim);
    border-radius: var(--radius-sm);
    padding: 8px;
}

.vp-rec-title {
    font: 600 12px/1.3 var(--font-sans);
    color: var(--accent);
    margin-bottom: 4px;
}

.vp-rec-detail {
    font: var(--text-caption);
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ── Stats Grid ── */
.vp-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

.vp-stat {
    background: var(--fill-quaternary);
    border-radius: var(--radius-sm);
    padding: 6px 8px;
}

.vp-stat-label {
    font: var(--text-caption);
    color: var(--text-tertiary);
    font-size: 10px;
    margin-bottom: 2px;
}

.vp-stat-value {
    font: 600 12px/1.3 var(--font-sans);
    color: var(--text-primary);
}

.vp-stat-highlight {
    background: var(--accent-dim);
    border: 1px solid rgba(10, 132, 255, 0.2);
}

.vp-stat-highlight .vp-stat-value {
    color: var(--accent);
}

/* ── Safe Area Overlay ── */
.vp-safe-area {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 50;
}

.vp-safe-inner {
    position: absolute;
    border: 1px dashed rgba(48, 209, 88, 0.4);
    border-radius: 2px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 4px 6px;
}

.vp-safe-label {
    font: 500 9px/1 var(--font-sans);
    color: rgba(48, 209, 88, 0.5);
    letter-spacing: 0.3px;
}

/* ── Cue List ── */
.vp-cue-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 160px;
    overflow-y: auto;
    padding: 4px 0;
}

.vp-cue-empty {
    font: var(--text-caption);
    color: var(--text-quaternary);
    text-align: center;
    padding: 12px 8px;
}

.vp-cue-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--duration-fast);
    font: var(--text-caption);
    color: var(--text-secondary);
}

.vp-cue-item:hover {
    background: var(--fill-quaternary);
}

.vp-cue-item.playing {
    background: var(--accent-dim);
    border-color: var(--accent);
    color: var(--text-primary);
}

.vp-cue-item.done {
    opacity: 0.45;
}

.vp-cue-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--text-quaternary);
    transition: background var(--duration-fast);
}

.vp-cue-item.playing .vp-cue-dot {
    background: var(--accent);
    box-shadow: 0 0 6px var(--accent);
    animation: vp-pulse 1.2s ease-in-out infinite;
}

.vp-cue-item.done .vp-cue-dot {
    background: var(--color-success, #30D158);
}

@keyframes vp-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

.vp-cue-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vp-cue-dur {
    font: 500 10px/1 var(--font-mono, monospace);
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.vp-cue-del {
    background: none;
    border: none;
    color: var(--text-quaternary);
    cursor: pointer;
    font-size: 13px;
    padding: 0 2px;
    flex-shrink: 0;
    transition: color var(--duration-fast);
    line-height: 1;
}

.vp-cue-del:hover {
    color: var(--color-danger);
}

/* Cue Add Form (inline) */
.vp-cue-add-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
    background: var(--fill-quaternary);
    border-radius: var(--radius-sm);
    margin-top: 4px;
}

.vp-cue-add-form .vp-form-row {
    display: flex;
    gap: 6px;
    align-items: center;
}

.vp-cue-add-form input,
.vp-cue-add-form select {
    flex: 1;
    min-width: 0;
}

.vp-cue-add-form .vp-form-actions {
    display: flex;
    gap: 4px;
    justify-content: flex-end;
}

/* ── Media Library ── */
.vp-media-lib {
    margin-top: 6px;
}

.vp-media-dropzone {
    border: 2px dashed var(--separator-light);
    border-radius: var(--radius-sm);
    padding: 16px 8px;
    text-align: center;
    font: var(--text-caption);
    color: var(--text-quaternary);
    cursor: pointer;
    transition: all var(--duration-fast);
}

.vp-media-dropzone:hover {
    border-color: var(--accent);
    color: var(--text-tertiary);
}

.vp-media-dropzone.drag-over {
    border-color: var(--accent);
    background: var(--accent-dim);
    color: var(--accent);
}

.vp-media-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    margin-top: 6px;
}

.vp-media-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all var(--duration-fast);
}

.vp-media-thumb:hover {
    border-color: var(--accent);
    transform: scale(1.03);
}

.vp-media-thumb.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-dim);
}

.vp-media-thumb img,
.vp-media-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vp-media-thumb-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2px 4px;
    background: rgba(0, 0, 0, 0.6);
    font: 500 9px/1.3 var(--font-sans);
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vp-media-thumb-del {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #fff;
    font-size: 11px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.vp-media-thumb:hover .vp-media-thumb-del {
    display: flex;
}