/* Webcam test — template-parts/tools/webcam-test.php */

.wc-stage {
    position: relative;
    margin-top: 18px;
    aspect-ratio: 16 / 9;
    max-height: 62vh;
    border-radius: 14px;
    overflow: hidden;
    background:
        radial-gradient(90% 80% at 50% 45%, color-mix(in srgb, var(--color-accent) 10%, transparent), transparent 70%),
        #0d0d0d;
    border: 1px solid var(--color-border);
}
.wc-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    opacity: 0;
    transition: opacity 220ms var(--ease-out, ease);
}
.wc-video.is-mirror { transform: scaleX(-1); }
.wc-stage[data-state="live"] .wc-video { opacity: 1; }
.wc-idle {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    text-align: center;
    color: rgba(255, 255, 255, .62);
    font-size: 14px;
}
.wc-idle svg { width: 40px; height: 40px; opacity: .7; }
.wc-stage[data-state="live"] .wc-idle { display: none; }
.wc-badge {
    position: absolute;
    top: 10px;
    inset-inline-start: 10px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .6);
    color: #fff;
    font-family: var(--cine-mono, ui-monospace, monospace);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    backdrop-filter: blur(6px);
}
.wc-bar { margin-top: 12px; justify-content: space-between; }
.wc-bar .tool-btn-sm { gap: 6px; }
.wc-shot-img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    background: #000;
}

@media (max-width: 480px) {
    .wc-stage { aspect-ratio: 4 / 3; margin-top: 14px; }
}
