/* Estilos comunes */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    margin: 16px;
    background-color: #F4F4F4;
}
footer {
    width: 100%;    
    max-width: 896px;
    margin: 0 auto;
}
footer p,
footer span {
    color: rgb(51, 51, 51);
    font-family: Inter;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.025rem;
}
h2 {
    color: #3E3E3E;
    font-family: Inter;
    font-size: 19px;
    font-style: normal;
    font-weight: 600;
}
label {
    color: #666;
    font-family: Inter;
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
}
p {
    font-family: Inter;
    font-size: 14px;
    font-weight: 700;
}   
a {
    text-decoration: none;
    color: white;
}
#container {
    max-width: 1280px;
    margin: 0 auto;
    margin-bottom: 16px;
}
.box {
    width: 100%;
    box-sizing: border-box;
    background-color: #fff;
    padding: 16px;
  	
    border-radius: 4px;
    margin-bottom: 16px;
}
.btn-agregar {
    width: 100%;
    padding: 10px;
    background-color: #4caf50;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
}
.btn-agregar:hover {
    background-color: #256f28;
}
.btn-volver {
    height:40px;
    width: calc(100% - 56px);
    padding: 10px;
    background-color: #3E3E3E;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
}
.btn-volver:hover {
    background-color: black;
}
.btn-editar {
    height: 40px;
    width: 100%;
    padding: 10px;
    background-color: white;
    color: #666;
    border: 1px solid #666;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
}
.btn-editar:hover {
    background-color: #f2f9ff;
}   
.btn-volver:hover {
    background-color: black;
}
.btn-buscar {
    width: 30%;
    padding: 10px;
    background-color: #3E3E3E;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
}
.btn-buscar:hover {
    background-color: black;
}
.btn-agregar, .btn-buscar {
    height: 40px;
    color: #FFF;
    text-align: center;
    font-family: Inter;
    font-size: 14px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
}

.campo-doble {
    display: flex;
}
.columna-izq {
    width: calc(50% - 4px);
    margin-right: 8px;
}
.columna-der {
    width: calc(50% - 4px);
}

.textarea-notas {
    resize: vertical;
    height: 64px;
    display: inline-block;
    width: 100%;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #CCC;
    background: #FFF;
    color: #666;
    font-family: Inter;
    font-size: 14px;
    margin-bottom: 16px;    
}

.box-busqueda {
    width: 100%;
    box-sizing: border-box;
    background-color: #fff;
    padding: 16px;
    border-radius: 4px;
    margin-bottom: 16px;    
    display: flex;
}
.input-busqueda-form {
    display: inline-block;
    width: 100%;
    height: 40px;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #CCC;
    background: #FFF;
    color: #666;
    font-family: Inter;
    font-size: 14px;
    margin-bottom: 16px;
}

.input-busqueda {
    width: calc(72% - 5px);
    height: 40px;
    padding: 10px;
    margin-right: 8px;
    border-radius: 4px;
    border: 1px solid #CCC;
    background: #FFF;
}
.input-portada {
    display: inline-block;
    width: 100%;
    height: 40px;
    padding: 10px;
    padding-top: 8px;
    border-radius: 4px;
    border: 1px solid #CCC;
    background: #FFF;
    color: #666;
    font-family: Inter;
    font-size: 14px;
    margin-bottom: 16px;
}

.box-desplegable {
    width: 100%;
    box-sizing: border-box;
    background-color: #fff;
    padding: 16px;
    border-radius: 4px;
    margin-bottom: 16px;    
}
.box-num-libros {
    width: auto;
    box-sizing: border-box;
    background-color: #fff;
    padding: 16px;
    border-radius: 4px;
    margin-bottom: 16px;
  	display: flex;
    align-items: center;
}
.box-bombilla-desplegable {
	display: flex;
}
.bombilla {
  	cursor: pointer;
	width: 40px;
    height: 40px;
    margin-left: 16px;
    border-radius: 4px;
    border: 1px solid #CCC;
    background: #FFF;
    color: #666;
}
.favorito-index {
    cursor: pointer;
    width: max-content;
    height: 40px;
  	padding: 0px 12px;
    margin-left: 16px;
    border-radius: 4px;
    border: 1px solid #CCC;
    background: #FFF;
    color: #666;
}
.favorito-cuadrado {
	cursor: pointer;
	width: 40px;
    height: 40px;
    margin-left: 16px;
    border-radius: 4px;
    border: 1px solid #CCC;
    background: #FFF;
    color: #666;
  	transition: background-color 0.3s ease;
}
/* Desplegable de años */
.desplegable {
  	cursor: pointer;  
    display: inline-block;
    width: 100%;
    height: 40px;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #CCC;
    background: #FFF;
    color: #666;
    font-family: Inter;
    font-size: 14px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    position: relative;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%23666" class="bi bi-caret-down-fill" viewBox="0 0 16 16"><path d="M7.247 11.14L2.451 5.658c-.566-.668-.106-1.658.746-1.658h9.606c.852 0 1.312.99.746 1.658l-4.796 5.482a1 1 0 0 1-1.512 0z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px top 50%; /* Separación de 15px del margen derecho */
    background-size: 16px 16px;
}
.mini-botones {
	display: flex;
}
.desplegable::-ms-expand {
    display: none;
}

.book-grid {
    display: grid;
    grid-template-columns:  repeat(auto-fill, minmax(140px, 1fr));   
    column-gap: 16px;
    row-gap: 4px;
    background-color: white;
    padding: 16px;
    border-radius: 4px;
    margin: 0 auto;
    margin-bottom: 16px;    
}
.book-card {
    margin-bottom: 16px;       
}

.portada {
    width: 100%; /* Ocupa el ancho total del contenedor */
    aspect-ratio: 140 / 208; /* Mantén la proporción original */
    background: #D9D9D9;
    border-radius: 4px;
    background-size: cover;
    background-position: center;
}

.book-card:hover .portada {
    transform: translateY(-5px); /* Elevación de 5px hacia arriba en hover */
  	transition: .15s ease-out;
}

.book-card .portada:hover {
    transform: translateY(-5px); /* Mantiene la elevación cuando el hover se quita */
  	transition: .15s ease-out;
}

.titulo {
    display: flex;
    width: 100%;
    height: 48px;
    flex-direction: column;
    justify-content: center;
    flex-shrink: 0;
    margin: 0 auto;
  	margin-top: 4px;
    
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2; /* Límite de 2 líneas */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;    

    color: #666;
    text-align: center;
    font-family: Inter;
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 24px; /* 150% */
}
.autor {
    display: block;
    width: 100%;
    height: 20px;
    flex-direction: column;
    justify-content: center;
    flex-shrink: 0;
    margin: 0 auto;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;    

    color: #666;
    text-align: center;
    font-family: Inter;
    font-size: 12px;
    font-style: normal;
    font-weight: 400;
    line-height: 19px; /* 158.333% */
}
.copyright {
    display:flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 1rem 1rem 0rem 1rem;
    color: rgb(51, 51, 51);
    border-top: 1px solid rgb(204, 204, 204);
}
    #ir_arriba:hover {
      text-decoration: underline;
    }

/* Toast notification */
.mensaje-notificacion {
    width: 100%;
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-top: 16px;
    padding: 16px;
    margin-bottom: 16px;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    font-family: Inter;
    font-size: 16px;
    opacity: 0; /* Comienza invisible */
    transform: translateY(20px); /* Empieza desde abajo */
    transition: opacity 0.3s ease, transform 0.3s ease; /* Transiciones suaves */
}
.mensaje-notificacion.mostrar {
    opacity: 1; /* Se hace visible */
    transform: translateY(0); /* Vuelve a la posición original */
}
.cerrar-notificacion {
    cursor: pointer;
    color: #155724;
    font-size: 20px;
    font-weight: bold;
    line-height: 1;
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
}
.mensaje-notificacion-eliminado {
    width: 100%;
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-top: 16px;
    padding: 16px;
    margin-bottom: 16px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb; 
    border-radius: 4px;
    font-family: Inter;
    font-size: 16px;
    opacity: 0; /* Comienza invisible */
    transform: translateY(20px); /* Empieza desde abajo */
    transition: opacity 0.3s ease, transform 0.3s ease; /* Transiciones suaves */
}
.mensaje-notificacion-eliminado.mostrar {
    opacity: 1; /* Se hace visible */
    transform: translateY(0); /* Vuelve a la posición original */
}
.cerrar-notificacion-eliminado {
    cursor: pointer;
    color: #721c24;
    font-size: 20px;
    font-weight: bold;
    line-height: 1;
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
}




@media (min-width: 516px) {
    .solo-desktop {
        margin-left:5px;
    }
    .texto-footer {
        display: flex; /* O el valor que prefieras para el diseño en escritorio */
    }
}
/* Estilos para anchos menores o iguales a 768px */
@media (max-width: 516px) {
    .solo-desktop {
        display: none;
    }
}


/* Estilos para anchos superiores a 928px */
@media all and (min-width: 928px) {
    .box {
        width: 896px;
        padding: 16px;
      	padding-top: 10px;
        border-radius: 4px;
        margin: 0 auto;
        margin-bottom: 16px;
    }
    .box-busqueda {
        width: 896px;
        padding: 16px;
        border-radius: 4px;
        margin: 0 auto;
        margin-bottom: 16px;
    }
  	.box-filtro-num-leidos {
		width: 896px;
		margin: 0 auto;
      	display: flex;
      	column-gap: 16px;
  	}  
    .box-desplegable {
        width: 448px;
      	height: 72px;
        padding: 16px;
        border-radius: 4px;
        margin-bottom: 16px; 
      	flex: auto;
    }
    .desplegable {
		width: 336px;
    }
  	.box-bombilla-desplegable {
    display: flex;
    justify-content: space-between;
  	}  
    .mini-botones {
      display: flex;
    }
    .campo-doble-titulo-autor {
        display: flex;
    }
    .columna-izq-titulo-autor {
        width: calc(50% - 4px);
        margin-right: 16px;
    }
    .columna-der-titulo-autor {
        width: calc(50% - 4px);
    }
    .campo-cuadruple {
        display: flex;
    }
    .columna-izq {
        width: 204px;
        margin-right: 16px;
    }
    .columna-der {
        width: 204px;
        margin-right: 16px;
    }
    .campo-doble-portada-agregar {
        display: flex;
        align-items: center;
        gap: 16px;
    }
    .columna-izq-portada-agregar {
        width: calc(48% - 4px);
    }
    .columna-der-portada-agregar {
        width: 100%;
        position: relative;
    }
    .btn-agregar {
        margin-top: 6px;
    }   

    .book-grid {
        width: 896px;
        display: grid;
        /*grid-template-columns: auto auto auto auto auto;*/   
        column-gap: 16px;
    }
    .book-card {
        width: 160px;
        box-sizing: border-box;    
    }
    .titulo {
        width: 160px;
    }
    .autor {
        width: 160px;
    }
    .box-num-libros {
      width: 304px;
      box-sizing: border-box;
      background-color: #fff;
      padding: 16px;
      border-radius: 4px;
      margin-bottom: 16px;
      display: flex;
      align-items: center;
      justify-content: center;
  }
  
/* Toast notification */
    .mensaje-notificacion, .mensaje-notificacion-eliminado {
        width:896px;
        margin: 0 auto;
      	margin-bottom:16px;
    }  
}

/* Estilos para anchos superiores a 1330px */
@media all and (min-width: 1330px) {
        footer {
        max-width: 100%;    
        margin: 0 auto;
    }
    .columna-izq-desktop {
        width: 308px;
        margin-right: 12px;
        display: inline-block;
        vertical-align: top;
    }
    .columna-der-desktop {
        width: 956px;
        display: inline-block;
        vertical-align: top;
    }
    .box {
        position: fixed;
        width: 308px;       
        top: 104px;
      	padding-top: 16px;
      	z-index: 1;
    }
    .box-busqueda {
        position: fixed;
        width: 308px;
    }
    .box-num-libros {
        width: 304px;
        box-sizing: border-box;
        background-color: #fff;
        padding: 16px;
        border-radius: 4px;
        margin-bottom: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
}  
  	.box-filtro-num-leidos {
 		width: 956px;
  	}
    .book-grid {
        width: 956px;
    }
    .desplegable {
        width: 360px;
    }    
	.btn-agregar {
		margin-top: 0px;
	}	

    .campo-doble-titulo-autor {
        display: initial;
    }   
    .columna-izq-titulo-autor {
        width: 100%;
        margin-right: 16px;
    }
    .columna-der-titulo-autor {
        width: 100%;
    }    
    .columna-izq {
        width: calc(50% - 4px);
        margin-right: 8px;
    }
    .columna-der {
        width: calc(50% - 4px);
    }
    .campo-cuadruple {
        display: initial;
    }
    .campo-doble .input-busqueda-form {
        width: 134px;
    }
    .campo-doble-portada-agregar {
        display: initial;
    }
    .columna-izq-portada-agregar {
       width: 100%; 
    }
    .columna-der-portada-agregar {
        width: 100%;
        margin-top: 0px;
        position: relative;
    }
    .book-grid {
        width: 956px;
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
        column-gap: 16px;
        background-color: white;
        padding: 16px;
        border-radius: 4px;
        margin: 0 auto;
        margin-bottom: 16px;    
    }
    .book-card {
        width: 172px;
        box-sizing: border-box;    
    }
    .titulo {
        width: 172px;
    }
    .autor {
        width: 172px;
    }
  
/* Toast notification */
    .mensaje-notificacion, .mensaje-notificacion-eliminado {
        width:308px;
      	position: fixed;
        top: 193px;
      	z-index: 0;
    }
}