/* Kamera - karta s ikonou, nazvem a sipkou do podstranky; podstranka s videem
   Spolecne prvky (.ItemIconBox, .ItemChevron) jsou v css/style.css */

/* ===== Karta ve vizualizaci ===== */
.CameraItem {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    cursor: pointer;
}

.CameraName {
    flex: 1;
    min-width: 0;
    font-size: var(--item-name-fs);
    font-weight: var(--item-name-fw);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== Podstranka ===== */
/* Stejna sirka jako ostatni podstranky, do 480 px roztazeni zajisti .PageContainer > div v css/style.css */
.CameraMain {
    width: 420px;
}

@media only screen and (min-width: 993px) {
    /* Desktop - vetsi video */
    .CameraMain {
        width: 100%;
        max-width: 960px;
    }
}

/* ===== Video ===== */
.CameraVideo {
    position: relative;
    aspect-ratio: 4 / 3;
    margin-bottom: 16px;
    border-radius: var(--radius);
    overflow: hidden;
    background: radial-gradient(ellipse at 50% 95%, #4b5866 0, #2a333c 45%, #151a1f 100%);
    box-shadow: var(--shadow);
}

.CameraVideoImg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
    cursor: zoom-in;
}

.CameraVideoLive .CameraVideoImg {
    display: block;
}

.CameraVideoLoad {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #9aa4ae;
    font-size: 13px;
}

.CameraVideoLive .CameraVideoLoad {
    display: none;
}

.CameraSpinner {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 3px solid #3a434c;
    border-top-color: #9aa4ae;
    animation: CameraSpin 1s linear infinite;
}

/* Kamera neodpovida - misto toceni text a tlacitko "Zkusit znovu" */
.CameraVideoFail .CameraSpinner,
.CameraVideoFail .CameraVideoMsgLoad,
.CameraVideoMsgFail,
.CameraRetry {
    display: none;
}

.CameraVideoFail .CameraVideoMsgFail {
    display: inline;
}

.CameraVideoFail .CameraRetry {
    display: inline-block;
}

.CameraRetry {
    margin-top: 4px;
    padding: 6px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.CameraVideoTag,
.CameraVideoTime {
    position: absolute;
    top: 10px;
    display: none;
    align-items: center;
    gap: 6px;
    padding: 4px 9px;
    border-radius: 11px;
    background: rgba(0, 0, 0, .45);
    color: #fff;
    font-size: 11px;
    pointer-events: none;
}

.CameraVideoTag {
    left: 10px;
    font-weight: 700;
    letter-spacing: .05em;
}

.CameraVideoTag i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #e5483d;
    animation: CameraBlink 1.4s infinite;
}

.CameraVideoTime {
    right: 10px;
    font-variant-numeric: tabular-nums;
}

.CameraVideoLive .CameraVideoTag,
.CameraVideoLive .CameraVideoTime {
    display: flex;
}

/* Tlacitko zvetseni vpravo dole */
.CameraFullBtn {
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .45);
    color: #fff;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.CameraVideoLive .CameraFullBtn {
    display: flex;
}

.CameraFullBtn svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.CameraIconShrink,
.CameraVideoFull .CameraIconExpand {
    display: none;
}

.CameraVideoFull .CameraIconShrink {
    display: block;
}

/* ===== Zobrazeni pres celou obrazovku ===== */
.CameraVideo.CameraVideoFull {
    position: fixed;
    inset: 0;
    z-index: 1000;
    margin: 0;
    aspect-ratio: auto;
    border-radius: 0;
    background: #000;
}

.CameraVideoFull .CameraVideoImg {
    object-fit: contain;
    cursor: zoom-out;
}

/* ===== Animace ===== */
@keyframes CameraSpin {
    to { transform: rotate(360deg); }
}

@keyframes CameraBlink {
    50% { opacity: .25; }
}
