/* ===== Body y básico ===== */
body {
  font-family: Arial, sans-serif;
  padding: 20px;
  background: #f4f4f9;
  margin: 0;
}

h1 {
  text-align: center;
  color: #4caf50;
  margin-bottom: 10px;
}

/* ===== Inputs y botones ===== */
input[type="text"],
input[type="search"] {
  width: 100%;
  max-width: 300px;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

button {
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  background: #0077ff;
  color: white;
  cursor: pointer;
  transition: background 0.3s;
}

button:hover {
  background: #005fd1;
}

/* ===== Header ===== */
header {
  background-color: #1f1f1f;
  padding: 10px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #333;
}

#hamburguesa {
  font-size: 26px;
  background: none;
  border: none;
  color: #ddd;
  cursor: pointer;
}

.botones-header button {
  background-color: #333;
  color: #ddd;
  padding: 8px 14px;
  border-radius: 4px;
  margin-left: 10px;
}

.botones-header button:hover {
  background-color: #4caf50;
}

/* ===== Menú lateral ===== */
#menu {
  position: fixed;
  top: 0;
  left: -240px;
  width: 220px;
  height: 100%;
  background-color: #222;
  padding-top: 60px;
  box-shadow: 2px 0 5px rgba(0,0,0,0.7);
  transition: left 0.3s ease;
  z-index: 1000;
}

#menu.active {
  left: 0;
}

#menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#menu ul li a {
  display: block;
  color: #ddd;
  text-decoration: none;
  padding: 15px 20px;
  font-weight: 600;
}

#menu ul li a:hover {
  color: #4caf50;
}

/* ===== Perfil ===== */
.infoperfil {
  display: flex;
  align-items: center;
}

.fotoperfil {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #4caf50;
  cursor: pointer;
  margin-left: 10px;
}

/* ===== Resultados de libros ===== */
.resultado,
.mislibros {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 10px 0;
}

.resultadoLibro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 10px;
  border-left: 5px solid green;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  flex-wrap: wrap; /* Para móviles */
}

.campo {
  margin: 2px 5px;
  flex: 1 1 100px;
  min-width: 80px;
}

/* ===== sr-only (Accesibilidad) ===== */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  border: 0 !important;
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
  header {
    flex-direction: column;
    align-items: flex-start;
  }

  .resultadoLibro {
    flex-direction: column;
    align-items: flex-start;
  }

  .campo {
    width: 100%;
  }

  input[type="text"],
  input[type="search"] {
    max-width: 100%;
  }

  #menu {
    width: 80%;
  }
}



#cookie-banner {
  position: fixed;
  bottom: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 600px;
  background-color: #1f1f1f;
  color: #fff;
  padding: 20px;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -4px 10px rgba(0,0,0,0.4);
  text-align: center;
  z-index: 1000;
  transition: bottom 0.5s ease-in-out;
  font-family: 'Arial', sans-serif;
}

#cookie-banner.show { bottom: 0; }

#cookie-banner p { margin: 0 0 10px 0; font-size: 14px; }

#cookie-banner a { color: #4CAF50; text-decoration: underline; }

#cookie-banner button {
  background-color: #4CAF50;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  margin: 5px;
  transition: background 0.3s;
}

#cookie-banner button:hover { background-color: #45a049; }

/* Modal de configuración */
#cookie-modal {
  display: none;
  position: fixed;
  top:0; left:0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.8);
  z-index: 2000;
  justify-content: center;
  align-items: center;
}

#cookie-modal .modal-content {
  background: #222;
  padding: 25px;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  color: #fff;
  text-align: left;
}

#cookie-modal h2 { margin-top:0; }
#cookie-modal label { display:block; margin:10px 0; }
#cookie-modal input[type="checkbox"] { margin-right:10px; }

#cookie-modal button {
  background-color: #4CAF50;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  margin-top: 10px;
}

@media (max-width: 500px) {
  #cookie-banner { padding: 15px; font-size: 13px; }
  #cookie-banner button { padding: 6px 12px; font-size: 13px; }
  #cookie-modal .modal-content { padding: 15px; font-size: 13px; }
}