﻿/* Layout principale */
.webcam-container {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* Riquadro laterale */
.webcam-list {
    width: 260px;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: #f9f9f9;
}

    /* Titolo */
    .webcam-list h2 {
        margin-top: 0;
        font-size: 1.3em;
        border-bottom: 1px solid #bbb;
        padding-bottom: 8px;
        margin-bottom: 15px;
    }

    /* Lista */
    .webcam-list ul {
        list-style: none;
        padding-left: 0;
        margin: 0;
    }

    /* Spaziatura */
    .webcam-list li {
        margin-bottom: 12px;
    }

    /* Link */
    .webcam-list a {
        text-decoration: none;
        color: #004a80;
        font-size: 1.1em;
        display: block;
        padding: 6px 4px;
        border-radius: 4px;
    }

        /* Hover */
        .webcam-list a:hover {
            background: #e6f0ff;
        }

        /* Webcam selezionata */
        .webcam-list a.active {
            background: #cfe3ff;
            font-weight: bold;
            border-left: 4px solid #004a80;
        }

/* Indicatore caricamento */
.webcam-loading {
    padding: 40px;
    text-align: center;
    color: #666;
    font-size: 1.1em;
    font-style: italic;
    background: #f0f0f0;
    border-radius: 6px;
    border: 1px dashed #ccc;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Immagine grande */
.webcam-viewer img {
    width: 100%;
    max-width: 900px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

/* Responsive smartphone */
@media (max-width: 768px) {
    .webcam-container {
        flex-direction: column;
    }

    .webcam-list {
        width: 100%;
        margin-bottom: 20px;
    }

    .webcam-viewer img {
        max-width: 100%;
    }
}
