/*************************************************************************************/
/*ESTILOS PARA TODAS LAS VENTANAS QUE LLEVAN EJERCICIOS*/

/*ESTILOS GLOBALES DEL CONTENEDOR PRINCIPAL*/
.contenedor-principalEjercicios {
    display: grid;
    grid-template-columns: minmax(180px, 280px) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    width: 95%;
    margin: 20px auto;
}

/*************************************************************************************/
/*ESTILOS GLOBALES PARA EL CONTENEDOR DE LISTAS DE EJECRCICIOS*/
.listaEjercicios {
  position: sticky;
  top: 20px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 15px;
  max-height: calc(100vh - 40px);
  overflow: auto;
}

.listaEjercicios ul{
  list-style: none;
  margin: 0;
  padding: 0;
}

.listaEjercicios li{
  margin: 8px 0;
}

.listaEjercicios label{
  display: flex;
  align-items: center;
  gap: 10px;
}

.listaEjercicios a{
  text-decoration: none;
  color: #0d1b2a;
}

.listaEjercicios a:hover{
  text-decoration: underline;
}

/*************************************************************************************/
/*ESTILO PARA EL CONTEDOR DE LA DESCRIPCIÓN DE LA VENTANA*/
.descripcion-ejercicios {
    max-width: 1000px;
    width: 90%;
    margin: 15px auto 0 auto;
    border: 1px solid #cfcfcf;
    border-radius: 10px;
    padding: 20px;
    font-size: 1.15rem;
    line-height: 1.8;
}

/*************************************************************************************/
/*ESTILOS PARA EL CONTENEDOR DE LOS EJERCICIOS*/
.basicos {
    background-color: rgba(59,130,246,0.20); /*  */
    padding: 24px; /* Espacio interno */
    margin: 2px; /* Espacio externo */
    border-radius: 10px; /* Bordes redondeados para una mejor apariencia */
    min-width: 0;
}

.condicionales {
    background-color: rgba(255,204,153,0.20); /*  */
    padding: 24px; /* Espacio interno */
    margin: 2px; /* Espacio externo */
    border-radius: 10px; /* Bordes redondeados para una mejor apariencia */
    min-width: 0;
}

.bucles {
    background-color: rgba(255,105,97,0.20); /*  */
    padding: 24px; /* Espacio interno */
    margin: 2px; /* Espacio externo */
    border-radius: 10px; /* Bordes redondeados para una mejor apariencia */
    min-width: 0;
}

/*************************************************************************************/
/*ESTILOS PARA LOS H2 QUE REPRESENTAN LOS NIVELES DE EJERCICIOS*/
h2 {
    color: rgb(56, 55, 55);
}

.tituloNiveles-basicos {
    color: #3B82F6;
}

.tituloNiveles-condicionales {
    color: #F59E0B;
}

.tituloNiveles-bucles {
    color: #EF4444;
}

/*************************************************************************************/
/*ESTILOS PARA LOS EJERCICIOS*/
.solucion-container {
    margin-bottom: 60px;
    background-color: rgb(255, 255, 255);
    border-left: 6px solid #ddd;
    padding: 20px; /* Espacio interno */
    border-radius: 10px; /* Bordes redondeados para una mejor apariencia */
    max-width: 100%;
    min-width: 0;
    overflow-wrap: break-word;
}

.basicos .solucion-container {
    border-left-color: #3B82F6;
}

.condicionales .solucion-container {
    border-left-color: #F59E0B;
}

.bucles .solucion-container {
    border-left-color: #EF4444;
}

.basicos,
.condicionales,
.bucles {
    min-width: 0;
    width: 100%;
}

/*************************************************************************************/
/*ESTILOS PARA LA BARRA DESPLEGABLE*/
.solucion-header {
    background-color: #858585;
    padding: 10px;
    cursor: pointer;
    border: 1px solid #ccc;
}

.solucion-header:hover {
    background-color: #e0e0e0;
}

.solucion-header::before {
    content: "+ Ver posible solución";
}

.solucion-header.active::before {
  content: "− Ocultar posible solución";
}

/*************************************************************************************/
/*ESTILOS PARA EL CONTENEDOR DEL CÓDIGO JAVA*/
.solucion-content { /*Primer contenedor gris*/
  max-height: 0;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  background-color: #f9f9f9;
  border: 1px solid #ccc;
  padding: 0 10px;     /* importante: cerrada sin padding vertical */
  margin-top: -1px;
}

pre { /*Segundo contenedor negro*/
    background-color: #2d2d2d; 
    color: #f8f8f2;
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
    max-width: 100%;
}
