#mensajes {
    border: 1px solid #ccc;
    height: 300px;
    overflow-y: auto;
    margin-bottom: 10px;
    padding: 10px;
}
.mensaje {
    margin-bottom: 5px;
    padding: 5px;
    background-color: #f9f9f9;
    border-radius: 5px;
}
.botones {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
button {
    padding: 8px 15px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
button:hover {
    background-color: #45a049;
}
button.secundario {
    background-color: #2196F3;
}
button.secundario:hover {
    background-color: #0b7dda;
}
button.advertencia {
    background-color: #ff9800;
}
button.advertencia:hover {
    background-color: #e68a00;
}
button.terciario {
    background-color: #9c27b0;
}
button.terciario:hover {
    background-color: #7b1fa2;
}
select {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ddd;
}
.grupo {
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    background-color: #f9f9f9;
}
.grupo h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #555;
}
/* Toggle switch */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin-left: 10px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: #2196F3;
}
input:checked + .slider:before {
    transform: translateX(26px);
}
.opciones-container {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}
.opciones-container label {
    margin-right: 10px;
}
/* Formulario de stream */
.stream-form-group {
    margin-bottom: 10px;
}
.stream-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}
.stream-form-group input, .stream-form-group select {
    width: 100%;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ddd;
    box-sizing: border-box;
}

/* Contenedor de notificaciones */
.notificaciones-container {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 300px;
    z-index: 9999;
}

/* Estilo de notificación */
.notificacion {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin-bottom: 10px;
    overflow: hidden;
    transform: translateX(120%);
    transition: transform 0.3s ease-out;
}

.notificacion.visible {
    transform: translateX(0);
}

/* Barra de progreso para autocierre */
.notificacion .barra-progreso {
    height: 3px;
    background-color: #4CAF50;
    width: 100%;
    transform-origin: left;
}

/* Tipos de notificaciones */
.notificacion.info {
    border-left: 4px solid #2196F3;
}

.notificacion.exito {
    border-left: 4px solid #4CAF50;
}

.notificacion.advertencia {
    border-left: 4px solid #FFC107;
}

.notificacion.error {
    border-left: 4px solid #F44336;
}

/* Contenido de la notificación */
.notificacion-contenido {
    padding: 15px;
    display: flex;
    align-items: flex-start;
}

.notificacion-icono {
    margin-right: 10px;
    font-size: 20px;
}

.notificacion-titulo {
    margin: 0 0 5px 0;
    font-weight: bold;
}

.notificacion-mensaje {
    margin: 0;
    color: #666;
}

/* Botón de cerrar */
.notificacion-cerrar {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    margin-left: auto;
    padding: 0;
    color: #aaa;
}

/* Estilos para el popup alert */
.popup-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
}

.popup-container.show {
    opacity: 1;
    visibility: visible;
}

.popup-alert {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 450px;
    transform: scale(0.8);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    overflow: hidden;
}

.popup-alert.visible {
    transform: scale(1);
    opacity: 1;
}

.popup-header {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #eee;
}

.popup-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.popup-cerrar {
    background: none;
    border: none;
    font-size: 24px;
    color: #888;
    cursor: pointer;
    padding: 0;
    margin: 0;
}

.popup-contenido {
    padding: 20px;
    font-size: 16px;
    color: #555;
    line-height: 1.5;
    max-height: 250px;
    overflow-y: auto;
}

.popup-footer {
    padding: 15px 20px;
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid #eee;
    gap: 10px;
}

.popup-boton {
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    border: none;
}

.popup-boton.aceptar {
    background-color: #4CAF50;
    color: white;
}

.popup-boton.aceptar:hover {
    background-color: #45a049;
}

/* Estilos de popup por tipo */
.popup-alert.info .popup-header {
    background-color: #e7f3ff;
    color: #2196F3;
}

.popup-alert.exito .popup-header {
    background-color: #e9f7ef;
    color: #4CAF50;
}

.popup-alert.advertencia .popup-header {
    background-color: #fff8e1;
    color: #FFC107;
}

.popup-alert.error .popup-header {
    background-color: #ffebee;
    color: #F44336;
}

/* Estilos para el contenedor de streams de video */
.video-stream-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 10px;
}

/* Scroll personalizado para contenedor de streams */
.video-stream-container::-webkit-scrollbar {
    width: 6px;
}

.video-stream-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.video-stream-container::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
}

/* Estilo para cada stream de video */
.video-stream {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    overflow: hidden;
    width: 320px;
    transform: translateX(120%);
    transition: transform 0.3s ease-out, width 0.3s ease, height 0.3s ease;
}

.video-stream.visible {
    transform: translateX(0);
}

/* Estado a pantalla completa */
.video-stream.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    border-radius: 0;
}

/* Header del stream */
.stream-header {
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f8f8f8;
    border-bottom: 1px solid #eee;
}

.stream-header h3 {
    margin: 0;
    font-size: 16px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}

.stream-cerrar {
    background: none;
    border: none;
    font-size: 20px;
    color: #888;
    cursor: pointer;
    padding: 0;
    margin: 0;
}

/* Contenedor del video */
.stream-video-container {
    position: relative;
    width: 100%;
    height: 180px;
    background-color: #000;
    overflow: hidden;
}

/* Elemento de video */
.stream-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Botón de pantalla completa */
.stream-ampliar {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.stream-ampliar:hover {
    opacity: 1;
}

/* Tipos de stream */
.video-stream.info .stream-header {
    background-color: #e7f3ff;
    color: #2196F3;
}

.video-stream.exito .stream-header {
    background-color: #e9f7ef;
    color: #4CAF50;
}

.video-stream.advertencia .stream-header {
    background-color: #fff8e1;
    color: #FFC107;
}

.video-stream.error .stream-header {
    background-color: #ffebee;
    color: #F44336;
}

/* Adaptaciones para pantallas más pequeñas */
@media (max-width: 768px) {
    .video-stream {
        width: 280px;
    }

    .stream-video-container {
        height: 160px;
    }
}

@media (max-width: 480px) {
    .video-stream {
        width: 240px;
    }

    .stream-video-container {
        height: 140px;
    }

    .notificaciones-container {
        width: 260px;
    }
}