
/* BARRA DE COOKIES */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  box-sizing: border-box;
  background: #ffffff;
  color: #252525;
  padding: 22px 20px;
  box-shadow: 0 -4px 25px rgba(0,0,0,.12);
  z-index: 99999;
  font-family: Arial, sans-serif;
  transform: translateY(110%);
  transition: transform .35s ease;
}

#cookie-banner.visible {
  transform: translateY(0);
}

.cookie-inner {
  max-width: 600px;
  margin: auto;
}

.cookie-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 10px;
}

.cookie-description {
  font-size: 13px;
  line-height: 1.6;
  color: #555;
  margin-bottom: 12px;
}

.cookie-link {
  display: inline-block;
  color: #333;
  font-size: 12px;
  text-decoration: underline;
  margin-bottom: 18px;
}

.cookie-buttons {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.cookie-btn {
  width: 100%;
  min-height: 46px;
  border-radius: 6px;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #222;
  font-family: inherit;
}

.cookie-accept {
  background: #222;
  color: white;
}

.cookie-reject {
  background: white;
  color: #222;
}

.cookie-settings-btn {
  background: #f3f3f3;
  color: #222;
  border-color: #ddd;
}

/* PANEL DE CONFIGURACIÓN */
#cookie-settings {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 100000;
  align-items: flex-end;
  justify-content: center;
  font-family: Arial, sans-serif;
}

#cookie-settings.visible {
  display: flex;
}

.cookie-panel {
  background: white;
  width: 100%;
  max-width: 600px;
  padding: 24px 20px;
  border-radius: 16px 16px 0 0;
  box-sizing: border-box;
  max-height: 85vh;
  overflow-y: auto;
}

.cookie-panel h2 {
  font-size: 19px;
  margin: 0 0 12px;
}

.cookie-category {
  padding: 14px 0;
  border-bottom: 1px solid #eee;
}

.cookie-category strong {
  display: block;
  font-size: 14px;
  margin-bottom: 5px;
}

.cookie-category p {
  font-size: 12px;
  color: #666;
  line-height: 1.5;
  margin: 0;
}

.cookie-category label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.cookie-category input {
  width: 20px;
  height: 20px;
  accent-color: #222;
}

.cookie-always {
  font-size: 11px;
  color: #777;
}

.cookie-panel-actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 20px;
}

/* BOTÓN PARA VOLVER A CONFIGURAR */
#cookie-reopen {
  display: none;
  position: fixed;
  bottom: 12px;
  left: 12px;
  z-index: 99998;
  border: 1px solid #ddd;
  background: white;
  color: #222;
  padding: 10px 14px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 12px;
}

/* TABLET Y ORDENADOR */
@media (min-width: 700px) {
  #cookie-banner {
    padding: 22px 30px;
  }

  .cookie-buttons {
    flex-direction: row;
  }

  .cookie-btn {
    flex: 1;
  }

  #cookie-settings {
    align-items: center;
    padding: 20px;
  }

  .cookie-panel {
    border-radius: 12px;
  }

  .cookie-panel-actions {
    flex-direction: row;
  }

  .cookie-panel-actions button {
    flex: 1;
  }
}
