/* Video Puzzle Exposure Game */
/* Namespace: vidp */

.vidpGameContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 6px 0 4px;
    user-select: none;
    -webkit-user-select: none;
}

.vidpProgressLabel {
    font-size: 12px;
    font-weight: 700;
    color: var(--bia-accent);
    letter-spacing: 0.04em;
}

.vidpStatus {
    font-size: 13px;
    color: #555;
    min-height: 18px;
    text-align: center;
}

/* ── Grid ────────────────────────────────────────────────────────────────── */

.vidpGrid {
    position: relative;
    display: grid;
    gap: 4px;
    padding: 4px;
    background: #efeefb;
    border-radius: 12px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18), 0 0 0 3px rgba(145, 135, 211, 0.25);
    transition: gap 0.55s ease, padding 0.55s ease, border-radius 0.55s ease, background 0.55s ease;
}

.vidpGrid.vidpSolvedGrid {
    gap: 0;
    padding: 0;
    background: transparent;
    box-shadow: 0 4px 18px rgba(85, 204, 170, 0.4), 0 0 0 3px rgba(85, 204, 170, 0.6);
}

.vidpTile {
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 6px;
    cursor: pointer;
    display: block;
    transition: transform 0.18s ease, box-shadow 0.35s ease, border-radius 0.55s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

.vidpGrid.vidpSolvedGrid .vidpTile {
    border-radius: 0;
    cursor: default;
}

.vidpTile.vidpSolvedPiece {
    box-shadow: inset 0 0 0 2px rgba(85, 204, 170, 0.85);
}

.vidpGrid.vidpSolvedGrid .vidpTile.vidpSolvedPiece {
    box-shadow: none;
}

.vidpTile.vidpSelected {
    transform: scale(0.94);
    box-shadow: inset 0 0 0 3px #89C4FF, 0 0 0 3px rgba(137, 196, 255, 0.4);
}

@keyframes vidpSwapFlash {
    0%   { box-shadow: inset 0 0 0 3px #fbcb50, 0 0 14px rgba(251, 203, 80, 0.7); }
    100% { box-shadow: inset 0 0 0 0 rgba(251, 203, 80, 0); }
}

.vidpTile.vidpSwapFlash {
    animation: vidpSwapFlash 0.7s ease-out forwards;
}

/* ── Controls ────────────────────────────────────────────────────────────── */

.vidpControls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 4px;
}

.vidpBtn {
    padding: 7px 16px;
    background: transparent;
    color: var(--bia-accent);
    border: 2px solid var(--bia-accent);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.vidpBtn:hover {
    background: var(--bia-accent);
    color: #fff;
}

.vidpBtn:disabled {
    opacity: 0.45;
    cursor: default;
    pointer-events: none;
}

.vidpHintBtn {
    color: #fbcb50;
    border-color: #fbcb50;
}

.vidpHintBtn:hover {
    background: #fbcb50;
    color: #2a1a00;
}

/* ── Hidden source video ─────────────────────────────────────────────────── */

.vidpHiddenVideo {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
    left: -9999px;
}

/* ── Post-solve full-video view ──────────────────────────────────────────── */

.vidpFullVideo {
    width: min(90vw, 480px);
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    background: #000;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
    object-fit: cover;
}

.vidpNextHint {
    font-size: 13px;
    color: #555;
    text-align: center;
    margin: 4px 12px 0;
    max-width: 380px;
}

@media only screen and (max-width: 480px) {
    .vidpStatus, .vidpNextHint {
        font-size: 12px;
    }
    .vidpBtn {
        font-size: 12px;
        padding: 6px 13px;
    }
}
