/* =========================================================
   CONTENEDOR PRINCIPAL (NO SE TOCA NUNCA EN CAMBIO DE CAM)
   ========================================================= */
.live-cam-overlay {
    position: absolute;
    bottom: 100px;
    right: 40px;

    width: 420px;
    height: 236px;

    border-radius: 10px 10px 0 0;
    overflow: hidden;

    background: #000;

    border-top: 2px solid var(--codelis-extra-oscuro-rgb);
    border-left: 2px solid var(--codelis-extra-oscuro-rgb);
    border-right: 2px solid var(--codelis-extra-oscuro-rgb);

    z-index: 9999 !important;
    pointer-events: auto;

    /* IMPORTANTE: el overlay NUNCA desaparece */
    opacity: 1;
    visibility: visible;
}

/* =========================================================
   CAPA DEL VIDEO (ESTA ES LA ÚNICA QUE ANIMA)
   ========================================================= */
.cam-video-wrapper {
    position: absolute;
    inset: 0;
    z-index: 1;

    /* transición suave entre cámaras */
    transition: opacity 0.6s ease, transform 0.6s ease;

    opacity: 1;
    transform: scale(1);
}

/* estado oculto (cuando cambia cámara) */
.cam-video-wrapper.fade-out {
    opacity: 0;
    transform: scale(1.05);
}

/* estado visible */
.cam-video-wrapper.fade-in {
    opacity: 1;
    transform: scale(1);
}

/* =========================================================
   VIDEO STREAM
   ========================================================= */
#camVideo {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;
    background: #000;

    filter: contrast(1.05) saturate(1.1) brightness(1.02);
}

/* =========================================================
   LABEL (FIJO, NO SE ANIMA)
   ========================================================= */
.live-cam-label {
    position: absolute;
    top: 6px;
    left: 6px;

    z-index: 10;

    background: rgba(220, 53, 69, 0.85);
    color: #fff;

    padding: 3px 6px;
    border-radius: 4px;

    font-size: 12px;
    font-weight: bold;

    pointer-events: none;
}

/* =========================================================
   PULSE (EFECTO LIVE)
   ========================================================= */
.live-cam-label .pulse {
    display: inline-block;

    margin-right: 6px;

    color: #ff2d2d;

    animation: livePulse 1.4s ease-in-out infinite;
    transform-origin: center;
}

@keyframes livePulse {
    0%   { transform: scale(0.9); opacity: 1; }
    50%  { transform: scale(1.4); opacity: 0.4; }
    100% { transform: scale(0.9); opacity: 1; }
}